From fad4356159b59b82bd6031541fa81085b03e5e17 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Sun, 24 Nov 2019 10:52:52 -0800 Subject: [PATCH] treat division by 0 as non-linearity, fix #2733 Signed-off-by: Nikolaj Bjorner --- src/smt/theory_lra.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/smt/theory_lra.cpp b/src/smt/theory_lra.cpp index 3e9fc283b..64e233069 100644 --- a/src/smt/theory_lra.cpp +++ b/src/smt/theory_lra.cpp @@ -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)) found_not_handled(n); + if (!a.is_numeral(n2, r) || r.is_zero()) 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)) found_not_handled(n); + if (!a.is_numeral(n2, r) || r.is_zero()) 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)) found_not_handled(n); + if (!a.is_numeral(n2, r) || r.is_zero()) found_not_handled(n); if (!ctx().relevancy()) mk_div_axiom(n1, n2); } else if (a.is_power(n)) {