3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-22 16:45:31 +00:00

Fix in spacer_term_graph

This commit is contained in:
Arie Gurfinkel 2017-12-27 13:01:54 -05:00
parent 068b77d43a
commit 46fb0d928a

View file

@ -157,7 +157,7 @@ public:
result = mk_le_zero(arg1);
return true;
}
else if (m_arith.is_numeral(arg2, n)) {
else if (m_arith.is_int(arg1) && m_arith.is_numeral(arg2, n) && n < 0) {
// t <= n ==> t < n + 1 ==> ! (t >= n + 1)
result = m.mk_not(m_arith.mk_ge(arg1, m_arith.mk_numeral(n+1, true)));
return true;
@ -182,7 +182,7 @@ public:
result = mk_ge_zero(arg1);
return true;
}
else if (m_arith.is_numeral(arg2, n)) {
else if (m_arith.is_int(arg1) && m_arith.is_numeral(arg2, n) && n > 0) {
// t >= n ==> t > n - 1 ==> ! (t <= n - 1)
result = m.mk_not(m_arith.mk_le(arg1, m_arith.mk_numeral(n-1, true)));
return true;