Skip to content

Commit c568427

Browse files
committed
Engine heuristic: fix for assumptions unsupported by k-induction
The k-induction engine now correctly reports unsupported assumptions, and is then skipped by the engine selection heuristic. Fixes #921.
1 parent c93d1e8 commit c568427

16 files changed

+205
-27
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CORE
2+
basic1.sv
3+
4+
^\[main\.a0\] always not s_eventually !main\.x: ASSUMED$
5+
^\[main\.p0\] always main\.x: PROVED up to bound 5$
6+
^EXIT=0$
7+
^SIGNAL=0$
8+
--
9+
^warning: ignoring
10+
--
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module main(input clk, input x);
2+
3+
// not supported by k-induction
4+
a0: assume property (not s_eventually !x);
5+
6+
p0: assert property (x);
7+
8+
endmodule
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CORE
2+
basic2.sv
3+
4+
^\[main\.a0\] always not s_eventually !main\.y: UNSUPPORTED: unsupported by k-induction$
5+
^\[main\.a1\] always !main\.x: ASSUMED$
6+
^\[main\.p0\] always !main\.z: PROVED$
7+
^EXIT=0$
8+
^SIGNAL=0$
9+
--
10+
^warning: ignoring
11+
--
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module main(input clk, input x, input y);
2+
3+
reg z = 0;
4+
always_ff @(posedge clk) z <= z || x;
5+
6+
// unsupported assumption
7+
a0: assume property (not s_eventually !y);
8+
9+
// supported assumption
10+
a1: assume property (!x);
11+
12+
// inductive property
13+
p0: assert property (!z);
14+
15+
endmodule

regression/ebmc/k-induction/k-induction-unsupported2.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ k-induction-unsupported2.sv
33
--module main --k-induction
44
^EXIT=10$
55
^SIGNAL=0$
6-
^\[main\.p0\] always s_eventually main\.x == 10: FAILURE: property unsupported by k-induction$
6+
^\[main\.p0\] always s_eventually main\.x == 10: UNSUPPORTED: unsupported by k-induction$
77
^\[main\.p1\] always main\.x <= 10: PROVED$
88
--
99
^warning: ignoring

regression/ebmc/k-induction/k-induction6.desc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
KNOWNBUG
1+
CORE
22
k-induction6.sv
3-
3+
--k-induction
4+
^\[main\.a0\] always not s_eventually !main\.x: UNSUPPORTED: unsupported by k-induction$
5+
^\[main\.p0\] always main\.x: INCONCLUSIVE$
46
^EXIT=10$
57
^SIGNAL=0$
68
--
79
^warning: ignoring
810
--
9-
The property should hold, but is reported as refuted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CORE
2+
k-induction7.sv
3+
--k-induction
4+
^\[main\.a0\] always not s_eventually !main\.y: UNSUPPORTED: unsupported by k-induction$
5+
^\[main\.a1\] always !main\.x: ASSUMED$
6+
^\[main\.p0\] always !main\.z: PROVED$
7+
^EXIT=0$
8+
^SIGNAL=0$
9+
--
10+
^warning: ignoring
11+
--
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module main(input clk, input x, input y);
2+
3+
reg z = 0;
4+
always_ff @(posedge clk) z <= z || x;
5+
6+
// unsupported assumption
7+
a0: assume property (not s_eventually !y);
8+
9+
// supported assumption
10+
a1: assume property (!x);
11+
12+
// inductive property
13+
p0: assert property (!z);
14+
15+
endmodule

regression/smv/LTL/smv_ltlspec6.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
CORE
22
smv_ltlspec6.smv
33

4-
^EXIT=0$
4+
^EXIT=10$
55
^SIGNAL=0$
66
--
77
^warning: ignoring

src/ebmc/bdd_engine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ property_checker_resultt bdd_enginet::operator()()
180180
try
181181
{
182182
// any properties left?
183-
if(!properties.has_unknown_property())
183+
if(!properties.has_unfinished_property())
184184
return property_checker_resultt{properties};
185185

186186
// possibly apply liveness-to-safety

0 commit comments

Comments
 (0)