Skip to content

Commit ef84299

Browse files
committed
BMC now splits up top-level conjunction
BMC on a property with a top-level conjunction now splits up conjunctions, to form separate sets of obligations.
1 parent 5728a30 commit ef84299

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

regression/ebmc/smv/module1.desc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
module1.smv
3+
--bound 10
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^\[main::spec1\] AG subA.flag & AG subB.flag: PROVED up to bound 10$
7+
--
8+
^warning: ignoring

regression/ebmc/smv/module1.smv

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
MODULE main
2+
3+
VAR subA : my-module;
4+
subB : my-module;
5+
6+
SPEC AG subA.flag & AG subB.flag
7+
8+
MODULE my-module
9+
10+
VAR flag : boolean;
11+
12+
ASSIGN init(flag) := 1;
13+
ASSIGN next(flag) := 1;

src/trans-word-level/property.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ bool bmc_supports_property(const exprt &expr)
4141
{
4242
if(!has_temporal_operator(expr))
4343
return true; // initial state only
44+
else if(
45+
expr.id() == ID_and || expr.id() == ID_or || expr.id() == ID_implies)
46+
{
47+
for(auto &op : expr.operands())
48+
if(!bmc_supports_property(op))
49+
return false;
50+
return true;
51+
}
4452
else
4553
return false;
4654
}
@@ -153,6 +161,12 @@ static void property_obligations_rec(
153161
property_obligations_rec(phi, solver, c, no_timeframes, ns, obligations);
154162
}
155163
}
164+
else if(property_expr.id() == ID_and)
165+
{
166+
for(auto &op : to_and_expr(property_expr).operands())
167+
property_obligations_rec(
168+
op, solver, current, no_timeframes, ns, obligations);
169+
}
156170
else
157171
{
158172
// current state property

0 commit comments

Comments
 (0)