mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 13:28:47 +00:00
move monomial propagation from theory_lra to nla_solver
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
d2c0f7dba7
commit
896aba31f8
|
@ -108,4 +108,10 @@ namespace nla {
|
||||||
return m_core->lemmas();
|
return m_core->lemmas();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void solver::propagate_bounds_for_touched_monomials() {
|
||||||
|
init_bound_propagation();
|
||||||
|
for (unsigned v : monics_with_changed_bounds())
|
||||||
|
calculate_implied_bounds_for_monic(v);
|
||||||
|
reset_monics_with_changed_bounds();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,6 @@ namespace nla {
|
||||||
void calculate_implied_bounds_for_monic(lp::lpvar v);
|
void calculate_implied_bounds_for_monic(lp::lpvar v);
|
||||||
void init_bound_propagation();
|
void init_bound_propagation();
|
||||||
vector<nla::lemma> const& lemmas() const;
|
vector<nla::lemma> const& lemmas() const;
|
||||||
|
void propagate_bounds_for_touched_monomials();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2199,12 +2199,8 @@ public:
|
||||||
finish_bound_propagation();
|
finish_bound_propagation();
|
||||||
}
|
}
|
||||||
|
|
||||||
void propagate_bounds_for_touched_monomials() {
|
void propagate_bounds_for_monomials() {
|
||||||
m_nla->init_bound_propagation();
|
m_nla->propagate_bounds_for_touched_monomials();
|
||||||
for (unsigned v : m_nla->monics_with_changed_bounds())
|
|
||||||
m_nla->calculate_implied_bounds_for_monic(v);
|
|
||||||
|
|
||||||
m_nla->reset_monics_with_changed_bounds();
|
|
||||||
for (const auto & l : m_nla->lemmas())
|
for (const auto & l : m_nla->lemmas())
|
||||||
false_case_of_check_nla(l);
|
false_case_of_check_nla(l);
|
||||||
}
|
}
|
||||||
|
@ -2215,8 +2211,7 @@ public:
|
||||||
if (is_infeasible() || !should_propagate())
|
if (is_infeasible() || !should_propagate())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_bp.init();
|
propagate_bounds_for_monomials();
|
||||||
propagate_bounds_for_touched_monomials();
|
|
||||||
|
|
||||||
if (m.inc())
|
if (m.inc())
|
||||||
finish_bound_propagation();
|
finish_bound_propagation();
|
||||||
|
|
Loading…
Reference in a new issue