Skip to content

Commit fcde983

Browse files
authored
Merge pull request #1134 from diffblue/sva-buechi-if
SVA-to-Buechi: `if`
2 parents f9f4759 + 4cddd64 commit fcde983

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/temporal-logic/ltl_sva_to_string.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,14 @@ ltl_sva_to_stringt::rec(const exprt &expr, modet mode)
394394
PRECONDITION(mode == SVA_SEQUENCE);
395395
return suffix("[+]", expr, mode);
396396
}
397+
else if(expr.id() == ID_if)
398+
{
399+
// c ? x : y ---> (c∧x)∨(¬c∧y)
400+
auto &if_expr = to_if_expr(expr);
401+
auto a1 = and_exprt{if_expr.cond(), if_expr.true_case()};
402+
auto a2 = and_exprt{not_exprt{if_expr.cond()}, if_expr.false_case()};
403+
return rec(or_exprt{a1, a2}, mode);
404+
}
397405
else if(!is_temporal_operator(expr))
398406
{
399407
auto number = atoms.number(expr);

0 commit comments

Comments
 (0)