3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-13 04:28:17 +00:00
This commit is contained in:
Nikolaj Bjorner 2020-05-07 10:40:41 -07:00
parent fc6bdb9708
commit da9b037f2a

View file

@ -64,11 +64,10 @@ namespace opt {
expr_ref_vector asms(m);
vector<expr_ref_vector> cores;
obj_map<expr, rational>::iterator it = soft.begin(), end = soft.end();
for (; it != end; ++it) {
assert_weighted(wth(), it->m_key, it->m_value);
if (!is_true(it->m_key)) {
m_upper += it->m_value;
for (auto const& kv : soft) {
assert_weighted(wth(), kv.m_key, kv.m_value);
if (!is_true(kv.m_key)) {
m_upper += kv.m_value;
}
}
wth().init_min_cost(m_upper - m_lower);
@ -104,6 +103,7 @@ namespace opt {
SASSERT(m_lower <= m_upper);
}
if (m_model)
update_assignment();
if (m.inc() && is_sat == l_undef && m_lower == m_upper) {