3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-12-15 08:48:58 +00:00

We only need one of is_true/is_false

This commit is contained in:
Jakob Rath 2022-09-29 17:19:47 +02:00
parent 79c82a3d97
commit 6218931dde
8 changed files with 8 additions and 38 deletions

View file

@ -70,26 +70,17 @@ namespace polysat {
}
bool umul_ovfl_constraint::is_always_true(bool is_positive, pdd const& p, pdd const& q) const {
switch (eval(p, q)) {
case l_true: return is_positive;
case l_false: return !is_positive;
default: return false;
}
return is_always_false(!is_positive, p, q);
}
bool umul_ovfl_constraint::is_always_false(bool is_positive) const {
return is_always_false(is_positive, m_p, m_q);
}
bool umul_ovfl_constraint::is_currently_false(solver& s, bool is_positive) const {
return is_always_false(is_positive, s.subst(p()), s.subst(q()));
}
bool umul_ovfl_constraint::is_currently_true(solver& s, bool is_positive) const {
return is_always_true(is_positive, s.subst(p()), s.subst(q()));
}
void umul_ovfl_constraint::narrow(solver& s, bool is_positive, bool first) {
auto p1 = s.subst(p());
auto q1 = s.subst(q());