3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 11:55:51 +00:00

fix and coallesce clique functionality

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2016-11-19 03:55:48 -08:00
parent 1600823435
commit ea601dd403
17 changed files with 361 additions and 119 deletions

View file

@ -163,10 +163,11 @@ public:
class iterator {
uint_set const* m_set;
unsigned m_index;
unsigned m_last;
bool invariant() const { return m_index <= m_set->get_max_elem(); }
bool invariant() const { return m_index <= m_last; }
bool at_end() const { return m_index == m_set->get_max_elem(); }
bool at_end() const { return m_index == m_last; }
void scan_idx() {
SASSERT(invariant());
@ -200,7 +201,7 @@ public:
}
public:
iterator(uint_set const& s, bool at_end):
m_set(&s), m_index(at_end?s.get_max_elem():0) {
m_set(&s), m_index(at_end?s.get_max_elem():0), m_last(s.get_max_elem()) {
scan();
SASSERT(invariant());
}
@ -212,6 +213,7 @@ public:
iterator & operator=(iterator const& other) {
m_set = other.m_set;
m_index = other.m_index;
m_last = other.m_last;
return *this;
}
};