Skip to content

Commit 29b70bf

Browse files
committed
bugfix for SVA cover
This changes the implicit 'always' used for SVA cover properties from LTL G to SVA always. This avoids a mixture of LTL and SVA, which is not supported by the BMC backend.
1 parent aac75f1 commit 29b70bf

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CORE
2+
cover_sequence1.sv
3+
--bound 10 --numbered-trace
4+
^\[main\.p0\] cover \(main\.x == 2 ##1 main\.x == 3 ##1 main\.x == 4\): PROVED$
5+
^Trace with 5 states:$
6+
^\[main\.p1\] cover \(main\.x == 2 ##1 main\.x == 3 ##1 main\.x == 5\): REFUTED up to bound 10$
7+
^EXIT=10$
8+
^SIGNAL=0$
9+
--
10+
^warning: ignoring
11+
--
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module main(input clk);
2+
3+
// count up
4+
reg [7:0] x = 0;
5+
6+
always @(posedge clk)
7+
x++;
8+
9+
// expected to pass
10+
p0: cover property (x==2 ##1 x==3 ##1 x==4);
11+
12+
// expected to fail
13+
p1: cover property (x==2 ##1 x==3 ##1 x==5);
14+
15+
endmodule

src/temporal-logic/normalize_property.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ exprt normalize_property(exprt expr)
119119
{
120120
// top-level only
121121
if(expr.id() == ID_sva_cover)
122-
expr = G_exprt{not_exprt{to_sva_cover_expr(expr).op()}};
122+
expr = sva_always_exprt{not_exprt{to_sva_cover_expr(expr).op()}};
123123

124124
expr = trivial_sva(expr);
125125

0 commit comments

Comments
 (0)