diff --git a/src/opt/opt_context.cpp b/src/opt/opt_context.cpp index 95e2c4f16..ff6955b7b 100644 --- a/src/opt/opt_context.cpp +++ b/src/opt/opt_context.cpp @@ -108,7 +108,7 @@ namespace opt { lbool context::execute_lex() { lbool r = l_true; for (unsigned i = 0; r == l_true && i < m_objectives.size(); ++i) { - r = execute(m_objectives[i], true); + r = execute(m_objectives[i], i + 1 < m_objectives.size()); } return r; } @@ -179,6 +179,31 @@ namespace opt { } m_optsmt.display_range_assignment(out); } + + expr_ref context::get_lower(unsigned idx) { + NOT_IMPLEMENTED_YET(); + if (idx > m_objectives.size()) { + throw default_exception("index out of bounds"); + } + objective const& obj = m_objectives[idx]; + switch(obj.m_type) { + case O_MAXSMT: { + maxsmt* ms = m_maxsmts.find(obj.m_id); + inf_eps l = ms->get_lower(); + break; + } + case O_MAXIMIZE: + case O_MINIMIZE: + break; + } + + return expr_ref(0,m); + } + + expr_ref context::get_upper(unsigned idx) { + NOT_IMPLEMENTED_YET(); + return expr_ref(0, m); + } void context::set_cancel(bool f) { if (m_solver) { diff --git a/src/opt/opt_context.h b/src/opt/opt_context.h index 7bb3f86ed..30b7bf77b 100644 --- a/src/opt/opt_context.h +++ b/src/opt/opt_context.h @@ -80,6 +80,10 @@ namespace opt { void display_range_assignment(std::ostream& out); static void collect_param_descrs(param_descrs & r); void updt_params(params_ref& p); + + expr_ref get_lower(unsigned idx); + expr_ref get_upper(unsigned idx); + private: void validate_feasibility(maxsmt& ms);