mirror of
https://github.com/Z3Prover/z3
synced 2025-04-28 11:25:51 +00:00
reworking cancellation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
981f8226fe
commit
baee4225a7
145 changed files with 172 additions and 958 deletions
|
@ -22,7 +22,6 @@ struct unit_subsumption_tactic : public tactic {
|
|||
ast_manager& m;
|
||||
params_ref m_params;
|
||||
smt_params m_fparams;
|
||||
volatile bool m_cancel;
|
||||
smt::context m_context;
|
||||
expr_ref_vector m_clauses;
|
||||
unsigned m_clause_count;
|
||||
|
@ -34,19 +33,11 @@ struct unit_subsumption_tactic : public tactic {
|
|||
params_ref const& p):
|
||||
m(m),
|
||||
m_params(p),
|
||||
m_cancel(false),
|
||||
m_context(m, m_fparams, p),
|
||||
m_clauses(m) {
|
||||
}
|
||||
|
||||
void set_cancel(bool f) {
|
||||
m_cancel = f;
|
||||
m_context.set_cancel_flag(f);
|
||||
}
|
||||
|
||||
virtual void cleanup() {
|
||||
set_cancel(false);
|
||||
}
|
||||
void cleanup() {}
|
||||
|
||||
virtual void operator()(/* in */ goal_ref const & in,
|
||||
/* out */ goal_ref_buffer & result,
|
||||
|
@ -66,7 +57,7 @@ struct unit_subsumption_tactic : public tactic {
|
|||
}
|
||||
|
||||
void checkpoint() {
|
||||
if (m_cancel) {
|
||||
if (m.canceled()) {
|
||||
throw tactic_exception(TACTIC_CANCELED_MSG);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue