mirror of
https://github.com/Z3Prover/z3
synced 2025-06-27 08:28:44 +00:00
update ule_constraint::is_currently_true
This commit is contained in:
parent
8d803a1266
commit
79c82a3d97
1 changed files with 1 additions and 9 deletions
|
@ -229,15 +229,7 @@ namespace polysat {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ule_constraint::is_currently_true(solver& s, bool is_positive) const {
|
bool ule_constraint::is_currently_true(solver& s, bool is_positive) const {
|
||||||
auto p = s.subst(lhs());
|
return is_currently_false(s, !is_positive);
|
||||||
auto q = s.subst(rhs());
|
|
||||||
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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inequality ule_constraint::as_inequality(bool is_positive) const {
|
inequality ule_constraint::as_inequality(bool is_positive) const {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue