Skip to content

Commit 3f410c3

Browse files
authored
Merge pull request #1089 from diffblue/smv-word-level-SVA
SMV word-level output now converts SVA
2 parents fec102e + 0c3c7e9 commit 3f410c3

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
CORE
2-
verilog1.v
2+
verilog1.sv
33
--smv-word-level
44
^MODULE main$
55
^VAR x : unsigned word\[32\];$
66
^INIT main\.x = 0ud32_0$
77
^INVAR Verilog::main\.x_aux0 = main\.x \+ 0ud32_1$
88
^TRANS next\(main\.x\) = Verilog::main\.x_aux0$
9+
^LTLSPEC F main\.x = 0sd32_10$
910
^EXIT=0$
1011
^SIGNAL=0$
1112
--

regression/ebmc/smv-word-level/verilog1.v renamed to regression/ebmc/smv-word-level/verilog1.sv

+2
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ module main(input clk);
77
always @(posedge clk)
88
x = x + 1;
99

10+
initial assert property (s_eventually x == 10);
11+
1012
endmodule

src/ebmc/output_smv_word_level.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,15 @@ static void smv_properties(
186186
{
187187
out << "LTLSPEC " << expr2smv(property.normalized_expr, ns);
188188
}
189+
else if(is_SVA(property.normalized_expr))
190+
{
191+
// we can turn some SVA properties into LTL
192+
auto ltl_opt = SVA_to_LTL(property.normalized_expr);
193+
if(ltl_opt.has_value())
194+
out << "LTLSPEC " << expr2smv(ltl_opt.value(), ns);
195+
else
196+
out << "-- " << property.identifier << ": SVA not converted\n";
197+
}
189198
else
190199
out << "-- " << property.identifier << ": not converted\n";
191200

0 commit comments

Comments
 (0)