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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
27 changes: 27 additions & 0 deletions src/ebmc/bmc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
Loading