@@ -28,15 +28,26 @@ exprt verilog_typecheck_exprt::convert_unary_sva(unary_exprt expr)
2828 expr.id () == ID_sva_cycle_delay_plus ||
2929 expr.id () == ID_sva_cycle_delay_star || expr.id () == ID_sva_weak ||
3030 expr.id () == ID_sva_strong || expr.id () == ID_sva_nexttime ||
31- expr.id () == ID_sva_s_nexttime ||
32- expr.id () == ID_sva_sequence_repetition_plus ||
33- expr.id () == ID_sva_sequence_repetition_star)
31+ expr.id () == ID_sva_s_nexttime)
3432 {
3533 convert_sva (expr.op ());
3634 make_boolean (expr.op ());
3735 expr.type () = bool_typet ();
3836 return std::move (expr);
3937 }
38+ else if (
39+ expr.id () == ID_sva_sequence_repetition_plus || // x[+]
40+ expr.id () == ID_sva_sequence_repetition_star) // x[*}
41+ {
42+ // These both take a sequence as argument.
43+ // The grammar allows properties to implement and/or over
44+ // sequences. Check here that the argument is a sequence.
45+ convert_sva (expr.op ());
46+ require_sva_sequence (expr.op ());
47+ make_boolean (expr.op ());
48+ expr.type () = bool_typet{};
49+ return std::move (expr);
50+ }
4051 else
4152 {
4253 // not SVA
@@ -260,7 +271,11 @@ exprt verilog_typecheck_exprt::convert_ternary_sva(ternary_exprt expr)
260271 {
261272 auto &repetition = to_sva_sequence_consecutive_repetition_expr (expr);
262273
274+ // This expression takes a sequence as argument.
275+ // The grammar allows properties to implement and/or over
276+ // sequences. Check here that the argument is a sequence.
263277 convert_sva (repetition.op ());
278+ require_sva_sequence (repetition.op ());
264279 make_boolean (repetition.op ());
265280
266281 convert_expr (repetition.from ());
0 commit comments