mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
commit
54a9482716
145 changed files with 2605 additions and 1588 deletions
|
@ -92,6 +92,15 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
obj_ref & operator=(obj_ref && n) {
|
||||
SASSERT(&m_manager == &n.m_manager);
|
||||
if (this != &n) {
|
||||
std::swap(m_obj, n.m_obj);
|
||||
n.reset();
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
void reset() {
|
||||
dec_ref();
|
||||
m_obj = nullptr;
|
||||
|
|
|
@ -58,6 +58,8 @@ public:
|
|||
return m_fid2plugins.get(fid, 0);
|
||||
}
|
||||
|
||||
ptr_vector<Plugin> const& plugins() const { return m_plugins; }
|
||||
|
||||
typename ptr_vector<Plugin>::const_iterator begin() const {
|
||||
return m_plugins.begin();
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ class top_sort {
|
|||
|
||||
public:
|
||||
|
||||
~top_sort() {
|
||||
virtual ~top_sort() {
|
||||
for (auto & kv : m_deps) dealloc(kv.m_value);
|
||||
}
|
||||
|
||||
|
@ -96,6 +96,20 @@ public:
|
|||
}
|
||||
|
||||
ptr_vector<T> const& top_sorted() { return m_top_sorted; }
|
||||
|
||||
obj_map<T, unsigned> const& partition_ids() const { return m_partition_id; }
|
||||
|
||||
unsigned partition_id(T* t) const { return m_partition_id[t]; }
|
||||
|
||||
bool is_singleton_partition(T* f) const {
|
||||
unsigned pid = m_partition_id[f];
|
||||
return f == m_top_sorted[pid] &&
|
||||
(pid == 0 || m_partition_id[m_top_sorted[pid-1]] != pid) &&
|
||||
(pid + 1 == m_top_sorted.size() || m_partition_id[m_top_sorted[pid+1]] != pid);
|
||||
}
|
||||
|
||||
obj_map<T, T_set*> const& deps() const { return m_deps; }
|
||||
|
||||
};
|
||||
|
||||
#endif /* TOP_SORT_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue