@@ -289,14 +289,15 @@ namespace smt {
289
289
}
290
290
};
291
291
scoped_level _lvl (*this );
292
+ bool pushed = false ;
292
293
293
294
for (expr* v : vars0) {
294
295
if (is_uninterp_const (v)) {
295
296
vars.push_back (v);
296
297
m_var2orig.insert (v, v);
297
298
}
298
299
else {
299
- push ();
300
+ if (!pushed) pushed = true , push ();
300
301
expr_ref c (m.mk_fresh_const (" v" , m.get_sort (v)), m);
301
302
expr_ref eq (m.mk_eq (c, v), m);
302
303
assert_expr (eq);
@@ -310,7 +311,7 @@ namespace smt {
310
311
m_assumption2orig.insert (a, a);
311
312
}
312
313
else {
313
- push ();
314
+ if (!pushed) pushed = true , push ();
314
315
expr_ref c (m.mk_fresh_const (" a" , m.get_sort (a)), m);
315
316
expr_ref eq (m.mk_eq (c, a), m);
316
317
assert_expr (eq);
@@ -357,6 +358,8 @@ namespace smt {
357
358
TRACE (" context" ,
358
359
tout << " vars: " << vars.size () << " \n " ;
359
360
tout << " lits: " << num_units << " \n " ;);
361
+ pop_to_base_lvl ();
362
+ m_search_lvl = m_scope_lvl;
360
363
m_case_split_queue->init_search_eh ();
361
364
unsigned num_iterations = 0 ;
362
365
unsigned num_fixed_eqs = 0 ;
@@ -381,9 +384,14 @@ namespace smt {
381
384
push_scope ();
382
385
assign (lit, b_justification::mk_axiom (), true );
383
386
while (can_propagate ()) {
384
- if (!propagate () && (!resolve_conflict () || inconsistent ())) {
385
- TRACE (" context" , tout << " inconsistent\n " ;);
387
+ if (propagate ())
388
+ break ;
389
+ if (resolve_conflict ())
390
+ continue ;
391
+ if (inconsistent ()) {
386
392
SASSERT (inconsistent ());
393
+ IF_VERBOSE (1 , verbose_stream () << " inconsistent at base level " << get_scope_level () << " \n " );
394
+ return l_undef;
387
395
m_conflict = null_b_justification;
388
396
m_not_l = null_literal;
389
397
}
0 commit comments