Skip to content

Commit 54188ad

Browse files
committed
convert s_until and s_until_with to LTL
This adds conversion for the SVA operators s_until and s_until_with to LTL.
1 parent 78d038d commit 54188ad

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/temporal-logic/temporal_logic.cpp

+21
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,27 @@ std::optional<exprt> SVA_to_LTL(exprt expr)
337337
else
338338
return {};
339339
}
340+
else if(expr.id() == ID_sva_s_until)
341+
{
342+
auto &until = to_sva_s_until_expr(expr);
343+
auto rec_lhs = SVA_to_LTL(until.lhs());
344+
auto rec_rhs = SVA_to_LTL(until.rhs());
345+
if(rec_lhs.has_value() && rec_rhs.has_value())
346+
return U_exprt{rec_lhs.value(), rec_rhs.value()};
347+
else
348+
return {};
349+
}
350+
else if(expr.id() == ID_sva_s_until_with)
351+
{
352+
// This is release with swapped operands
353+
auto &until_with = to_sva_s_until_with_expr(expr);
354+
auto rec_lhs = SVA_to_LTL(until_with.lhs());
355+
auto rec_rhs = SVA_to_LTL(until_with.rhs());
356+
if(rec_lhs.has_value() && rec_rhs.has_value())
357+
return R_exprt{rec_lhs.value(), rec_rhs.value()};
358+
else
359+
return {};
360+
}
340361
else if(!has_temporal_operator(expr))
341362
{
342363
return expr;

0 commit comments

Comments
 (0)