Skip to content

BMC: exit early if there is no supported property #1198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions regression/ebmc/engine-heuristic/unsupported1.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CORE
unsupported1.smv

^\[.*\] EX TRUE: UNKNOWN$
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this also was the output before - shouldn't this .desc file specifically check for "No supported property" in the output?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes; will be a separate PR, since it's a change to the engine heuristic, not to the BMC engine.

^EXIT=10$
^SIGNAL=0$
--
^warning: ignoring
^Generating Decision Problem
--
4 changes: 4 additions & 0 deletions regression/ebmc/engine-heuristic/unsupported1.smv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
MODULE main

-- not supported by k-induction or BMC
CTLSPEC EX 1
27 changes: 27 additions & 0 deletions src/ebmc/bmc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,25 @@ handles(const exprt::operandst &exprs, decision_proceduret &solver)
return result;
}

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,
Expand All @@ -216,6 +235,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
Expand Down
Loading