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
|
@ -45,7 +45,6 @@ class diff_neq_tactic : public tactic {
|
|||
vector<diseqs> m_var_diseqs;
|
||||
typedef svector<int> decision_stack;
|
||||
decision_stack m_stack;
|
||||
volatile bool m_cancel;
|
||||
|
||||
bool m_produce_models;
|
||||
rational m_max_k;
|
||||
|
@ -58,7 +57,6 @@ class diff_neq_tactic : public tactic {
|
|||
u(m),
|
||||
m_var2expr(m) {
|
||||
updt_params(p);
|
||||
m_cancel = false;
|
||||
}
|
||||
|
||||
void updt_params(params_ref const & p) {
|
||||
|
@ -67,11 +65,7 @@ class diff_neq_tactic : public tactic {
|
|||
if (m_max_k >= rational(INT_MAX/2))
|
||||
m_max_k = rational(INT_MAX/2);
|
||||
}
|
||||
|
||||
void set_cancel(bool f) {
|
||||
m_cancel = f;
|
||||
}
|
||||
|
||||
|
||||
void throw_not_supported() {
|
||||
throw tactic_exception("goal is not diff neq");
|
||||
}
|
||||
|
@ -294,7 +288,7 @@ class diff_neq_tactic : public tactic {
|
|||
init_forbidden();
|
||||
unsigned nvars = num_vars();
|
||||
while (m_stack.size() < nvars) {
|
||||
if (m_cancel)
|
||||
if (m.canceled())
|
||||
throw tactic_exception(TACTIC_CANCELED_MSG);
|
||||
TRACE("diff_neq_tactic", display_model(tout););
|
||||
var x = m_stack.size();
|
||||
|
@ -407,11 +401,6 @@ public:
|
|||
dealloc(d);
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void set_cancel(bool f) {
|
||||
if (m_imp)
|
||||
m_imp->set_cancel(f);
|
||||
}
|
||||
};
|
||||
|
||||
tactic * mk_diff_neq_tactic(ast_manager & m, params_ref const & p) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue