Skip to content

Commit b2112c7

Browse files
authored
Merge pull request #453 from diffblue/bmc-top-level-conjuction
BMC now splits up top-level conjunction
2 parents d20c7c8 + 5336754 commit b2112c7

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
}
@@ -188,6 +196,12 @@ static void property_obligations_rec(
188196
property_obligations_rec(phi, solver, c, no_timeframes, ns, obligations);
189197
}
190198
}
199+
else if(property_expr.id() == ID_and)
200+
{
201+
for(auto &op : to_and_expr(property_expr).operands())
202+
property_obligations_rec(
203+
op, solver, current, no_timeframes, ns, obligations);
204+
}
191205
else
192206
{
193207
// current state property

0 commit comments

Comments
 (0)