mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 11:55:51 +00:00
hoist out fixed-bits reasoning into self-contained module
without dependencies on viable entries
This commit is contained in:
parent
658f079efd
commit
b1072d0a1c
8 changed files with 183 additions and 158 deletions
|
@ -223,6 +223,18 @@ namespace polysat {
|
|||
level = std::max(level, s().lvl(lit));
|
||||
return level;
|
||||
}
|
||||
else if (d.is_fixed_claim()) {
|
||||
auto const& f = d.fixed();
|
||||
sat::literal_vector lits;
|
||||
std::function<void(euf::enode*, euf::enode*)> consume = [&](auto* a, auto* b) {
|
||||
ctx.get_eq_antecedents(a, b, lits);
|
||||
};
|
||||
explain_fixed(f.v, f.lo, f.hi, f.value, consume);
|
||||
unsigned level = 0;
|
||||
for (auto lit : lits)
|
||||
level = std::max(level, s().lvl(lit));
|
||||
return level;
|
||||
}
|
||||
else {
|
||||
SASSERT(d.is_axiom());
|
||||
return 0;
|
||||
|
@ -281,6 +293,13 @@ namespace polysat {
|
|||
};
|
||||
explain_slice(v, w, offset, consume);
|
||||
}
|
||||
else if (d.is_fixed_claim()) {
|
||||
auto const& f = d.fixed();
|
||||
std::function<void(euf::enode*, euf::enode*)> consume = [&](auto* a, auto* b) {
|
||||
lits.push_back(~eq_internalize(a, b));
|
||||
};
|
||||
explain_fixed(f.v, f.lo, f.hi, f.value, consume);
|
||||
}
|
||||
else {
|
||||
SASSERT(d.is_axiom());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue