mirror of
https://github.com/Z3Prover/z3
synced 2025-04-22 16:45:31 +00:00
Fix to bench15 bug was unsound
This commit is contained in:
parent
f0625b604a
commit
975fb25221
1 changed files with 13 additions and 2 deletions
|
@ -1174,7 +1174,18 @@ namespace polysat {
|
|||
LOG((clause.is_redundant() ? "Lemma: ": "Aux: ") << clause);
|
||||
for (sat::literal lit : clause) {
|
||||
LOG(" " << lit_pp(*this, lit));
|
||||
// SASSERT(m_bvars.value(lit) != l_true);
|
||||
if (!m_bvars.is_assigned(lit)) {
|
||||
switch (lit2cnstr(lit).eval(*this)) {
|
||||
case l_true:
|
||||
assign_eval(lit);
|
||||
break;
|
||||
case l_false:
|
||||
assign_eval(~lit);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
// it could be that such a literal has been created previously but we don't detect it when e.g. narrowing a mul_ovfl_constraint
|
||||
if (m_bvars.value(lit) == l_true) {
|
||||
// in this case the clause is useless
|
||||
|
@ -1225,7 +1236,7 @@ namespace polysat {
|
|||
clause_ref solver::mk_clause(unsigned n, signed_constraint const* cs, bool is_redundant) {
|
||||
clause_builder cb(*this);
|
||||
for (unsigned i = 0; i < n; ++i)
|
||||
cb.insert_try_eval(cs[i]);
|
||||
cb.insert(cs[i]);
|
||||
cb.set_redundant(is_redundant);
|
||||
return cb.build();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue