3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-25 12:35:59 +00:00
This commit is contained in:
Nikolaj Bjorner 2021-12-14 19:42:19 -08:00
parent 134831283f
commit 79bc33b88e
4 changed files with 10 additions and 8 deletions

View file

@ -28,11 +28,13 @@ namespace polysat {
}
lbool shr_constraint::eval(pdd const& p, pdd const& q, pdd const& r) const {
if (p.is_val() && r.is_val()) {
if (p.val() >= p.manager().power_of_2())
if (q.is_val() && r.is_val()) {
auto& m = p.manager();
if (q.val() >= m.power_of_2())
return r.is_zero() ? l_true : l_false;
if (r.is_val()) {
// todo
if (p.is_val()) {
pdd rr = p * m.mk_val(rational::power_of_two(q.val().get_unsigned()));
return rr == r ? l_true : l_false;
}
// other cases when we know lower
// bound of q, e.g, q = 2^k*q1 + q2, where q2 is a constant.