Skip to content

Commit f334106

Browse files
authored
Merge pull request #923 from diffblue/k-induction6-fix
Engine heuristic: fix for assumptions unsupported by k-induction
2 parents 4f09a7e + 600f348 commit f334106

18 files changed

+227
-26
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
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CORE
2+
basic3.sv
3+
4+
^\[main\.a0\] always not s_eventually !main\.x: ASSUMED$
5+
^\[main\.p0\] always 0: REFUTED$
6+
^EXIT=10$
7+
^SIGNAL=0$
8+
--
9+
^warning: ignoring
10+
--
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module main(input clk, input x);
2+
3+
// unsupported
4+
a0: assume property (not s_eventually !x);
5+
6+
// should fail
7+
p0: assert property (0);
8+
9+
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

0 commit comments

Comments
 (0)