mirror of
https://github.com/Z3Prover/z3
synced 2025-07-19 02:42:02 +00:00
push blocking code to optimizer context
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
b0fddd8e60
commit
bc44bcad10
11 changed files with 152 additions and 49 deletions
|
@ -26,10 +26,26 @@ namespace opt {
|
|||
Takes solver with hard constraints added.
|
||||
Returns an optimal assignment to objective functions.
|
||||
*/
|
||||
|
||||
lbool optimize_objectives(opt_solver& s,
|
||||
app_ref_vector& objectives,
|
||||
vector<inf_eps_rational<inf_rational> >& values);
|
||||
|
||||
class optimize_objectives {
|
||||
ast_manager& m;
|
||||
opt_solver& s;
|
||||
volatile bool m_cancel;
|
||||
public:
|
||||
optimize_objectives(ast_manager& m, opt_solver& s): m(m), s(s), m_cancel(false) {}
|
||||
|
||||
lbool operator()(app_ref_vector& objectives, vector<inf_eps>& values);
|
||||
|
||||
void set_cancel(bool f);
|
||||
|
||||
private:
|
||||
|
||||
lbool basic_opt(app_ref_vector& objectives, vector<inf_eps>& values);
|
||||
|
||||
void set_max(vector<inf_eps>& dst, vector<inf_eps> const& src);
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue