mirror of
https://github.com/Z3Prover/z3
synced 2025-06-20 04:43:39 +00:00
parent
ab8d3cdc44
commit
37852807b0
3 changed files with 6 additions and 6 deletions
|
@ -398,10 +398,10 @@ namespace opt {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief there is no need to use push/pop when all objectives are maxsat and engine
|
\brief there is no need to use push/pop when all objectives are maxsat and engine
|
||||||
is maxres or mss.
|
is maxres.
|
||||||
*/
|
*/
|
||||||
bool context::scoped_lex() {
|
bool context::scoped_lex() {
|
||||||
if (m_maxsat_engine == symbol("maxres") || m_maxsat_engine == symbol("mss")) {
|
if (m_maxsat_engine == symbol("maxres")) {
|
||||||
for (unsigned i = 0; i < m_objectives.size(); ++i) {
|
for (unsigned i = 0; i < m_objectives.size(); ++i) {
|
||||||
if (m_objectives[i].m_type != O_MAXSMT) return true;
|
if (m_objectives[i].m_type != O_MAXSMT) return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ def_module_params('opt',
|
||||||
export=True,
|
export=True,
|
||||||
params=(('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: 'core_maxsat', 'wmax', 'maxres', 'pd-maxres', 'mss'"),
|
('maxsat_engine', SYMBOL, 'maxres', "select engine for maxsat: 'core_maxsat', 'wmax', 'maxres', 'pd-maxres', 'mss'"),
|
||||||
('priority', SYMBOL, 'lex', "select how to prioritize objectives: 'lex' (lexicographic), 'pareto', or 'box'"),
|
('priority', SYMBOL, 'lex', "select how to priortize objectives: 'lex' (lexicographic), 'pareto', or 'box'"),
|
||||||
('dump_benchmarks', BOOL, False, 'dump benchmarks for profiling'),
|
('dump_benchmarks', BOOL, False, 'dump benchmarks for profiling'),
|
||||||
('solution_prefix', SYMBOL, '', "path prefix to dump intermediary, but non-optimal, solutions"),
|
('solution_prefix', SYMBOL, '', "path prefix to dump intermediary, but non-optimal, solutions"),
|
||||||
('timeout', UINT, UINT_MAX, 'timeout (in milliseconds) (UINT_MAX and 0 mean no timeout)'),
|
('timeout', UINT, UINT_MAX, 'timeout (in milliseconds) (UINT_MAX and 0 mean no timeout)'),
|
||||||
|
|
|
@ -84,9 +84,6 @@ namespace opt {
|
||||||
if (m.canceled()) {
|
if (m.canceled()) {
|
||||||
is_sat = l_undef;
|
is_sat = l_undef;
|
||||||
}
|
}
|
||||||
if (is_sat == l_undef) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (is_sat == l_false) {
|
if (is_sat == l_false) {
|
||||||
TRACE("opt", tout << "Unsat\n";);
|
TRACE("opt", tout << "Unsat\n";);
|
||||||
break;
|
break;
|
||||||
|
@ -100,6 +97,9 @@ namespace opt {
|
||||||
//DEBUG_CODE(verify_cores(cores););
|
//DEBUG_CODE(verify_cores(cores););
|
||||||
s().assert_expr(fml);
|
s().assert_expr(fml);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
//DEBUG_CODE(verify_cores(cores););
|
||||||
|
}
|
||||||
update_cores(wth(), cores);
|
update_cores(wth(), cores);
|
||||||
wth().init_min_cost(m_upper - m_lower);
|
wth().init_min_cost(m_upper - m_lower);
|
||||||
trace_bounds("wmax");
|
trace_bounds("wmax");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue