diff --git a/regression/ebmc/engine-heuristic/unsupported1.desc b/regression/ebmc/engine-heuristic/unsupported1.desc new file mode 100644 index 000000000..0ccf1526d --- /dev/null +++ b/regression/ebmc/engine-heuristic/unsupported1.desc @@ -0,0 +1,10 @@ +CORE +unsupported1.smv + +^\[.*\] EX TRUE: UNKNOWN$ +^EXIT=10$ +^SIGNAL=0$ +-- +^warning: ignoring +^Generating Decision Problem +-- diff --git a/regression/ebmc/engine-heuristic/unsupported1.smv b/regression/ebmc/engine-heuristic/unsupported1.smv new file mode 100644 index 000000000..8ecf0ba35 --- /dev/null +++ b/regression/ebmc/engine-heuristic/unsupported1.smv @@ -0,0 +1,4 @@ +MODULE main + +-- not supported by k-induction or BMC +CTLSPEC EX 1 diff --git a/src/ebmc/bmc.cpp b/src/ebmc/bmc.cpp index 6b39e0fe4..a14405b42 100644 --- a/src/ebmc/bmc.cpp +++ b/src/ebmc/bmc.cpp @@ -191,6 +191,25 @@ void bmc_with_iterative_constraint_strengthening( } } +static bool have_supported_property(ebmc_propertiest &properties) +{ + bool have_supported = false; + + for(auto &property : properties.properties) + { + if(property.is_disabled() || property.is_failure()) + continue; + + // Is it supported by the BMC engine? + if(bmc_supports_property(property.normalized_expr)) + have_supported = true; + else + property.failure("property not supported by BMC engine"); + } + + return have_supported; +} + property_checker_resultt bmc( std::size_t bound, bool convert_only, @@ -204,6 +223,14 @@ property_checker_resultt bmc( ebmc_propertiest properties = properties_in; messaget message(message_handler); + + // exit early if there is no supported property + if(!have_supported_property(properties)) + { + message.status() << "No supported property" << messaget::eom; + return property_checker_resultt{std::move(properties)}; + } + message.status() << "Generating Decision Problem" << messaget::eom; // convert the transition system