mirror of
https://github.com/Z3Prover/z3
synced 2025-08-30 15:00:08 +00:00
fix up pareto callback mechanism
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
1ea376e310
commit
03979fd580
8 changed files with 178 additions and 144 deletions
|
@ -27,7 +27,6 @@ namespace opt {
|
|||
|
||||
class pareto_callback {
|
||||
public:
|
||||
virtual void yield(model_ref& model) = 0;
|
||||
virtual unsigned num_objectives() = 0;
|
||||
virtual expr_ref mk_gt(unsigned i, model_ref& model) = 0;
|
||||
virtual expr_ref mk_ge(unsigned i, model_ref& model) = 0;
|
||||
|
@ -40,6 +39,7 @@ namespace opt {
|
|||
volatile bool m_cancel;
|
||||
ref<solver> m_solver;
|
||||
params_ref m_params;
|
||||
model_ref m_model;
|
||||
public:
|
||||
pareto_base(
|
||||
ast_manager & m,
|
||||
|
@ -72,11 +72,15 @@ namespace opt {
|
|||
}
|
||||
virtual lbool operator()() = 0;
|
||||
|
||||
virtual void get_model(model_ref& mdl) {
|
||||
mdl = m_model;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
void mk_dominates(model_ref& model);
|
||||
void mk_dominates();
|
||||
|
||||
void mk_not_dominated_by(model_ref& model);
|
||||
void mk_not_dominated_by();
|
||||
};
|
||||
class gia_pareto : public pareto_base {
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue