3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 09:34:08 +00:00

bail out on big rational numbers in nla monotone lemmas

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2020-05-04 14:21:48 -07:00
parent b81ab94db7
commit a34c5a9450
3 changed files with 20 additions and 1 deletions

View file

@ -1285,7 +1285,7 @@ lbool core::incremental_linearization(bool constraint_derived) {
SASSERT(elists_are_consistent(true));
if (search_level == 1) {
m_order.order_lemma();
} else { // search_level == 2
} else if (search_level == 2) {
m_monotone. monotonicity_lemma();
m_tangents.tangent_lemma();
}
@ -1370,6 +1370,21 @@ void core::update_to_refine_of_var(lpvar j) {
}
}
bool core::var_is_big(lpvar j) const {
if (var_is_int(j))
return false;
return val(j).is_big();
}
bool core::has_big_num(const monic& m) const {
if (var_is_big(var(m)))
return true;
for (lpvar j : m.vars())
if (var_is_big(j))
return true;
return false;
}
bool core::patch_blocker(lpvar u, const monic& m) const {
SASSERT(m_to_refine.contains(m.var()));
if (var_is_used_in_a_correct_monic(u)) {

View file

@ -424,6 +424,8 @@ public:
bool try_to_patch(lpvar, const rational&, const monic&);
bool to_refine_is_correct() const;
bool patch_blocker(lpvar u, const monic& m) const;
bool has_big_num(const monic&) const;
bool var_is_big(lpvar) const;
}; // end of core
struct pp_mon {

View file

@ -37,6 +37,8 @@ void monotone::monotonicity_lemma(monic const& m) {
SASSERT(!check_monic(m));
if (c().mon_has_zero(m.vars()))
return;
if (c().has_big_num(m))
return;
const rational prod_val = abs(c().product_value(m));
const rational m_val = abs(var_val(m));
if (m_val < prod_val)