Skip to content

Commit bdbdbcf

Browse files
authored
Merge pull request #1198 from diffblue/unsupported1
BMC: exit early if there is no supported property
2 parents 02be131 + 2a83c54 commit bdbdbcf

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CORE
2+
unsupported1.smv
3+
4+
^\[.*\] EX TRUE: UNKNOWN$
5+
^EXIT=10$
6+
^SIGNAL=0$
7+
--
8+
^warning: ignoring
9+
^Generating Decision Problem
10+
--
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
MODULE main
2+
3+
-- not supported by k-induction or BMC
4+
CTLSPEC EX 1

src/ebmc/bmc.cpp

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,25 @@ handles(const exprt::operandst &exprs, decision_proceduret &solver)
203203
return result;
204204
}
205205

206+
static bool have_supported_property(ebmc_propertiest &properties)
207+
{
208+
bool have_supported = false;
209+
210+
for(auto &property : properties.properties)
211+
{
212+
if(property.is_disabled() || property.is_failure())
213+
continue;
214+
215+
// Is it supported by the BMC engine?
216+
if(bmc_supports_property(property.normalized_expr))
217+
have_supported = true;
218+
else
219+
property.failure("property not supported by BMC engine");
220+
}
221+
222+
return have_supported;
223+
}
224+
206225
property_checker_resultt bmc(
207226
std::size_t bound,
208227
bool convert_only,
@@ -216,6 +235,14 @@ property_checker_resultt bmc(
216235
ebmc_propertiest properties = properties_in;
217236

218237
messaget message(message_handler);
238+
239+
// exit early if there is no supported property
240+
if(!have_supported_property(properties))
241+
{
242+
message.status() << "No supported property" << messaget::eom;
243+
return property_checker_resultt{std::move(properties)};
244+
}
245+
219246
message.status() << "Generating Decision Problem" << messaget::eom;
220247

221248
// convert the transition system

0 commit comments

Comments
 (0)