@@ -40,7 +40,6 @@ class slice_solver : public solver {
40
40
ptr_vector<func_decl> m_used_funs_trail;
41
41
unsigned_vector m_used_funs_lim;
42
42
bool m_has_query = false ;
43
- unsigned m_level = 0 ;
44
43
45
44
ast_mark m_mark;
46
45
@@ -210,18 +209,17 @@ class slice_solver : public solver {
210
209
return ;
211
210
unsigned idx = m_new_idx[0 ];
212
211
auto const & f0 = m_assertions[idx];
213
- if (f0.level < m_level ) {
212
+ if (f0.level < s-> get_scope_level () ) {
214
213
215
214
// pop to f.level
216
215
// add m_new_idx within f.level
217
216
// replay push and assertions above f.level
218
- s->pop (m_level - f0.level );
219
- m_level = f0.level ;
217
+ s->pop (s->get_scope_level () - f0.level );
220
218
unsigned last_idx = idx;
221
219
for (unsigned idx : m_new_idx) {
222
220
// add only new assertions within lowest scope level.
223
221
auto const & f = m_assertions[idx];
224
- if (m_level != f.level )
222
+ if (s-> get_scope_level () != f.level )
225
223
break ;
226
224
last_idx = idx;
227
225
assert_expr (f);
@@ -231,21 +229,18 @@ class slice_solver : public solver {
231
229
auto const & f = m_assertions[i];
232
230
if (f0.level == f.level )
233
231
continue ;
234
- while (f.level > m_level) {
232
+ while (f.level > s-> get_scope_level ())
235
233
s->push ();
236
- ++m_level;
237
- }
234
+
238
235
if (f.active )
239
236
assert_expr (f);
240
237
}
241
238
}
242
239
else {
243
240
for (unsigned idx : m_new_idx) {
244
241
auto const & f = m_assertions[idx];
245
- while (f.level > m_level) {
242
+ while (f.level > s-> get_scope_level ())
246
243
s->push ();
247
- ++m_level;
248
- }
249
244
assert_expr (f);
250
245
}
251
246
}
@@ -294,10 +289,8 @@ class slice_solver : public solver {
294
289
unsigned old_sz = m_assertions_lim[m_assertions_lim.size () - n];
295
290
for (unsigned i = m_assertions.size (); i-- > old_sz; ) {
296
291
auto const & f = m_assertions[i];
297
- if (f.level < m_level) {
298
- s->pop (m_level - f.level );
299
- m_level = f.level ;
300
- }
292
+ if (f.level < s->get_scope_level ())
293
+ s->pop (s->get_scope_level () - f.level );
301
294
}
302
295
m_assertions_lim.shrink (m_assertions_lim.size () - n);
303
296
m_assertions.shrink (old_sz);
0 commit comments