mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
handle monomial_bounds::unit_propagate()
This commit is contained in:
parent
ff3268e636
commit
5509b468e9
3 changed files with 12 additions and 11 deletions
|
@ -283,7 +283,7 @@ namespace nla {
|
|||
break;
|
||||
}
|
||||
}
|
||||
lemma |= ineq(m.var(), lp::lconstraint_kind::EQ, 0);
|
||||
lemma |= ineq(m.var(), lp::lconstraint_kind::NE, 0);
|
||||
}
|
||||
else {
|
||||
for (auto v : m)
|
||||
|
@ -291,12 +291,14 @@ namespace nla {
|
|||
lemma.explain_fixed(v);
|
||||
|
||||
lpvar w = non_fixed_var(m);
|
||||
SASSERT(w != null_lpvar);
|
||||
|
||||
lp::lar_term term;
|
||||
term.add_monomial(-m.rat_sign(), m.var());
|
||||
term.add_monomial(k, w);
|
||||
lemma |= ineq(term, lp::lconstraint_kind::EQ, 0);
|
||||
if (w != null_lpvar) {
|
||||
lp::lar_term term;
|
||||
term.add_var(m.var());
|
||||
term.add_monomial(-k, w);
|
||||
lemma |= ineq(term, lp::lconstraint_kind::NE, 0);
|
||||
} else {
|
||||
lemma |= ineq(m.var(), lp::lconstraint_kind::NE, k);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1812,9 +1812,7 @@ bool core::improve_bounds() {
|
|||
}
|
||||
|
||||
void core::propagate(vector<lemma>& lemmas) {
|
||||
// disable for now
|
||||
return;
|
||||
// propagate linear monomials
|
||||
// propagate linear monomials, those that have all, or all but one, variables fixed
|
||||
lemmas.reset();
|
||||
m_lemma_vec = &lemmas;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue