mirror of
https://github.com/Z3Prover/z3
synced 2025-05-12 02:04:43 +00:00
use assert instead of explicit check
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
efbb382646
commit
60972de562
3 changed files with 7 additions and 12 deletions
|
@ -109,12 +109,11 @@ namespace polysat {
|
|||
|
||||
bool ule_constraint::is_always_false(pdd const& lhs, pdd const& rhs) {
|
||||
// TODO: other conditions (e.g. when forbidden interval would be full)
|
||||
VERIFY(!is_undef());
|
||||
if (is_positive())
|
||||
return lhs.is_val() && rhs.is_val() && !(lhs.val() <= rhs.val());
|
||||
if (is_negative())
|
||||
else
|
||||
return lhs.is_val() && rhs.is_val() && !(lhs.val() > rhs.val());
|
||||
UNREACHABLE();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ule_constraint::is_always_false() {
|
||||
|
@ -130,12 +129,11 @@ namespace polysat {
|
|||
bool ule_constraint::is_currently_true(solver& s) {
|
||||
auto p = lhs().subst_val(s.m_search);
|
||||
auto q = rhs().subst_val(s.m_search);
|
||||
VERIFY(!is_undef());
|
||||
if (is_positive())
|
||||
return p.is_val() && q.is_val() && p.val() <= q.val();
|
||||
if (is_negative())
|
||||
else
|
||||
return p.is_val() && q.is_val() && p.val() > q.val();
|
||||
UNREACHABLE();
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue