mirror of
https://github.com/Z3Prover/z3
synced 2025-11-09 23:52:02 +00:00
Several changes:
- Extend fixed-bit FI to both directions - really randomized restart - MSB for fixed-bits - Forward propagation (band, lshift, rshift) with good justifications (strengthen during saturation)
This commit is contained in:
parent
5a8c0ce9c0
commit
5b35450891
18 changed files with 539 additions and 1588 deletions
|
|
@ -63,6 +63,9 @@ namespace polysat {
|
|||
if (c->is_umul_ovfl())
|
||||
return try_umul_ovfl(v, c, core);
|
||||
|
||||
if (c->is_op())
|
||||
return try_op(v, c, core);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -222,6 +225,30 @@ namespace polysat {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool saturation::try_op(pvar v, signed_constraint c, conflict& core) {
|
||||
SASSERT(c->is_op());
|
||||
SASSERT(c.is_positive());
|
||||
return false;
|
||||
op_constraint* op = ((op_constraint*)c.get());
|
||||
clause_ref correction = op->produce_lemma(s, s.get_assignment(), c.is_positive());
|
||||
if (correction) {
|
||||
IF_LOGGING(
|
||||
LOG("correcting op_constraint: " << *correction);
|
||||
for (sat::literal lit : *correction) {
|
||||
LOG("\t" << lit_pp(s, lit));
|
||||
}
|
||||
);
|
||||
|
||||
for (const sat::literal& l : *correction)
|
||||
if (!s.m_bvars.is_assigned(l))
|
||||
s.assign_eval(~l);
|
||||
core.add_lemma(correction);
|
||||
log_lemma(v, core);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
signed_constraint saturation::ineq(bool is_strict, pdd const& lhs, pdd const& rhs) {
|
||||
if (is_strict)
|
||||
return s.ult(lhs, rhs);
|
||||
|
|
@ -1028,7 +1055,7 @@ namespace polysat {
|
|||
return false;
|
||||
m_lemma.insert_eval(~c);
|
||||
}
|
||||
return propagate(x, core, axb_l_y, s.f());
|
||||
return propagate(x, core, axb_l_y, s.f()); // TODO: Conflict overload
|
||||
};
|
||||
|
||||
vector<signed_constraint> at_least_x, at_most_x, at_least_b, at_most_b, at_least_a, at_most_a;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue