mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 13:28:47 +00:00
parent
55c285c0df
commit
6635f92842
|
@ -490,7 +490,7 @@ namespace sat {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ba_solver::xr_t:
|
case ba_solver::xr_t:
|
||||||
NOT_IMPLEMENTED_YET();
|
throw default_exception("local search is incompatible with enabling xor solving");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1278,8 +1278,12 @@ namespace sat {
|
||||||
lbool solver::invoke_local_search(unsigned num_lits, literal const* lits) {
|
lbool solver::invoke_local_search(unsigned num_lits, literal const* lits) {
|
||||||
literal_vector _lits(num_lits, lits);
|
literal_vector _lits(num_lits, lits);
|
||||||
for (literal lit : m_user_scope_literals) _lits.push_back(~lit);
|
for (literal lit : m_user_scope_literals) _lits.push_back(~lit);
|
||||||
SASSERT(m_local_search);
|
struct scoped_ls {
|
||||||
scoped_ptr<i_local_search> _ptr = m_local_search;
|
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;
|
if (inconsistent()) return l_false;
|
||||||
scoped_limits scoped_rl(rlimit());
|
scoped_limits scoped_rl(rlimit());
|
||||||
SASSERT(m_local_search);
|
SASSERT(m_local_search);
|
||||||
|
@ -1291,7 +1295,6 @@ namespace sat {
|
||||||
m_model = m_local_search->get_model();
|
m_model = m_local_search->get_model();
|
||||||
m_model_is_current = true;
|
m_model_is_current = true;
|
||||||
}
|
}
|
||||||
m_local_search = nullptr;
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue