3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-25 20:46:01 +00:00

reworking cancellation

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2015-12-11 16:21:24 -08:00
parent 981f8226fe
commit baee4225a7
145 changed files with 172 additions and 958 deletions

View file

@ -51,7 +51,6 @@ struct expr2subpaving::imp {
obj_map<expr, subpaving::ineq*> m_lit_cache;
volatile bool m_cancel;
imp(ast_manager & m, subpaving::context & s, expr2var * e2v):
m_manager(m),
@ -71,7 +70,6 @@ struct expr2subpaving::imp {
m_expr2var_owner = false;
}
m_cancel = false;
}
~imp() {
@ -95,7 +93,7 @@ struct expr2subpaving::imp {
}
void checkpoint() {
if (m_cancel)
if (m().canceled())
throw default_exception("canceled");
cooperate("expr2subpaving");
}
@ -357,9 +355,6 @@ struct expr2subpaving::imp {
return m_expr2var->is_var(t);
}
void set_cancel(bool f) {
m_cancel = f;
}
subpaving::var internalize_term(expr * t, mpz & n, mpz & d) {
return process(t, 0, n, d);
@ -386,9 +381,6 @@ bool expr2subpaving::is_var(expr * t) const {
return m_imp->is_var(t);
}
void expr2subpaving::set_cancel(bool f) {
m_imp->set_cancel(f);
}
subpaving::var expr2subpaving::internalize_term(expr * t, mpz & n, mpz & d) {
return m_imp->internalize_term(t, n, d);

View file

@ -40,12 +40,7 @@ public:
\brief Return true if t was encoded as a variable by the translator.
*/
bool is_var(expr * t) const;
/**
\brief Cancel/Interrupt execution.
*/
void set_cancel(bool f);
/**
\brief Internalize a Z3 arithmetical expression into the subpaving data-structure.

View file

@ -124,7 +124,6 @@ class subpaving_tactic : public tactic {
}
void set_cancel(bool f) {
m_e2s->set_cancel(f);
m_ctx->set_cancel(f);
}
@ -279,11 +278,6 @@ public:
}
}
protected:
virtual void set_cancel(bool f) {
if (m_imp)
m_imp->set_cancel(f);
}
};