mirror of
https://github.com/Z3Prover/z3
synced 2026-05-07 10:55:20 +00:00
making try-for tactic exception resilient on cancelation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
245c117aba
commit
7461103802
2 changed files with 8 additions and 18 deletions
|
|
@ -133,23 +133,7 @@ class nlsat_tactic : public tactic {
|
|||
return ok;
|
||||
}
|
||||
|
||||
void operator()(goal_ref const &g, goal_ref_buffer &result) {
|
||||
try {
|
||||
check(g, result);
|
||||
}
|
||||
catch (z3_exception &ex) {
|
||||
if (m.limit().is_canceled()) {
|
||||
if (result.empty()) {
|
||||
g->inc_depth();
|
||||
result.push_back(g.get());
|
||||
}
|
||||
return;
|
||||
}
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
void check(goal_ref const & g, goal_ref_buffer & result) {
|
||||
void operator()(goal_ref const & g, goal_ref_buffer & result) {
|
||||
tactic_report report("nlsat", *g);
|
||||
|
||||
if (g->is_decided()) {
|
||||
|
|
|
|||
|
|
@ -1056,7 +1056,13 @@ public:
|
|||
cancel_eh<reslimit> eh(in->m().limit());
|
||||
{
|
||||
scoped_timer timer(m_timeout, &eh);
|
||||
m_t->operator()(in, result);
|
||||
try {
|
||||
m_t->operator()(in, result);
|
||||
} catch (z3_exception &) {
|
||||
if (in->m().limit().is_canceled())
|
||||
return;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue