mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
cleanup deprecated critical sections, fix cancellation for par_or_else tactic
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
c97db1722d
commit
2a051719d8
50 changed files with 105 additions and 276 deletions
|
@ -56,3 +56,16 @@ void reslimit::pop() {
|
|||
m_limits.pop_back();
|
||||
m_cancel = false;
|
||||
}
|
||||
|
||||
void reslimit::cancel() {
|
||||
m_cancel = true;
|
||||
for (unsigned i = 0; i < m_children.size(); ++i) {
|
||||
m_children[i]->cancel();
|
||||
}
|
||||
}
|
||||
void reslimit::reset_cancel() {
|
||||
m_cancel = false;
|
||||
for (unsigned i = 0; i < m_children.size(); ++i) {
|
||||
m_children[i]->reset_cancel();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,19 +26,22 @@ class reslimit {
|
|||
uint64 m_count;
|
||||
uint64 m_limit;
|
||||
svector<uint64> m_limits;
|
||||
|
||||
ptr_vector<reslimit> m_children;
|
||||
public:
|
||||
reslimit();
|
||||
void push(unsigned delta_limit);
|
||||
void pop();
|
||||
void push_child(reslimit* r) { m_children.push_back(r); }
|
||||
void pop_child() { m_children.pop_back(); }
|
||||
|
||||
bool inc();
|
||||
bool inc(unsigned offset);
|
||||
uint64 count() const;
|
||||
|
||||
|
||||
bool cancel_flag_set() { return m_cancel; }
|
||||
void cancel() { m_cancel = true; }
|
||||
void reset_cancel() { m_cancel = false; }
|
||||
void cancel();
|
||||
void reset_cancel();
|
||||
};
|
||||
|
||||
class scoped_rlimit {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue