3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-02 01:13:18 +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

@ -1621,7 +1621,8 @@ public:
}
reslimit& limit() { return m_limit; }
bool canceled() { return !limit().inc(); }
// bool canceled() { return !limit().inc(); }
bool inc() { return limit().inc(); }
void register_plugin(symbol const & s, decl_plugin * plugin);

View file

@ -382,7 +382,7 @@ struct nnf::imp {
void checkpoint() {
if (memory::get_allocation_size() > m_max_memory)
throw nnf_exception(Z3_MAX_MEMORY_MSG);
if (m.canceled())
if (!m.inc())
throw nnf_exception(m.limit().get_cancel_msg());
}

View file

@ -27,7 +27,7 @@ template<typename Cfg>
void bit_blaster_tpl<Cfg>::checkpoint() {
if (memory::get_allocation_size() > m_max_memory)
throw rewriter_exception(Z3_MAX_MEMORY_MSG);
if (m().canceled())
if (!m().inc())
throw rewriter_exception(m().limit().get_cancel_msg());
}

View file

@ -699,7 +699,7 @@ template<typename Config>
template<bool ProofGen>
void rewriter_tpl<Config>::main_loop(expr * t, expr_ref & result, proof_ref & result_pr) {
result_pr = nullptr;
if (m().canceled()) {
if (!m().inc()) {
if (m_cancel_check) {
reset();
throw rewriter_exception(m().limit().get_cancel_msg());
@ -738,7 +738,7 @@ template<bool ProofGen>
void rewriter_tpl<Config>::resume_core(expr_ref & result, proof_ref & result_pr) {
SASSERT(!frame_stack().empty());
while (!frame_stack().empty()) {
if (m().canceled()) {
if (!m().inc()) {
if (m_cancel_check) {
reset();
throw rewriter_exception(m().limit().get_cancel_msg());