mirror of
https://github.com/Z3Prover/z3
synced 2025-06-27 08:28:44 +00:00
working on supporting multiple max-sat objectives
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
f350efffc7
commit
9f53a4aa18
7 changed files with 65 additions and 23 deletions
|
@ -35,16 +35,17 @@ namespace opt {
|
|||
class opt_solver;
|
||||
|
||||
class context {
|
||||
typedef map<symbol, maxsmt*, symbol_hash_proc, symbol_eq_proc> map_t;
|
||||
ast_manager& m;
|
||||
expr_ref_vector m_hard_constraints;
|
||||
ref<opt_solver> m_solver;
|
||||
params_ref m_params;
|
||||
optsmt m_optsmt;
|
||||
maxsmt m_maxsmt;
|
||||
map_t m_maxsmts;
|
||||
public:
|
||||
context(ast_manager& m);
|
||||
|
||||
void add_soft_constraint(expr* f, rational const& w) { m_maxsmt.add(f, w); }
|
||||
~context();
|
||||
void add_soft_constraint(expr* f, rational const& w, symbol const& id);
|
||||
void add_objective(app* t, bool is_max) { m_optsmt.add(t, is_max); }
|
||||
void add_hard_constraint(expr* f) { m_hard_constraints.push_back(f); }
|
||||
void optimize();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue