3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-05 02:40:24 +00:00

less nesting

This commit is contained in:
Jakob Rath 2023-10-23 11:46:25 +02:00
parent 38b0976adc
commit 64ac3596bd

View file

@ -1082,7 +1082,11 @@ namespace {
for (unsigned i = 0; i < lsb.length; i++) { for (unsigned i = 0; i < lsb.length; i++) {
lbool prev = fixed[i]; lbool prev = fixed[i];
fixed[i] = to_lbool(lsb.bits.get_bit(i)); fixed[i] = to_lbool(lsb.bits.get_bit(i));
if (prev != l_undef) { if (prev == l_undef) {
SASSERT(just_src[i].empty());
out_fbi.set_just(i, e1);
continue;
}
if (fixed[i] != prev) { if (fixed[i] != prev) {
// LOG("Positive parity conflicting " << e1->src << " with " << just_src[i][0]); // NOTE: just_src may be empty if the justification is by slicing // LOG("Positive parity conflicting " << e1->src << " with " << just_src[i][0]); // NOTE: just_src may be empty if the justification is by slicing
if (add_conflict) { if (add_conflict) {
@ -1092,18 +1096,11 @@ namespace {
} }
return false; return false;
} }
else {
// Prefer justifications from larger masks (less premises) // Prefer justifications from larger masks (less premises)
// TODO: Check that we don't override justifications comming from bit constraints // TODO: Check that we don't override justifications coming from bit constraints
if (largest_lsb < lsb.length) if (largest_lsb < lsb.length)
out_fbi.set_just(i, e1); out_fbi.set_just(i, e1);
} }
}
else {
SASSERT(just_src[i].empty());
out_fbi.set_just(i, e1);
}
}
largest_lsb = std::max(largest_lsb, lsb.length); largest_lsb = std::max(largest_lsb, lsb.length);
} }
else else