Skip to content

Commit

Permalink
ebmc: two KNOWNBUG tests for k-induction
Browse files Browse the repository at this point in the history
The test is one file that has two properties, one to be refuted and one to
be proved.
  • Loading branch information
kroening committed Dec 11, 2023
1 parent 27ece61 commit a25879c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
11 changes: 11 additions & 0 deletions regression/ebmc/k-induction/k-induction5.k-1.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
KNOWNBUG
k-induction5.v
--module main --bound 1 --k-induction
^EXIT=10$
^SIGNAL=0$
^\[main.property.property1\] .* PROVED$
^\[main.property.property2\] .* INCONCLUSIVE$
--
^warning: ignoring
--
The result for property2 should be REFUTED.
21 changes: 21 additions & 0 deletions regression/ebmc/k-induction/k-induction5.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module main();

reg [31:0] x, y;
wire clk;

initial x=1;
initial y=1;

always @(posedge clk)
if(x<1000) begin
x<=x+1;
y<=y+1;
end

// true, and 1-inductive
always assert property1: x<=1000;

// false, bound 1 suffices
always assert property2: x!=2;

endmodule

0 comments on commit a25879c

Please sign in to comment.