3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-03 22:43:56 +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;

View file

@ -1,8 +1,7 @@
def_module_params('opt',
description='optimization parameters',
export=True,
params=(('timeout', UINT, UINT_MAX, 'set timeout'),
('optsmt_engine', SYMBOL, 'basic', "select optimization engine: 'basic', 'farkas', 'symba'"),
params=(('optsmt_engine', SYMBOL, 'basic', "select optimization engine: 'basic', 'farkas', 'symba'"),
('maxsat_engine', SYMBOL, 'maxres', "select engine for maxsat: 'fu_malik', 'core_maxsat', 'wmax', 'pbmax', 'maxres', 'pd-maxres', 'bcd2', 'wpm2', 'sls', 'maxhs'"),
('priority', SYMBOL, 'lex', "select how to priortize objectives: 'lex' (lexicographic), 'pareto', or 'box'"),
('dump_benchmarks', BOOL, False, 'dump benchmarks for profiling'),