mirror of
https://github.com/Z3Prover/z3
synced 2025-07-19 10:52:02 +00:00
fix stats collection over exceptions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
808855ce6b
commit
f34a54fea0
1 changed files with 13 additions and 4 deletions
|
@ -233,10 +233,16 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
lbool r;
|
lbool r;
|
||||||
|
try {
|
||||||
if (assumptions.empty())
|
if (assumptions.empty())
|
||||||
r = m_ctx->setup_and_check();
|
r = m_ctx->setup_and_check();
|
||||||
else
|
else
|
||||||
r = m_ctx->check(assumptions.size(), assumptions.c_ptr());
|
r = m_ctx->check(assumptions.size(), assumptions.c_ptr());
|
||||||
|
}
|
||||||
|
catch(...) {
|
||||||
|
m_ctx->collect_statistics(m_stats);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
m_ctx->collect_statistics(m_stats);
|
m_ctx->collect_statistics(m_stats);
|
||||||
switch (r) {
|
switch (r) {
|
||||||
case l_true: {
|
case l_true: {
|
||||||
|
@ -284,6 +290,9 @@ public:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case l_undef:
|
case l_undef:
|
||||||
|
if (m_ctx->canceled()) {
|
||||||
|
throw tactic_exception(Z3_CANCELED_MSG);
|
||||||
|
}
|
||||||
if (m_fail_if_inconclusive)
|
if (m_fail_if_inconclusive)
|
||||||
throw tactic_exception("smt tactic failed to show goal to be sat/unsat");
|
throw tactic_exception("smt tactic failed to show goal to be sat/unsat");
|
||||||
result.push_back(in.get());
|
result.push_back(in.get());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue