3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-21 13:23:39 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-12-13 20:12:11 -08:00
commit 178211d091
4 changed files with 6 additions and 5 deletions

View file

@ -2294,8 +2294,8 @@ namespace sat {
// literal is no longer watched. // literal is no longer watched.
return l_undef; return l_undef;
} }
SASSERT(index <= bound); VERIFY(index <= bound);
SASSERT(c[index] == alit); VERIFY(c[index] == alit);
// find a literal to swap with: // find a literal to swap with:
for (unsigned i = bound + 1; i < sz; ++i) { for (unsigned i = bound + 1; i < sz; ++i) {

View file

@ -181,7 +181,7 @@ namespace sat {
for (bool_var v : to_elim) { for (bool_var v : to_elim) {
literal l(v, false); literal l(v, false);
literal r = roots[v]; literal r = roots[v];
SASSERT(v != r.var()); SASSERT(v != r.var());
if (m_solver.is_external(v)) { if (m_solver.is_external(v)) {
m_solver.set_root(l, r); m_solver.set_root(l, r);
// cannot really eliminate v, since we have to notify extension of future assignments // cannot really eliminate v, since we have to notify extension of future assignments

View file

@ -46,7 +46,7 @@ namespace sat {
UNREACHABLE(); UNREACHABLE();
throw solver_exception("flipping assumption"); throw solver_exception("flipping assumption");
} }
if (m_solver && m_solver->is_external(v)) { if (m_solver && m_solver->is_external(v) && m_solver->is_incremental()) {
std::cout << "flipping external v" << v << "\n"; std::cout << "flipping external v" << v << "\n";
UNREACHABLE(); UNREACHABLE();
throw solver_exception("flipping external"); throw solver_exception("flipping external");

View file

@ -970,11 +970,12 @@ namespace sat {
} }
void insert(literal l) { void insert(literal l) {
VERIFY(process_var(l.var()));
m_queue.insert(l); m_queue.insert(l);
} }
bool process_var(bool_var v) { bool process_var(bool_var v) {
return !s.s.is_assumption(v) && !s.was_eliminated(v) && !s.is_external(v); return !s.s.is_assumption(v) && !s.was_eliminated(v) && !s.is_external(v);
} }
void operator()() { void operator()() {