mirror of
https://github.com/Z3Prover/z3
synced 2025-04-28 19:35:50 +00:00
hook up nla_solver it lp bound propagation
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
33cbd29ed0
commit
9c18ede687
11 changed files with 177 additions and 93 deletions
|
@ -31,6 +31,10 @@ void solver::add_monomial(lpvar v, unsigned sz, lpvar const* vs) {
|
|||
m_core->add(v, sz, vs);
|
||||
}
|
||||
|
||||
bool solver::is_monomial_var(lpvar v) const {
|
||||
return m_core->is_monomial_var(v);
|
||||
}
|
||||
|
||||
bool solver::need_check() { return true; }
|
||||
|
||||
lbool solver::check(vector<lemma>& l) {
|
||||
|
@ -57,5 +61,21 @@ solver::solver(lp::lar_solver& s) {
|
|||
solver::~solver() {
|
||||
dealloc(m_core);
|
||||
}
|
||||
lp::impq solver::get_upper_bound(lpvar j) const {
|
||||
SASSERT(is_monomial_var(j) && m_core->monomial_has_upper_bound(j));
|
||||
return m_core->get_upper_bound_of_monomial(j);
|
||||
}
|
||||
|
||||
lp::impq solver::get_lower_bound(lpvar j) const {
|
||||
SASSERT(is_monomial_var(j) && m_core->monomial_has_lower_bound(j));
|
||||
return m_core->get_lower_bound_of_monomial(j);
|
||||
}
|
||||
|
||||
bool solver::monomial_has_lower_bound(lpvar j) const {
|
||||
return m_core->monomial_has_lower_bound(j);
|
||||
}
|
||||
bool solver::monomial_has_upper_bound(lpvar j) const {
|
||||
return m_core->monomial_has_upper_bound(j);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue