mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 12:08:18 +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:
parent
b81ab94db7
commit
a34c5a9450
|
@ -1285,7 +1285,7 @@ lbool core::incremental_linearization(bool constraint_derived) {
|
||||||
SASSERT(elists_are_consistent(true));
|
SASSERT(elists_are_consistent(true));
|
||||||
if (search_level == 1) {
|
if (search_level == 1) {
|
||||||
m_order.order_lemma();
|
m_order.order_lemma();
|
||||||
} else { // search_level == 2
|
} else if (search_level == 2) {
|
||||||
m_monotone. monotonicity_lemma();
|
m_monotone. monotonicity_lemma();
|
||||||
m_tangents.tangent_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 {
|
bool core::patch_blocker(lpvar u, const monic& m) const {
|
||||||
SASSERT(m_to_refine.contains(m.var()));
|
SASSERT(m_to_refine.contains(m.var()));
|
||||||
if (var_is_used_in_a_correct_monic(u)) {
|
if (var_is_used_in_a_correct_monic(u)) {
|
||||||
|
|
|
@ -424,6 +424,8 @@ public:
|
||||||
bool try_to_patch(lpvar, const rational&, const monic&);
|
bool try_to_patch(lpvar, const rational&, const monic&);
|
||||||
bool to_refine_is_correct() const;
|
bool to_refine_is_correct() const;
|
||||||
bool patch_blocker(lpvar u, const monic& m) 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
|
}; // end of core
|
||||||
|
|
||||||
struct pp_mon {
|
struct pp_mon {
|
||||||
|
|
|
@ -37,6 +37,8 @@ void monotone::monotonicity_lemma(monic const& m) {
|
||||||
SASSERT(!check_monic(m));
|
SASSERT(!check_monic(m));
|
||||||
if (c().mon_has_zero(m.vars()))
|
if (c().mon_has_zero(m.vars()))
|
||||||
return;
|
return;
|
||||||
|
if (c().has_big_num(m))
|
||||||
|
return;
|
||||||
const rational prod_val = abs(c().product_value(m));
|
const rational prod_val = abs(c().product_value(m));
|
||||||
const rational m_val = abs(var_val(m));
|
const rational m_val = abs(var_val(m));
|
||||||
if (m_val < prod_val)
|
if (m_val < prod_val)
|
||||||
|
|
Loading…
Reference in a new issue