3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-24 03:57:51 +00:00
This commit is contained in:
Jakob Rath 2021-09-10 14:19:39 +02:00
parent 2b6ae0070f
commit 8a1a202133
4 changed files with 20 additions and 14 deletions

View file

@ -110,8 +110,11 @@ namespace polysat {
bool ule_constraint::is_currently_true(solver& s, bool is_positive) {
auto p = lhs().subst_val(s.assignment());
auto q = rhs().subst_val(s.assignment());
if (is_positive)
if (is_positive) {
if (p.is_zero())
return true;
return p.is_val() && q.is_val() && p.val() <= q.val();
}
else
return p.is_val() && q.is_val() && p.val() > q.val();
}