3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-16 20:24:45 +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

@ -259,13 +259,7 @@ namespace opt {
// force lower_bound(i) <= objective_value(i)
void optsmt::commit_assignment(unsigned i) {
smt::theory_var v = m_vars[i];
// TBD: this should be a method on all optimization solvers.
smt::theory_opt& opt = s->get_optimizer();
SASSERT(typeid(smt::theory_inf_arith) == typeid(opt));
smt::theory_inf_arith& th = dynamic_cast<smt::theory_inf_arith&>(opt);
s->assert_expr(th.block_upper_bound(v, get_lower(i)));
s->assert_expr(s->block_upper_bound(i, get_lower(i)));
}
void optsmt::display(std::ostream& out) const {