Skip to content

Commit 4a33236

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 4a33236

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
@@ -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)