3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-03-23 12:59:12 +00:00
This commit is contained in:
Nikolaj Bjorner 2023-12-29 18:11:40 -08:00
parent 03e012c1d8
commit 78f32401ac
6 changed files with 66 additions and 58 deletions

View file

@ -107,20 +107,28 @@ namespace polysat {
m_num_bits = c.size(v);
m_fixed_bits.reset(v);
init_overlaps(v);
rational const& max_value = c.var2pdd(v).max_value();
val1 = 0;
bool start_at0 = val1 == 0;
lbool r = next_viable(val1);
TRACE("bv", display_state(tout); display(tout << "next viable v" << v << " " << val1 << " " << r << "\n"));
if (r == l_false && !start_at0) {
val1 = 0;
r = next_viable(val1);
}
if (r != l_true)
return r;
if (val1 == max_value) {
val2 = val1;
return l_true;
if (val1 == c.var2pdd(v).max_value()) {
if (start_at0) {
val2 = val1;
return l_true;
}
else
val2 = 0;
}
val2 = val1 + 1;
else
val2 = val1 + 1;
r = next_viable(val2);