3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-06 22:23:22 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2021-10-19 12:21:54 -04:00
parent fc3a701888
commit f9dde2e8a4
3 changed files with 11 additions and 5 deletions

View file

@ -135,8 +135,10 @@ namespace opt {
if (mdl) {
TRACE("opt", tout << *mdl << "\n";);
for (auto & soft : m_soft) {
if (!mdl->is_true(soft.s))
break;
if (!mdl->is_true(soft.s)) {
update_bounds();
return;
}
soft.set_value(l_true);
assert_value(soft);
}
@ -151,9 +153,8 @@ namespace opt {
unsigned sz = m_soft.size();
for (unsigned i = 0; i < sz; ++i) {
auto& soft = m_soft[i];
if (soft.value != l_undef) {
if (soft.value != l_undef)
continue;
}
expr_ref_vector asms(m);
asms.push_back(soft.s);
lbool is_sat = s().check_sat(asms);