Skip to content

Commit 6def7e7

Browse files
authored
Merge pull request #266 from diffblue/k-induction5
ebmc: test for k-induction with both refuted and proved property
2 parents f067e32 + 41e7f83 commit 6def7e7

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
KNOWNBUG
2+
k-induction5.v
3+
--module main --bound 1 --k-induction
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^\[main.property.property1\] .* PROVED$
7+
^\[main.property.property2\] .* INCONCLUSIVE$
8+
--
9+
^warning: ignoring
10+
--
11+
The result for property2 should be REFUTED.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
KNOWNBUG
2+
k-induction5.v
3+
--module main --bound 3 --k-induction
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^\[main.property.property1\] .* PROVED$
7+
^\[main.property.property2\] .* PROVED$
8+
--
9+
^warning: ignoring
10+
--
11+
The result for property2 should be REFUTED.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module main();
2+
3+
reg [31:0] x, y;
4+
wire clk;
5+
6+
initial x=1;
7+
initial y=1;
8+
9+
always @(posedge clk)
10+
if(x<1000) begin
11+
x<=x+1;
12+
y<=y+1;
13+
end
14+
15+
// true, and 1-inductive
16+
always assert property1: x<=1000;
17+
18+
// false, bound 1 suffices
19+
always assert property2: x!=2;
20+
21+
endmodule

0 commit comments

Comments
 (0)