3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-04 14:25:46 +00:00

reworking cancellation

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2015-12-11 16:43:48 -08:00
parent baee4225a7
commit 96d1066c6a
13 changed files with 42 additions and 47 deletions

View file

@ -353,7 +353,6 @@ cmd_context::~cmd_context() {
void cmd_context::set_cancel(bool f) {
if (has_manager()) {
m().set_cancel(f);
if (f) {
m().limit().cancel();
}

View file

@ -27,7 +27,7 @@ static void to_subpaving(cmd_context & ctx, expr * t) {
ast_manager & m = ctx.m();
unsynch_mpq_manager qm;
scoped_ptr<subpaving::context> s;
s = subpaving::mk_mpq_context(qm);
s = subpaving::mk_mpq_context(ctx.m().limit(), qm);
expr2var e2v(m);
expr2subpaving e2s(m, *s, &e2v);
params_ref p;

View file

@ -74,7 +74,7 @@ public:
unsigned num_steps = 0;
unsigned timeout = m_params.get_uint("timeout", UINT_MAX);
bool failed = false;
cancel_eh<th_rewriter> eh(s);
cancel_eh<reslimit> eh(ctx.m().limit());
{
scoped_ctrl_c ctrlc(eh);
scoped_timer timer(timeout, &eh);