mirror of
https://github.com/Z3Prover/z3
synced 2025-04-13 12:28:44 +00:00
hook up nla_solver it lp bound propagation
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
9c18ede687
commit
58003f9f97
|
@ -197,6 +197,8 @@ public:
|
|||
|
||||
void set(interval & t, interval const & s);
|
||||
|
||||
void set(interval & t, numeral const& n);
|
||||
|
||||
bool eq(interval const & a, interval const & b) const;
|
||||
|
||||
/**
|
||||
|
@ -234,11 +236,6 @@ public:
|
|||
|
||||
bool check_invariant(interval const & n) const;
|
||||
|
||||
/**
|
||||
\brief b <- k
|
||||
*/
|
||||
void set(numeral const& k, interval & b);
|
||||
|
||||
/**
|
||||
\brief b <- -a
|
||||
*/
|
||||
|
|
|
@ -662,16 +662,6 @@ bool interval_manager<C>::check_invariant(interval const & n) const {
|
|||
return true;
|
||||
}
|
||||
|
||||
template<typename C>
|
||||
void interval_manager<C>::set(numeral const& k, interval & b) {
|
||||
set_lower_is_inf(b, false);
|
||||
set_upper_is_inf(b, false);
|
||||
m().set(lower(b), k);
|
||||
m().set(upper(b), k);
|
||||
set_lower_is_open(b, false);
|
||||
set_upper_is_open(b, false);
|
||||
}
|
||||
|
||||
template<typename C>
|
||||
void interval_manager<C>::set(interval & t, interval const & s) {
|
||||
if (&t == &const_cast<interval&>(s))
|
||||
|
@ -695,6 +685,17 @@ void interval_manager<C>::set(interval & t, interval const & s) {
|
|||
SASSERT(check_invariant(t));
|
||||
}
|
||||
|
||||
template<typename C>
|
||||
void interval_manager<C>::set(interval & t, numeral const& n) {
|
||||
m().set(lower(t), n);
|
||||
set_lower_is_inf(t, false);
|
||||
m().set(upper(t), n);
|
||||
set_upper_is_inf(t, false);
|
||||
set_lower_is_open(t, false);
|
||||
set_upper_is_open(t, false);
|
||||
SASSERT(check_invariant(t));
|
||||
}
|
||||
|
||||
template<typename C>
|
||||
bool interval_manager<C>::eq(interval const & a, interval const & b) const {
|
||||
return
|
||||
|
|
|
@ -28,6 +28,7 @@ z3_add_component(lp
|
|||
nla_basics_lemmas.cpp
|
||||
nla_common.cpp
|
||||
nla_core.cpp
|
||||
nla_intervals.cpp
|
||||
nla_monotone_lemmas.cpp
|
||||
nla_order_lemmas.cpp
|
||||
nla_solver.cpp
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
#include "math/lp/lar_solver.h"
|
||||
#include "math/lp/nla_solver.h"
|
||||
#include "math/lp/nla_intervals.h"
|
||||
namespace lp {
|
||||
|
||||
lp_bound_propagator::lp_bound_propagator(lar_solver & ls, nla::solver* nla):
|
||||
|
|
Loading…
Reference in a new issue