mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
ensure that timeouts are distinguished from other cancel events #848
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
7d8c745c89
commit
7a977f0106
10 changed files with 55 additions and 10 deletions
|
@ -142,7 +142,7 @@ namespace api {
|
|||
#pragma omp critical (set_interruptable)
|
||||
{
|
||||
if (m_interruptable)
|
||||
(*m_interruptable)();
|
||||
(*m_interruptable)(API_INTERRUPT_EH_CALLER);
|
||||
m_limit.cancel();
|
||||
m().limit().cancel();
|
||||
}
|
||||
|
|
|
@ -296,10 +296,14 @@ extern "C" {
|
|||
result = to_solver_ref(s)->check_sat(num_assumptions, _assumptions);
|
||||
}
|
||||
catch (z3_exception & ex) {
|
||||
to_solver_ref(s)->set_reason_unknown(eh);
|
||||
mk_c(c)->handle_exception(ex);
|
||||
return Z3_L_UNDEF;
|
||||
}
|
||||
}
|
||||
if (result == l_undef) {
|
||||
to_solver_ref(s)->set_reason_unknown(eh);
|
||||
}
|
||||
return static_cast<Z3_lbool>(result);
|
||||
}
|
||||
|
||||
|
@ -466,10 +470,14 @@ extern "C" {
|
|||
result = to_solver_ref(s)->get_consequences(_assumptions, _variables, _consequences);
|
||||
}
|
||||
catch (z3_exception & ex) {
|
||||
to_solver_ref(s)->set_reason_unknown(eh);
|
||||
mk_c(c)->handle_exception(ex);
|
||||
return Z3_L_UNDEF;
|
||||
}
|
||||
}
|
||||
if (result == l_undef) {
|
||||
to_solver_ref(s)->set_reason_unknown(eh);
|
||||
}
|
||||
for (unsigned i = 0; i < _consequences.size(); ++i) {
|
||||
to_ast_vector_ref(consequences).push_back(_consequences[i].get());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue