mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
nra to nla
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
e32a6714a5
commit
279d55a2c7
4 changed files with 90 additions and 13 deletions
|
@ -38,7 +38,7 @@ lbool solver::check(vector<lemma>& l, lp::explanation& expl) {
|
|||
lbool ret = m_core->check(l);
|
||||
if (ret == l_undef) {
|
||||
ret = run_nra(expl);
|
||||
if (ret == l_true) {
|
||||
if (ret == l_true || expl.size() > 0) {
|
||||
set_use_nra_model(true);
|
||||
}
|
||||
}
|
||||
|
@ -67,6 +67,9 @@ solver::~solver() {
|
|||
|
||||
std::ostream& solver::display(std::ostream& out) const {
|
||||
m_core->print_monics(out);
|
||||
if( use_nra_model()) {
|
||||
return m_nra.display(out);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,5 +44,10 @@ public:
|
|||
std::ostream& display(std::ostream& out) const;
|
||||
bool use_nra_model() const { return m_use_nra_model; }
|
||||
core& get_core() { return *m_core; }
|
||||
nlsat::anum_manager& am() { return m_nra.am(); }
|
||||
nlsat::anum const& am_value(lp::var_index v) const {
|
||||
SASSERT(use_nra_model());
|
||||
return m_nra.value(v);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -82,10 +82,10 @@ struct solver::imp {
|
|||
add_constraint(ci);
|
||||
}
|
||||
|
||||
// // add polynomial definitions.
|
||||
// for (auto const& m : m_monics) {
|
||||
// add_monic_eq(m);
|
||||
// }
|
||||
// add polynomial definitions.
|
||||
for (auto const& m : m_nla_core.emons()) {
|
||||
add_monic_eq(m);
|
||||
}
|
||||
// TBD: add variable bounds?
|
||||
|
||||
lbool r = l_undef;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue