@@ -84,18 +84,62 @@ static inline sva_disable_iff_exprt &to_sva_disable_iff_expr(exprt &expr)
84
84
return static_cast <sva_disable_iff_exprt &>(expr);
85
85
}
86
86
87
- class sva_nexttime_exprt : public binary_predicate_exprt
87
+ // / nonindexed variant
88
+ class sva_nexttime_exprt : public unary_predicate_exprt
88
89
{
89
90
public:
90
- // nonindexed variant
91
91
explicit sva_nexttime_exprt (exprt op)
92
- : binary_predicate_exprt(nil_exprt(), ID_sva_nexttime, std::move(op))
92
+ : unary_predicate_exprt( ID_sva_nexttime, std::move(op))
93
93
{
94
94
}
95
+ };
96
+
97
+ static inline const sva_nexttime_exprt &to_sva_nexttime_expr (const exprt &expr)
98
+ {
99
+ PRECONDITION (expr.id () == ID_sva_nexttime);
100
+ sva_nexttime_exprt::check (expr, validation_modet::INVARIANT);
101
+ return static_cast <const sva_nexttime_exprt &>(expr);
102
+ }
103
+
104
+ static inline sva_nexttime_exprt &to_sva_nexttime_expr (exprt &expr)
105
+ {
106
+ PRECONDITION (expr.id () == ID_sva_nexttime);
107
+ sva_nexttime_exprt::check (expr, validation_modet::INVARIANT);
108
+ return static_cast <sva_nexttime_exprt &>(expr);
109
+ }
110
+
111
+ // / nonindexed variant
112
+ class sva_s_nexttime_exprt : public unary_predicate_exprt
113
+ {
114
+ public:
115
+ explicit sva_s_nexttime_exprt (exprt op)
116
+ : unary_predicate_exprt(ID_sva_s_nexttime, std::move(op))
117
+ {
118
+ }
119
+ };
120
+
121
+ static inline const sva_s_nexttime_exprt &
122
+ to_sva_s_nexttime_expr (const exprt &expr)
123
+ {
124
+ PRECONDITION (expr.id () == ID_sva_s_nexttime);
125
+ sva_s_nexttime_exprt::check (expr, validation_modet::INVARIANT);
126
+ return static_cast <const sva_s_nexttime_exprt &>(expr);
127
+ }
128
+
129
+ static inline sva_s_nexttime_exprt &to_sva_s_nexttime_expr (exprt &expr)
130
+ {
131
+ PRECONDITION (expr.id () == ID_sva_s_nexttime);
132
+ sva_s_nexttime_exprt::check (expr, validation_modet::INVARIANT);
133
+ return static_cast <sva_s_nexttime_exprt &>(expr);
134
+ }
95
135
96
- bool is_indexed () const
136
+ // / indexed variant of sva_nexttime_exprt
137
+ class sva_indexed_nexttime_exprt : public binary_predicate_exprt
138
+ {
139
+ public:
140
+ sva_indexed_nexttime_exprt (exprt index, exprt op)
141
+ : binary_predicate_exprt(std::move(index), ID_sva_nexttime, std::move(op))
97
142
{
98
- return index ().is_not_nil ();
99
143
}
100
144
101
145
const exprt &index () const
@@ -123,32 +167,32 @@ class sva_nexttime_exprt : public binary_predicate_exprt
123
167
using binary_predicate_exprt::op1;
124
168
};
125
169
126
- static inline const sva_nexttime_exprt &to_sva_nexttime_expr (const exprt &expr)
170
+ static inline const sva_indexed_nexttime_exprt &
171
+ to_sva_indexed_nexttime_expr (const exprt &expr)
127
172
{
128
- PRECONDITION (expr.id () == ID_sva_nexttime );
129
- sva_nexttime_exprt ::check (expr, validation_modet::INVARIANT);
130
- return static_cast <const sva_nexttime_exprt &>(expr);
173
+ PRECONDITION (expr.id () == ID_sva_indexed_nexttime );
174
+ sva_indexed_nexttime_exprt ::check (expr, validation_modet::INVARIANT);
175
+ return static_cast <const sva_indexed_nexttime_exprt &>(expr);
131
176
}
132
177
133
- static inline sva_nexttime_exprt &to_sva_nexttime_expr (exprt &expr)
178
+ static inline sva_indexed_nexttime_exprt &
179
+ to_sva_indexed_nexttime_expr (exprt &expr)
134
180
{
135
- PRECONDITION (expr.id () == ID_sva_nexttime );
136
- sva_nexttime_exprt ::check (expr, validation_modet::INVARIANT);
137
- return static_cast <sva_nexttime_exprt &>(expr);
181
+ PRECONDITION (expr.id () == ID_sva_indexed_nexttime );
182
+ sva_indexed_nexttime_exprt ::check (expr, validation_modet::INVARIANT);
183
+ return static_cast <sva_indexed_nexttime_exprt &>(expr);
138
184
}
139
185
140
- class sva_s_nexttime_exprt : public binary_predicate_exprt
186
+ // / indexed variant of sva_s_nexttime_exprt
187
+ class sva_indexed_s_nexttime_exprt : public binary_predicate_exprt
141
188
{
142
189
public:
143
- // nonindexed variant
144
- explicit sva_s_nexttime_exprt (exprt op)
145
- : binary_predicate_exprt(nil_exprt(), ID_sva_s_nexttime, std::move(op))
146
- {
147
- }
148
-
149
- bool is_indexed () const
190
+ sva_indexed_s_nexttime_exprt (exprt index, exprt op)
191
+ : binary_predicate_exprt(
192
+ std::move (index),
193
+ ID_sva_indexed_s_nexttime,
194
+ std::move(op))
150
195
{
151
- return index ().is_not_nil ();
152
196
}
153
197
154
198
const exprt &index () const
@@ -176,19 +220,20 @@ class sva_s_nexttime_exprt : public binary_predicate_exprt
176
220
using binary_predicate_exprt::op1;
177
221
};
178
222
179
- static inline const sva_s_nexttime_exprt &
180
- to_sva_s_nexttime_expr (const exprt &expr)
223
+ static inline const sva_indexed_s_nexttime_exprt &
224
+ to_sva_indexed_s_nexttime_expr (const exprt &expr)
181
225
{
182
- PRECONDITION (expr.id () == ID_sva_s_nexttime );
183
- sva_s_nexttime_exprt ::check (expr, validation_modet::INVARIANT);
184
- return static_cast <const sva_s_nexttime_exprt &>(expr);
226
+ PRECONDITION (expr.id () == ID_sva_indexed_s_nexttime );
227
+ sva_indexed_s_nexttime_exprt ::check (expr, validation_modet::INVARIANT);
228
+ return static_cast <const sva_indexed_s_nexttime_exprt &>(expr);
185
229
}
186
230
187
- static inline sva_s_nexttime_exprt &to_sva_s_nexttime_expr (exprt &expr)
231
+ static inline sva_indexed_s_nexttime_exprt &
232
+ to_sva_indexed_s_nexttime_expr (exprt &expr)
188
233
{
189
- PRECONDITION (expr.id () == ID_sva_s_nexttime );
190
- sva_s_nexttime_exprt ::check (expr, validation_modet::INVARIANT);
191
- return static_cast <sva_s_nexttime_exprt &>(expr);
234
+ PRECONDITION (expr.id () == ID_sva_indexed_s_nexttime );
235
+ sva_indexed_s_nexttime_exprt ::check (expr, validation_modet::INVARIANT);
236
+ return static_cast <sva_indexed_s_nexttime_exprt &>(expr);
192
237
}
193
238
194
239
class sva_ranged_predicate_exprt : public ternary_exprt
0 commit comments