3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-12 02:04:43 +00:00

remove min/max, use qmax; disable cancellation during model evaluation

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2016-05-19 13:04:20 -07:00
parent d2622da747
commit 1aa3fdab8a
12 changed files with 19 additions and 234 deletions

View file

@ -212,18 +212,6 @@ namespace opt {
m_hard_constraints.append(s.m_hard);
}
lbool context::min_max(app* t, app_ref_vector const& vars, svector<bool> const& is_max) {
clear_state();
init_solver();
import_scoped_state();
normalize();
internalize();
qe::max_min_opt max_min(m, m_params);
max_min.add(m_hard_constraints);
return max_min.check(is_max, vars, t);
}
lbool context::optimize() {
if (m_pareto) {
return execute_pareto();
@ -236,12 +224,12 @@ namespace opt {
import_scoped_state();
normalize();
internalize();
update_solver();
#if 0
if (is_qsat_opt()) {
return run_qsat_opt();
}
#endif
update_solver();
solver& s = get_solver();
s.assert_expr(m_hard_constraints);
display_benchmark();
@ -1473,6 +1461,7 @@ namespace opt {
value.neg();
}
if (result != l_undef) {
m_optsmt.setup(*m_opt_solver.get());
m_optsmt.update_lower(obj.m_index, value);
m_optsmt.update_upper(obj.m_index, value);
}