Skip to content

Commit c327304

Browse files
committed
BMC: exit early if there is no supported property
BMC now exits early if there is no supported property, to prevent wasting time on generating the SAT instance.
1 parent 955c752 commit c327304

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/ebmc/bmc.cpp

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,25 @@ void bmc_with_iterative_constraint_strengthening(
191191
}
192192
}
193193

194+
static bool have_supported_property(ebmc_propertiest &properties)
195+
{
196+
bool have_supported = false;
197+
198+
for(auto &property : properties.properties)
199+
{
200+
if(property.is_disabled() || property.is_failure())
201+
continue;
202+
203+
// Is it supported by the BMC engine?
204+
if(bmc_supports_property(property.normalized_expr))
205+
have_supported = true;
206+
else
207+
property.failure("property not supported by BMC engine");
208+
}
209+
210+
return have_supported;
211+
}
212+
194213
property_checker_resultt bmc(
195214
std::size_t bound,
196215
bool convert_only,
@@ -204,6 +223,14 @@ property_checker_resultt bmc(
204223
ebmc_propertiest properties = properties_in;
205224

206225
messaget message(message_handler);
226+
227+
// exit early if there is no supported property
228+
if(!have_supported_property(properties))
229+
{
230+
message.status() << "No supported property" << messaget::eom;
231+
return property_checker_resultt{std::move(properties)};
232+
}
233+
207234
message.status() << "Generating Decision Problem" << messaget::eom;
208235

209236
// convert the transition system

0 commit comments

Comments
 (0)