3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 03:45:51 +00:00

working on supporting multiple max-sat objectives

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2013-11-08 16:54:34 -08:00
parent f350efffc7
commit 9f53a4aa18
7 changed files with 65 additions and 23 deletions

View file

@ -168,7 +168,15 @@ namespace opt {
vector<inf_eps> const& opt_solver::get_objective_values() {
return m_objective_values;
}
expr_ref opt_solver::block_upper_bound(unsigned var, inf_eps const& val) {
smt::theory_opt& opt = get_optimizer();
SASSERT(typeid(smt::theory_inf_arith) == typeid(opt));
smt::theory_inf_arith& th = dynamic_cast<smt::theory_inf_arith&>(opt);
smt::theory_var v = m_objective_vars[var];
return expr_ref(th.block_upper_bound(v, val), m);
}
expr_ref opt_solver::block_lower_bound(unsigned var, inf_eps const& val) {
if (val.get_infinity().is_pos()) {
return expr_ref(m.mk_false(), m);