Skip to content

SMV word-level output now converts SVA #1089

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion regression/ebmc/smv-word-level/verilog1.desc
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
CORE
verilog1.v
verilog1.sv
--smv-word-level
^MODULE main$
^VAR x : unsigned word\[32\];$
^INIT main\.x = 0ud32_0$
^INVAR Verilog::main\.x_aux0 = main\.x \+ 0ud32_1$
^TRANS next\(main\.x\) = Verilog::main\.x_aux0$
^LTLSPEC F main\.x = 0sd32_10$
^EXIT=0$
^SIGNAL=0$
--
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ module main(input clk);
always @(posedge clk)
x = x + 1;

initial assert property (s_eventually x == 10);

endmodule
9 changes: 9 additions & 0 deletions src/ebmc/output_smv_word_level.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,15 @@ static void smv_properties(
{
out << "LTLSPEC " << expr2smv(property.normalized_expr, ns);
}
else if(is_SVA(property.normalized_expr))
{
// we can turn some SVA properties into LTL
auto ltl_opt = SVA_to_LTL(property.normalized_expr);
if(ltl_opt.has_value())
out << "LTLSPEC " << expr2smv(ltl_opt.value(), ns);
else
out << "-- " << property.identifier << ": SVA not converted\n";
}
else
out << "-- " << property.identifier << ": not converted\n";

Expand Down
Loading