mirror of
https://github.com/Z3Prover/z3
synced 2025-06-20 21:03:39 +00:00
API to find pob in pob_manager
This commit is contained in:
parent
5bc57238a6
commit
f6dcc6fc72
2 changed files with 17 additions and 2 deletions
|
@ -2168,7 +2168,21 @@ pob* pred_transformer::pob_manager::mk_pob(pob *parent,
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pob* pred_transformer::pob_manager::find_pob(pob* parent, expr *post) {
|
||||||
|
pob p(parent, m_pt, 0, 0, false);
|
||||||
|
p.set_post(post);
|
||||||
|
pob *res = nullptr;
|
||||||
|
if (m_pobs.contains(p.post())) {
|
||||||
|
for (auto *f : m_pobs[p.post()]) {
|
||||||
|
if (f->parent() == parent) {
|
||||||
|
// try to find pob not already in queue
|
||||||
|
if (!f->is_in_queue()) return f;
|
||||||
|
res = f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ----------------
|
// ----------------
|
||||||
|
|
|
@ -304,6 +304,7 @@ class pred_transformer {
|
||||||
}
|
}
|
||||||
unsigned size() const {return m_pinned.size();}
|
unsigned size() const {return m_pinned.size();}
|
||||||
|
|
||||||
|
pob* find_pob(pob* parent, expr *post);
|
||||||
};
|
};
|
||||||
|
|
||||||
class pt_rule {
|
class pt_rule {
|
||||||
|
@ -601,7 +602,6 @@ class pob {
|
||||||
std::map<unsigned, stopwatch> m_expand_watches;
|
std::map<unsigned, stopwatch> m_expand_watches;
|
||||||
unsigned m_blocked_lvl;
|
unsigned m_blocked_lvl;
|
||||||
|
|
||||||
void set_post(expr *post);
|
|
||||||
public:
|
public:
|
||||||
pob (pob* parent, pred_transformer& pt,
|
pob (pob* parent, pred_transformer& pt,
|
||||||
unsigned level, unsigned depth=0, bool add_to_parent=true);
|
unsigned level, unsigned depth=0, bool add_to_parent=true);
|
||||||
|
@ -610,6 +610,7 @@ public:
|
||||||
|
|
||||||
// TBD: move into constructor and make private
|
// TBD: move into constructor and make private
|
||||||
void set_post(expr *post, app_ref_vector const &binding);
|
void set_post(expr *post, app_ref_vector const &binding);
|
||||||
|
void set_post(expr *post);
|
||||||
|
|
||||||
unsigned weakness() {return m_weakness;}
|
unsigned weakness() {return m_weakness;}
|
||||||
void bump_weakness() {m_weakness++;}
|
void bump_weakness() {m_weakness++;}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue