3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-03 09:50:23 +00:00

fix bugs in scc_tr

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-03-25 14:55:42 -07:00
parent bfc0b214ab
commit a79400a01b
7 changed files with 83 additions and 41 deletions

View file

@ -117,19 +117,13 @@ namespace sat {
else {
unsigned new_sz = j;
CTRACE("sat_cleaner_bug", new_sz < 2, tout << "new_sz: " << new_sz << "\n";
if (c.size() > 0) tout << "unit: " << c[0] << "\n";);
SASSERT(c.frozen() || new_sz >= 2);
if (c.size() > 0) tout << "unit: " << c[0] << "\n";
s.display_watches(tout););
if (new_sz == 0) {
// It can only happen with frozen clauses.
// active clauses would have signed the conflict.
SASSERT(c.frozen());
s.set_conflict(justification());
s.del_clause(c);
}
else if (new_sz == 1) {
// It can only happen with frozen clauses.
// active clauses would have propagated the literal
SASSERT(c.frozen());
s.assign(c[0], justification());
s.del_clause(c);
}
@ -188,6 +182,7 @@ namespace sat {
CASSERT("cleaner_bug", s.check_invariant());
unsigned trail_sz = s.m_trail.size();
s.propagate(false); // make sure that everything was propagated.
TRACE("sat_cleaner_bug", s.display(tout); s.display_watches(tout););
if (s.m_inconsistent)
return false;
if (m_last_num_units == trail_sz)