3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 09:35:32 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-04-03 16:37:59 -07:00
parent 0b856638e9
commit 426e4cc75c
65 changed files with 135 additions and 146 deletions

View file

@ -191,7 +191,7 @@ public:
return m_solver2->get_consequences(asms, vars, consequences);
}
catch (z3_exception& ex) {
if (get_manager().canceled()) {
if (!get_manager().inc()) {
throw;
}
else {
@ -217,7 +217,7 @@ public:
if (m_inc_timeout == UINT_MAX) {
IF_VERBOSE(PS_VB_LVL, verbose_stream() << "(combined-solver \"using solver 2 (without a timeout)\")\n";);
lbool r = m_solver2->check_sat_core(num_assumptions, assumptions);
if (r != l_undef || !use_solver1_when_undef() || get_manager().canceled()) {
if (r != l_undef || !use_solver1_when_undef() || !get_manager().inc()) {
return r;
}
}

View file

@ -321,7 +321,7 @@ class parallel_tactic : public tactic {
}
bool canceled() {
return m_giveup || m().canceled();
return m_giveup ||! m().inc();
}
std::ostream& display(std::ostream& out) {
@ -634,7 +634,7 @@ private:
cube_and_conquer(*st);
collect_statistics(*st);
m_queue.task_done(st);
if (st->m().canceled()) m_queue.shutdown();
if (!st->m().inc()) m_queue.shutdown();
IF_VERBOSE(1, display(verbose_stream()););
dealloc(st);
}
@ -748,7 +748,7 @@ public:
g->assert_expr(m.mk_false(), pr, lcore);
break;
case l_undef:
if (m.canceled()) {
if (!m.inc()) {
throw tactic_exception(Z3_CANCELED_MSG);
}
break;

View file

@ -89,7 +89,7 @@ lbool solver::get_consequences(expr_ref_vector const& asms, expr_ref_vector cons
return get_consequences_core(asms, vars, consequences);
}
catch (z3_exception& ex) {
if (asms.get_manager().canceled()) {
if (!asms.get_manager().inc()) {
set_reason_unknown(Z3_CANCELED_MSG);
return l_undef;
}
@ -335,7 +335,7 @@ lbool solver::check_sat(unsigned num_assumptions, expr * const * assumptions) {
}
throw;
}
if (r == l_undef && get_manager().canceled()) {
if (r == l_undef && !get_manager().inc()) {
dump_state(num_assumptions, assumptions);
}
return r;

View file

@ -153,7 +153,7 @@ public:
break;
}
case l_undef:
if (m.canceled()) {
if (!m.inc()) {
throw tactic_exception(Z3_CANCELED_MSG);
}
model_converter_ref mc;