3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-19 10:52:02 +00:00

fix mb maximization logic, so far not accessible

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2016-06-20 16:39:03 -07:00
parent c7ff05cc78
commit 9c099d6b1b
12 changed files with 318 additions and 109 deletions

View file

@ -225,7 +225,7 @@ namespace opt {
normalize();
internalize();
update_solver();
#if 1
#if 0
if (is_qsat_opt()) {
return run_qsat_opt();
}
@ -367,6 +367,7 @@ namespace opt {
lbool context::execute_box() {
if (m_box_index < m_objectives.size()) {
SASSERT(m_box_index < m_box_models.size());
m_model = m_box_models[m_box_index];
++m_box_index;
return l_true;
@ -383,7 +384,9 @@ namespace opt {
if (obj.m_type == O_MAXSMT) {
solver::scoped_push _sp(get_solver());
r = execute(obj, false, false);
if (r == l_true) m_box_models.push_back(m_model.get());
if (r == l_true) {
m_box_models.push_back(m_model.get());
}
}
else {
m_box_models.push_back(m_optsmt.get_model(j));
@ -391,6 +394,7 @@ namespace opt {
}
}
if (r == l_true && m_objectives.size() > 0) {
SASSERT(!m_box_models.empty());
m_model = m_box_models[0];
}
return r;