mirror of
https://github.com/Z3Prover/z3
synced 2025-07-19 19:02:02 +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
|
@ -58,7 +58,6 @@ namespace qe {
|
|||
|
||||
ast_manager& m;
|
||||
expr_ref m_false;
|
||||
volatile bool m_cancel;
|
||||
smt_params m_fparams;
|
||||
params_ref m_params;
|
||||
unsigned m_extrapolate_strategy_param;
|
||||
|
@ -209,7 +208,6 @@ namespace qe {
|
|||
sat_tactic(ast_manager& m, params_ref const& p = params_ref()):
|
||||
m(m),
|
||||
m_false(m.mk_false(), m),
|
||||
m_cancel(false),
|
||||
m_params(p),
|
||||
m_extrapolate_strategy_param(0),
|
||||
m_projection_mode_param(true),
|
||||
|
@ -233,17 +231,6 @@ namespace qe {
|
|||
reset();
|
||||
}
|
||||
|
||||
virtual void set_cancel(bool f) {
|
||||
m_cancel = f;
|
||||
// not thread-safe when solvers are reset.
|
||||
// TBD: lock - this, reset() and init_Ms.
|
||||
for (unsigned i = 0; i < m_solvers.size(); ++i) {
|
||||
m_solvers[i]->set_cancel(f);
|
||||
}
|
||||
m_solver.set_cancel(f);
|
||||
m_ctx_rewriter.set_cancel(f);
|
||||
}
|
||||
|
||||
virtual void operator()(
|
||||
goal_ref const& goal,
|
||||
goal_ref_buffer& result,
|
||||
|
@ -674,7 +661,7 @@ namespace qe {
|
|||
}
|
||||
|
||||
void checkpoint() {
|
||||
if (m_cancel) {
|
||||
if (m.canceled()) {
|
||||
throw tactic_exception(TACTIC_CANCELED_MSG);
|
||||
}
|
||||
cooperate("qe-sat");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue