|
13 | 13 | bool is_temporal_operator(const exprt &expr)
|
14 | 14 | {
|
15 | 15 | return is_CTL_operator(expr) || is_LTL_operator(expr) ||
|
16 |
| - is_SVA_sequence(expr) || expr.id() == ID_A || expr.id() == ID_E || |
17 |
| - expr.id() == ID_sva_disable_iff || expr.id() == ID_sva_accept_on || |
18 |
| - expr.id() == ID_sva_reject_on || expr.id() == ID_sva_sync_accept_on || |
19 |
| - expr.id() == ID_sva_sync_reject_on || expr.id() == ID_sva_always || |
20 |
| - expr.id() == ID_sva_ranged_always || expr.id() == ID_sva_nexttime || |
21 |
| - expr.id() == ID_sva_s_nexttime || expr.id() == ID_sva_until || |
22 |
| - expr.id() == ID_sva_s_until || expr.id() == ID_sva_until_with || |
23 |
| - expr.id() == ID_sva_s_until_with || expr.id() == ID_sva_eventually || |
24 |
| - expr.id() == ID_sva_s_eventually || expr.id() == ID_sva_cycle_delay || |
25 |
| - expr.id() == ID_sva_overlapped_followed_by || |
26 |
| - expr.id() == ID_sva_nonoverlapped_followed_by; |
| 16 | + is_SVA_operator(expr) || expr.id() == ID_A || expr.id() == ID_E; |
27 | 17 | }
|
28 | 18 |
|
29 | 19 | bool has_temporal_operator(const exprt &expr)
|
@@ -81,3 +71,26 @@ bool is_SVA_sequence(const exprt &expr)
|
81 | 71 | id == ID_sva_sequence_intersect || id == ID_sva_sequence_first_match ||
|
82 | 72 | id == ID_sva_sequence_throughout || id == ID_sva_sequence_within;
|
83 | 73 | }
|
| 74 | + |
| 75 | +bool is_SVA_operator(const exprt &expr) |
| 76 | +{ |
| 77 | + auto id = expr.id(); |
| 78 | + return is_SVA_sequence(expr) || id == ID_sva_disable_iff || |
| 79 | + id == ID_sva_accept_on || id == ID_sva_reject_on || |
| 80 | + id == ID_sva_sync_accept_on || id == ID_sva_sync_reject_on || |
| 81 | + id == ID_sva_always || id == ID_sva_ranged_always || |
| 82 | + id == ID_sva_nexttime || id == ID_sva_s_nexttime || |
| 83 | + id == ID_sva_until || id == ID_sva_s_until || |
| 84 | + id == ID_sva_until_with || id == ID_sva_s_until_with || |
| 85 | + id == ID_sva_eventually || id == ID_sva_s_eventually || |
| 86 | + id == ID_sva_cycle_delay || id == ID_sva_overlapped_followed_by || |
| 87 | + id == ID_sva_nonoverlapped_followed_by; |
| 88 | +} |
| 89 | + |
| 90 | +bool is_SVA(const exprt &expr) |
| 91 | +{ |
| 92 | + auto non_SVA_operator = [](const exprt &expr) |
| 93 | + { return is_temporal_operator(expr) && !is_SVA_operator(expr); }; |
| 94 | + |
| 95 | + return !has_subexpr(expr, non_SVA_operator); |
| 96 | +} |
0 commit comments