3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-13 20:38:43 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-03-31 14:10:39 -07:00
parent 55c285c0df
commit 6635f92842
2 changed files with 7 additions and 4 deletions

View file

@ -490,7 +490,7 @@ namespace sat {
break;
}
case ba_solver::xr_t:
NOT_IMPLEMENTED_YET();
throw default_exception("local search is incompatible with enabling xor solving");
break;
}
}

View file

@ -1278,8 +1278,12 @@ namespace sat {
lbool solver::invoke_local_search(unsigned num_lits, literal const* lits) {
literal_vector _lits(num_lits, lits);
for (literal lit : m_user_scope_literals) _lits.push_back(~lit);
SASSERT(m_local_search);
scoped_ptr<i_local_search> _ptr = m_local_search;
struct scoped_ls {
solver& s;
scoped_ls(solver& s): s(s) {}
~scoped_ls() { dealloc(s.m_local_search); s.m_local_search = nullptr; }
};
scoped_ls _ls(*this);
if (inconsistent()) return l_false;
scoped_limits scoped_rl(rlimit());
SASSERT(m_local_search);
@ -1291,7 +1295,6 @@ namespace sat {
m_model = m_local_search->get_model();
m_model_is_current = true;
}
m_local_search = nullptr;
return r;
}