3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-22 11:07:51 +00:00

move extract saturation as an axiom

This commit is contained in:
Nikolaj Bjorner 2023-12-24 05:15:59 -08:00
parent 50358e43ed
commit cf6d7d2c4b
9 changed files with 34 additions and 394 deletions

View file

@ -45,9 +45,6 @@ namespace polysat {
else if (sc.is_umul_ovfl())
try_umul_ovfl(v, umul_ovfl(id, sc));
if (!c.inconsistent())
try_nonzero_upper_extract(v);
return c.inconsistent();
}
@ -194,24 +191,6 @@ namespace polysat {
}
}
void saturation::try_nonzero_upper_extract(pvar y) {
rational r;
if (!c.try_eval(c.var(y), r) || !r.is_zero())
return;
auto& C = c.cs();
offset_slices slices;
c.get_subslices(y, slices);
for (auto const& [x, offset] : slices) {
if (c.inconsistent())
break;
offset_claim cl = { x, y, offset};
dependency d = dependency(cl, 0); // scope gets computed by polysat_solver
pdd px = c.var(x);
pdd py = c.var(y);
add_clause("y = x[h:l] & y != 0 => x >= 2^l", { d, C.eq(py), C.uge(px, rational::power_of_two(offset))}, true);
}
}
// Ovfl(x, y) & ~Ovfl(y, z) ==> x > z
void saturation::try_umul_ovfl(pvar v, umul_ovfl const& sc) {