mirror of
https://github.com/Z3Prover/z3
synced 2025-08-17 08:42:15 +00:00
reworking cancellation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
baee4225a7
commit
96d1066c6a
13 changed files with 42 additions and 47 deletions
|
@ -413,12 +413,13 @@ void context_t<C>::polynomial::display(std::ostream & out, numeral_manager & nm,
|
|||
}
|
||||
|
||||
template<typename C>
|
||||
context_t<C>::context_t(C const & c, params_ref const & p, small_object_allocator * a):
|
||||
context_t<C>::context_t(reslimit& lim, C const & c, params_ref const & p, small_object_allocator * a):
|
||||
m_limit(lim),
|
||||
m_c(c),
|
||||
m_own_allocator(a == 0),
|
||||
m_allocator(a == 0 ? alloc(small_object_allocator, "subpaving") : a),
|
||||
m_bm(*this, *m_allocator),
|
||||
m_im(interval_config(m_c.m())),
|
||||
m_im(lim, interval_config(m_c.m())),
|
||||
m_num_buffer(nm()) {
|
||||
m_arith_failed = false;
|
||||
m_timestamp = 0;
|
||||
|
@ -458,7 +459,7 @@ context_t<C>::~context_t() {
|
|||
|
||||
template<typename C>
|
||||
void context_t<C>::checkpoint() {
|
||||
if (m_limit.canceled())
|
||||
if (!m_limit.inc())
|
||||
throw default_exception("canceled");
|
||||
if (memory::get_allocation_size() > m_max_memory)
|
||||
throw default_exception(Z3_MAX_MEMORY_MSG);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue