@@ -28,15 +28,26 @@ exprt verilog_typecheck_exprt::convert_unary_sva(unary_exprt expr)
28
28
expr.id () == ID_sva_cycle_delay_plus ||
29
29
expr.id () == ID_sva_cycle_delay_star || expr.id () == ID_sva_weak ||
30
30
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)
34
32
{
35
33
convert_sva (expr.op ());
36
34
make_boolean (expr.op ());
37
35
expr.type () = bool_typet ();
38
36
return std::move (expr);
39
37
}
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
+ }
40
51
else
41
52
{
42
53
// not SVA
@@ -260,7 +271,11 @@ exprt verilog_typecheck_exprt::convert_ternary_sva(ternary_exprt expr)
260
271
{
261
272
auto &repetition = to_sva_sequence_consecutive_repetition_expr (expr);
262
273
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.
263
277
convert_sva (repetition.op ());
278
+ require_sva_sequence (repetition.op ());
264
279
make_boolean (repetition.op ());
265
280
266
281
convert_expr (repetition.from ());
0 commit comments