Skip to content

Commit de56d24

Browse files
committed
SVA-to-Buechi: release/until operators
This adds conversion for the weak until and weak+strong release operators.
1 parent 1ef4ad1 commit de56d24

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CORE
2+
../../verilog/SVA/sva_until1.sv
3+
--buechi
4+
^\[main\.p0\] always \(main.a until_with main.b\): REFUTED$
5+
^\[main\.p1\] always \(main.a until main.b\): REFUTED$
6+
^\[main\.p2\] always \(main.a s_until main.b\): REFUTED$
7+
^EXIT=10$
8+
^SIGNAL=0$
9+
--
10+
^warning: ignoring
11+
--

src/temporal-logic/ltl_sva_to_string.cpp

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,27 @@ ltl_sva_to_stringt::rec(const exprt &expr, modet mode)
249249
PRECONDITION(mode == PROPERTY);
250250
return infix(" U ", expr, mode);
251251
}
252+
else if(expr.id() == ID_sva_until)
253+
{
254+
PRECONDITION(mode == PROPERTY);
255+
return infix(" W ", expr, mode);
256+
}
252257
else if(expr.id() == ID_sva_s_until_with)
253258
{
254-
// This is release with swapped operands
259+
// This is strong release with swapped operands
255260
PRECONDITION(mode == PROPERTY);
256261
auto &until_with = to_sva_s_until_with_expr(expr);
257-
auto R = R_exprt{until_with.rhs(), until_with.lhs()}; // swapped
258-
return rec(R, mode);
262+
auto new_expr =
263+
strong_R_exprt{until_with.rhs(), until_with.lhs()}; // swapped
264+
return infix(" M ", new_expr, mode);
265+
}
266+
else if(expr.id() == ID_sva_until_with)
267+
{
268+
// This is weak release with swapped operands
269+
PRECONDITION(mode == PROPERTY);
270+
auto &until_with = to_sva_until_with_expr(expr);
271+
auto new_expr = R_exprt{until_with.rhs(), until_with.lhs()}; // swapped
272+
return infix(" R ", new_expr, mode);
259273
}
260274
else if(
261275
expr.id() == ID_sva_weak || expr.id() == ID_sva_strong ||

0 commit comments

Comments
 (0)