3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 18:31:49 +00:00

handle div 0 cases as it is uninterpreted #1683

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-05-24 07:00:56 +04:00
parent e49e5d7145
commit 8243139fb0

View file

@ -476,7 +476,7 @@ class theory_lra::imp {
internalize_eq(v, v1);
}
else if (a.is_idiv(n, n1, n2)) {
if (!a.is_numeral(n2, r) || r.is_zero()) found_not_handled(n);
if (!a.is_numeral(n2, r)) found_not_handled(n);
m_idiv_terms.push_back(n);
app * mod = a.mk_mod(n1, n2);
ctx().internalize(mod, false);
@ -486,11 +486,11 @@ class theory_lra::imp {
if (!ctx().relevancy()) mk_idiv_mod_axioms(n1, n2);
}
else if (a.is_rem(n, n1, n2)) {
if (!a.is_numeral(n2, r) || r.is_zero()) found_not_handled(n);
if (!a.is_numeral(n2, r)) found_not_handled(n);
if (!ctx().relevancy()) mk_rem_axiom(n1, n2);
}
else if (a.is_div(n, n1, n2)) {
if (!a.is_numeral(n2, r) || r.is_zero()) found_not_handled(n);
if (!a.is_numeral(n2, r)) found_not_handled(n);
if (!ctx().relevancy()) mk_div_axiom(n1, n2);
}
else if (a.is_power(n)) {