mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 12:08:18 +00:00
fix #4210
This commit is contained in:
parent
7b1aee48dd
commit
911d23af1a
|
@ -289,6 +289,7 @@ namespace smt {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
scoped_level _lvl(*this);
|
scoped_level _lvl(*this);
|
||||||
|
bool pushed = false;
|
||||||
|
|
||||||
for (expr* v : vars0) {
|
for (expr* v : vars0) {
|
||||||
if (is_uninterp_const(v)) {
|
if (is_uninterp_const(v)) {
|
||||||
|
@ -296,7 +297,7 @@ namespace smt {
|
||||||
m_var2orig.insert(v, v);
|
m_var2orig.insert(v, v);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
push();
|
if (!pushed) pushed = true, push();
|
||||||
expr_ref c(m.mk_fresh_const("v", m.get_sort(v)), m);
|
expr_ref c(m.mk_fresh_const("v", m.get_sort(v)), m);
|
||||||
expr_ref eq(m.mk_eq(c, v), m);
|
expr_ref eq(m.mk_eq(c, v), m);
|
||||||
assert_expr(eq);
|
assert_expr(eq);
|
||||||
|
@ -310,7 +311,7 @@ namespace smt {
|
||||||
m_assumption2orig.insert(a, a);
|
m_assumption2orig.insert(a, a);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
push();
|
if (!pushed) pushed = true, push();
|
||||||
expr_ref c(m.mk_fresh_const("a", m.get_sort(a)), m);
|
expr_ref c(m.mk_fresh_const("a", m.get_sort(a)), m);
|
||||||
expr_ref eq(m.mk_eq(c, a), m);
|
expr_ref eq(m.mk_eq(c, a), m);
|
||||||
assert_expr(eq);
|
assert_expr(eq);
|
||||||
|
@ -357,6 +358,8 @@ namespace smt {
|
||||||
TRACE("context",
|
TRACE("context",
|
||||||
tout << "vars: " << vars.size() << "\n";
|
tout << "vars: " << vars.size() << "\n";
|
||||||
tout << "lits: " << num_units << "\n";);
|
tout << "lits: " << num_units << "\n";);
|
||||||
|
pop_to_base_lvl();
|
||||||
|
m_search_lvl = m_scope_lvl;
|
||||||
m_case_split_queue->init_search_eh();
|
m_case_split_queue->init_search_eh();
|
||||||
unsigned num_iterations = 0;
|
unsigned num_iterations = 0;
|
||||||
unsigned num_fixed_eqs = 0;
|
unsigned num_fixed_eqs = 0;
|
||||||
|
@ -381,9 +384,14 @@ namespace smt {
|
||||||
push_scope();
|
push_scope();
|
||||||
assign(lit, b_justification::mk_axiom(), true);
|
assign(lit, b_justification::mk_axiom(), true);
|
||||||
while (can_propagate()) {
|
while (can_propagate()) {
|
||||||
if (!propagate() && (!resolve_conflict() || inconsistent())) {
|
if (propagate())
|
||||||
TRACE("context", tout << "inconsistent\n";);
|
break;
|
||||||
|
if (resolve_conflict())
|
||||||
|
continue;
|
||||||
|
if (inconsistent()) {
|
||||||
SASSERT(inconsistent());
|
SASSERT(inconsistent());
|
||||||
|
IF_VERBOSE(1, verbose_stream() << "inconsistent at base level " << get_scope_level() << "\n");
|
||||||
|
return l_undef;
|
||||||
m_conflict = null_b_justification;
|
m_conflict = null_b_justification;
|
||||||
m_not_l = null_literal;
|
m_not_l = null_literal;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue