mirror of
https://github.com/Z3Prover/z3
synced 2025-09-22 09:21:28 +00:00
moving to resource managed cancellation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
61dbb6168e
commit
32b6b2da44
41 changed files with 55 additions and 280 deletions
|
@ -1522,6 +1522,7 @@ public:
|
|||
}
|
||||
|
||||
reslimit& limit() { return m_limit; }
|
||||
bool canceled() { return !limit().inc(); }
|
||||
|
||||
void register_plugin(symbol const & s, decl_plugin * plugin);
|
||||
|
||||
|
|
|
@ -578,8 +578,12 @@ void rewriter_tpl<Config>::resume_core(expr_ref & result, proof_ref & result_pr)
|
|||
while (!frame_stack().empty()) {
|
||||
if (m_cancel)
|
||||
throw rewriter_exception(Z3_CANCELED_MSG);
|
||||
if (!m().limit().inc())
|
||||
if (!m().canceled()) {
|
||||
if (m().limit().cancel_flag_set()) {
|
||||
throw rewriter_exception(Z3_CANCELED_MSG);
|
||||
}
|
||||
throw rewriter_exception(Z3_MAX_RESOURCE_MSG);
|
||||
}
|
||||
SASSERT(!ProofGen || result_stack().size() == result_pr_stack().size());
|
||||
frame & fr = frame_stack().back();
|
||||
expr * t = fr.m_curr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue