mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
check the lar_solver status more often
Signed-off-by: Lev <levnach@hotmail.com>
This commit is contained in:
parent
c95f2a5bc6
commit
efeeabe127
2 changed files with 39 additions and 8 deletions
|
@ -839,12 +839,26 @@ struct solver::imp {
|
|||
m_expl->clear();
|
||||
m_lemma->clear();
|
||||
}
|
||||
|
||||
bool order_lemma(const unsigned_vector& to_refine) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool monotonicity_lemma(const unsigned_vector& to_refine) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool tangent_lemma(const unsigned_vector& to_refine) {
|
||||
return false;
|
||||
}
|
||||
|
||||
lbool check(lp::explanation & exp, lemma& l) {
|
||||
TRACE("nla_solver", tout << "check of nla";);
|
||||
m_expl = &exp;
|
||||
m_lemma = &l;
|
||||
lp_assert(m_lar_solver.get_status() == lp::lp_status::OPTIMAL);
|
||||
|
||||
if (m_lar_solver.get_status() != lp::lp_status::OPTIMAL)
|
||||
return l_undef;
|
||||
unsigned_vector to_refine;
|
||||
for (unsigned i = 0; i < m_monomials.size(); i++) {
|
||||
if (!check_monomial(m_monomials[i]))
|
||||
|
@ -857,14 +871,29 @@ struct solver::imp {
|
|||
TRACE("nla_solver", tout << "to_refine.size() = " << to_refine.size() << std::endl;);
|
||||
|
||||
init_search();
|
||||
|
||||
if (basic_lemma(to_refine)) {
|
||||
return l_false;
|
||||
}
|
||||
|
||||
return l_undef;
|
||||
for (int search_level = 0; search_level < 3; search_level++) {
|
||||
if (search_level == 0) {
|
||||
if (basic_lemma(to_refine)) {
|
||||
return l_false;
|
||||
}
|
||||
} else if (search_level == 1) {
|
||||
if (order_lemma(to_refine)) {
|
||||
return l_false;
|
||||
}
|
||||
} else { // search_level == 3
|
||||
if (monotonicity_lemma(to_refine)) {
|
||||
return l_false;
|
||||
}
|
||||
|
||||
if (tangent_lemma(to_refine)) {
|
||||
return l_false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return l_undef;
|
||||
}
|
||||
|
||||
void test_factorization(unsigned mon_index, unsigned number_of_factorizations) {
|
||||
vector<ineq> lemma;
|
||||
m_lemma = & lemma;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue