mirror of
https://github.com/Z3Prover/z3
synced 2025-07-03 11:25:40 +00:00
parent
43e7242e35
commit
0ff97d5a31
1 changed files with 7 additions and 7 deletions
|
@ -1276,20 +1276,20 @@ namespace sat {
|
||||||
};
|
};
|
||||||
|
|
||||||
lbool solver::invoke_local_search(unsigned num_lits, literal const* lits) {
|
lbool solver::invoke_local_search(unsigned num_lits, literal const* lits) {
|
||||||
|
SASSERT(m_local_search);
|
||||||
|
scoped_ptr<i_local_search> _ptr = m_local_search;
|
||||||
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);
|
||||||
i_local_search& srch = *m_local_search;
|
m_local_search->add(*this);
|
||||||
srch.add(*this);
|
m_local_search->updt_params(m_params);
|
||||||
srch.updt_params(m_params);
|
scoped_rl.push_child(&(m_local_search->rlimit()));
|
||||||
scoped_rl.push_child(&srch.rlimit());
|
lbool r = m_local_search->check(num_lits, lits, nullptr);
|
||||||
lbool r = srch.check(num_lits, lits, nullptr);
|
|
||||||
if (r == l_true) {
|
if (r == l_true) {
|
||||||
m_model = srch.get_model();
|
m_model = m_local_search->get_model();
|
||||||
m_model_is_current = true;
|
m_model_is_current = true;
|
||||||
}
|
}
|
||||||
m_local_search = nullptr;
|
m_local_search = nullptr;
|
||||||
dealloc(&srch);
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue