3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-13 04:28:17 +00:00
This commit is contained in:
Nikolaj Bjorner 2023-10-25 16:38:18 -07:00
parent 20c54048f7
commit 4434cee5df
2 changed files with 80 additions and 81 deletions

View file

@ -18,6 +18,7 @@ namespace nra {
typedef nla::mon_eq mon_eq;
typedef nla::variable_map_type variable_map_type;
struct solver::imp {
lp::lar_solver& lra;
reslimit& m_limit;
@ -146,11 +147,12 @@ struct solver::imp {
throw;
}
}
#if 0
TRACE("nra",
m_nlsat->display(tout << r << "\n");
display(tout);
for (auto [j, x] : m_lp2nl) tout << "j" << j << " := x" << x << "\n";
);
for (auto [j, x] : m_lp2nl) tout << "j" << j << " := x" << x << "\n";);
#endif
switch (r) {
case l_true:
m_nla_core.set_use_nra_model(true);
@ -355,7 +357,7 @@ struct solver::imp {
for (lp::constraint_index ci : lra.constraints().indices())
if (!check_constraint(ci))
return l_undef;
for (auto const& m : m_nla_core.emons()) {
for (auto const& m : m_nla_core.emons())
if (!check_monic(m))
return l_undef;
break;
@ -376,7 +378,6 @@ struct solver::imp {
case l_undef:
break;
}
return r;
}
@ -422,7 +423,6 @@ struct solver::imp {
verbose_stream() << "x" << w << " <= " << lra.get_upper_bound(v) << "\n";
});
return r;
}
@ -445,7 +445,6 @@ struct solver::imp {
m_nlsat->mk_clause(1, &lit, a);
}
void add_lb(lp::impq const& b, unsigned w, nlsat::assumption a = nullptr) {
polynomial::manager& pm = m_nlsat->pm();
polynomial::polynomial_ref p(pm.mk_polynomial(w), pm);
@ -503,6 +502,8 @@ struct solver::imp {
return pm.add(lo, mp);
}
bool is_int(lp::var_index v) {
return lra.var_is_int(v);
}

View file

@ -19,8 +19,6 @@ namespace lp {
namespace nra {
class solver {
struct imp;
imp* m_imp;