3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

Merge pull request #8 from Z3Prover/master

merge with Z3Prover/z3
This commit is contained in:
trinhmt 2018-06-27 18:10:54 +08:00 committed by GitHub
commit 54a9482716
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
145 changed files with 2605 additions and 1588 deletions

View file

@ -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;

View file

@ -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();
}

View file

@ -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_ */