mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
work on niil
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
91086baa54
commit
92b5a9b134
4 changed files with 17 additions and 23 deletions
|
@ -59,7 +59,7 @@ struct solver::imp {
|
|||
return r == model_val;
|
||||
}
|
||||
|
||||
lbool check(lp::explanation_t& ex) {
|
||||
lbool check(lemma& ) {
|
||||
lp_assert(m_lar_solver.get_status() == lp::lp_status::OPTIMAL);
|
||||
svector<unsigned> to_refine;
|
||||
for (unsigned i = 0; i < m_monomials.size(); i++) {
|
||||
|
@ -80,8 +80,8 @@ void solver::add_monomial(lp::var_index v, unsigned sz, lp::var_index const* vs)
|
|||
|
||||
bool solver::need_check() { return true; }
|
||||
|
||||
lbool solver::check(lp::explanation_t& ex) {
|
||||
return m_imp->check(ex);
|
||||
lbool solver::check(lemma& l) {
|
||||
return m_imp->check(l);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -25,6 +25,13 @@ Revision History:
|
|||
#include "nlsat/nlsat_solver.h"
|
||||
#include "util/lp/lar_solver.h"
|
||||
namespace niil {
|
||||
struct ineq {
|
||||
lp::lconstraint_kind m_cmp;
|
||||
lp::lar_term m_term;
|
||||
};
|
||||
|
||||
typedef vector<ineq> lemma;
|
||||
|
||||
// nonlinear integer incremental linear solver
|
||||
class solver {
|
||||
public:
|
||||
|
@ -37,6 +44,6 @@ public:
|
|||
void push();
|
||||
void pop(unsigned scopes);
|
||||
bool need_check();
|
||||
lbool check(lp::explanation_t& ex);
|
||||
lbool check(lemma&);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -27,9 +27,7 @@ Revision History:
|
|||
|
||||
namespace lp {
|
||||
|
||||
enum lconstraint_kind {
|
||||
LE = -2, LT = -1 , GE = 2, GT = 1, EQ = 0
|
||||
};
|
||||
enum lconstraint_kind { LE = -2, LT = -1 , GE = 2, GT = 1, EQ = 0, NE = 3 };
|
||||
|
||||
|
||||
inline bool kind_is_strict(lconstraint_kind kind) { return kind == LT || kind == GT;}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue