3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-13 12:28:44 +00:00

fix crash regression

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-12-13 18:03:25 -08:00
parent d1854ab4d2
commit 209d31346b
2 changed files with 5 additions and 4 deletions

View file

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

View file

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