mirror of
https://github.com/Z3Prover/z3
synced 2025-04-30 04:15:51 +00:00
port equality propagation changes to new core
This commit is contained in:
parent
0432311b11
commit
974ef3c147
5 changed files with 57 additions and 9 deletions
|
@ -482,4 +482,28 @@ namespace arith {
|
|||
return all_divs_valid;
|
||||
}
|
||||
|
||||
void solver::fixed_var_eh(theory_var v, lp::constraint_index ci1, lp::constraint_index ci2, rational const& bound) {
|
||||
theory_var w = euf::null_theory_var;
|
||||
enode* x = var2enode(v);
|
||||
if (bound.is_zero())
|
||||
w = lp().local_to_external(get_zero(a.is_int(x->get_expr())));
|
||||
else if (bound.is_one())
|
||||
w = lp().local_to_external(get_one(a.is_int(x->get_expr())));
|
||||
else if (!m_value2var.find(bound, w))
|
||||
return;
|
||||
enode* y = var2enode(w);
|
||||
if (x->get_sort() != y->get_sort())
|
||||
return;
|
||||
if (x->get_root() == y->get_root())
|
||||
return;
|
||||
SASSERT(a.is_numeral(y->get_expr()));
|
||||
reset_evidence();
|
||||
set_evidence(ci1, m_core, m_eqs);
|
||||
set_evidence(ci2, m_core, m_eqs);
|
||||
++m_stats.m_fixed_eqs;
|
||||
auto* jst = euf::th_explain::propagate(*this, m_core, m_eqs, x, y);
|
||||
ctx.propagate(x, y, jst->to_index());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue