3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 09:05:31 +00:00

fix bug in tracking levels of variables: levels are not cleared, only truth assignment

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-05-02 14:10:07 -07:00
parent 48e37b0e16
commit ed0b2be618
2 changed files with 41 additions and 40 deletions

View file

@ -61,13 +61,12 @@ namespace opt {
return is_sat;
}
m_upper = m_lower;
bool was_sat = false;
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) {
expr* c = assert_weighted(wth(), it->m_key, it->m_value);
assert_weighted(wth(), it->m_key, it->m_value);
if (!is_true(it->m_key)) {
m_upper += it->m_value;
}
@ -97,7 +96,6 @@ namespace opt {
expr_ref fml = wth().mk_block();
//DEBUG_CODE(verify_cores(cores););
s().assert_expr(fml);
was_sat = true;
}
else {
//DEBUG_CODE(verify_cores(cores););