mirror of
https://github.com/Z3Prover/z3
synced 2025-08-03 18:00:23 +00:00
moving to resource managed cancellation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
61dbb6168e
commit
32b6b2da44
41 changed files with 55 additions and 280 deletions
|
@ -44,7 +44,6 @@ namespace opt {
|
|||
virtual rational get_lower() const = 0;
|
||||
virtual rational get_upper() const = 0;
|
||||
virtual bool get_assignment(unsigned index) const = 0;
|
||||
virtual void set_cancel(bool f) = 0;
|
||||
virtual void collect_statistics(statistics& st) const = 0;
|
||||
virtual void get_model(model_ref& mdl, svector<symbol>& labels) = 0;
|
||||
virtual void updt_params(params_ref& p) = 0;
|
||||
|
@ -60,7 +59,6 @@ namespace opt {
|
|||
protected:
|
||||
ast_manager& m;
|
||||
maxsat_context& m_c;
|
||||
volatile bool m_cancel;
|
||||
const expr_ref_vector m_soft;
|
||||
vector<rational> m_weights;
|
||||
expr_ref_vector m_assertions;
|
||||
|
@ -78,7 +76,6 @@ namespace opt {
|
|||
virtual rational get_lower() const { return m_lower; }
|
||||
virtual rational get_upper() const { return m_upper; }
|
||||
virtual bool get_assignment(unsigned index) const { return m_assignment[index]; }
|
||||
virtual void set_cancel(bool f) { m_cancel = f; if (f) s().cancel(); else s().reset_cancel(); }
|
||||
virtual void collect_statistics(statistics& st) const { }
|
||||
virtual void get_model(model_ref& mdl, svector<symbol>& labels) { mdl = m_model.get(); labels = m_labels;}
|
||||
virtual void commit_assignment();
|
||||
|
@ -115,7 +112,6 @@ namespace opt {
|
|||
ast_manager& m;
|
||||
maxsat_context& m_c;
|
||||
scoped_ptr<maxsmt_solver_base> m_msolver;
|
||||
volatile bool m_cancel;
|
||||
expr_ref_vector m_soft_constraints;
|
||||
expr_ref_vector m_answer;
|
||||
vector<rational> m_weights;
|
||||
|
@ -128,7 +124,6 @@ namespace opt {
|
|||
public:
|
||||
maxsmt(maxsat_context& c);
|
||||
lbool operator()();
|
||||
void set_cancel(bool f);
|
||||
void updt_params(params_ref& p);
|
||||
void add(expr* f, rational const& w);
|
||||
void set_adjust_value(adjust_value& adj) { m_adjust_value = adj; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue