mirror of
https://github.com/Z3Prover/z3
synced 2025-11-13 17:41:16 +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
|
|
@ -1453,8 +1453,7 @@ namespace pdr {
|
|||
m_search(m_params.pdr_bfs_model_search()),
|
||||
m_last_result(l_undef),
|
||||
m_inductive_lvl(0),
|
||||
m_expanded_lvl(0),
|
||||
m_cancel(false)
|
||||
m_expanded_lvl(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -1465,7 +1464,6 @@ namespace pdr {
|
|||
|
||||
void context::reset() {
|
||||
TRACE("pdr", tout << "\n";);
|
||||
cleanup();
|
||||
decl2rel::iterator it = m_rels.begin(), end = m_rels.end();
|
||||
for (; it != end; ++it) {
|
||||
dealloc(it->m_value);
|
||||
|
|
@ -1912,16 +1910,8 @@ namespace pdr {
|
|||
return l_undef;
|
||||
}
|
||||
|
||||
void context::cancel() {
|
||||
m_cancel = true;
|
||||
}
|
||||
|
||||
void context::cleanup() {
|
||||
m_cancel = false;
|
||||
}
|
||||
|
||||
void context::checkpoint() {
|
||||
if (m_cancel) {
|
||||
if (!m.limit().inc()) {
|
||||
throw default_exception("pdr canceled");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -336,7 +336,6 @@ namespace pdr {
|
|||
unsigned m_expanded_lvl;
|
||||
ptr_vector<core_generalizer> m_core_generalizers;
|
||||
stats m_stats;
|
||||
volatile bool m_cancel;
|
||||
model_converter_ref m_mc;
|
||||
proof_converter_ref m_pc;
|
||||
|
||||
|
|
@ -411,9 +410,6 @@ namespace pdr {
|
|||
|
||||
lbool solve();
|
||||
|
||||
void cancel();
|
||||
|
||||
void cleanup();
|
||||
|
||||
void reset();
|
||||
|
||||
|
|
|
|||
|
|
@ -206,13 +206,7 @@ expr_ref dl_interface::get_answer() {
|
|||
return m_context->get_answer();
|
||||
}
|
||||
|
||||
void dl_interface::cancel() {
|
||||
m_context->cancel();
|
||||
}
|
||||
|
||||
void dl_interface::cleanup() {
|
||||
m_context->cleanup();
|
||||
}
|
||||
|
||||
void dl_interface::updt_params() {
|
||||
dealloc(m_context);
|
||||
|
|
|
|||
|
|
@ -51,10 +51,6 @@ namespace pdr {
|
|||
|
||||
virtual lbool query(expr* query);
|
||||
|
||||
virtual void cancel();
|
||||
|
||||
virtual void cleanup();
|
||||
|
||||
virtual void display_certificate(std::ostream& out) const;
|
||||
|
||||
virtual void collect_statistics(statistics& st) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue