3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 10:25:18 +00:00

Fix termination conditions on core_maxsat

This commit is contained in:
Anh-Dung Phan 2013-11-12 16:14:21 -08:00
parent 66eda866ca
commit 64daa2977d

View file

@ -69,6 +69,10 @@ namespace opt {
m_answer.reset();
m_answer.append(ans);
}
if (m_answer.size() == m_upper) {
return l_true;
}
SASSERT(m_soft.size() >= m_answer.size()+1);
unsigned k = m_soft.size()-m_answer.size()-1;
expr_ref fml = mk_at_most(core_vars, k);
TRACE("opt", tout << "add: " << fml << "\n";);