3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-02 17:30:23 +00:00

bug fixes, prepare for retaining blocked clauses

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-10-19 22:19:05 -07:00
parent 636f740b1a
commit 76eed064eb
16 changed files with 333 additions and 234 deletions

View file

@ -22,17 +22,20 @@ Revision History:
namespace sat {
bool clause_use_list::check_invariant() const {
#ifdef LAZY_USE_LIST
unsigned sz = 0;
for (unsigned i = 0; i < m_clauses.size(); i++)
if (!m_clauses[i]->was_removed())
for (clause* c : m_clauses)
if (!c->was_removed())
sz++;
SASSERT(sz == m_size);
#endif
unsigned blocked = 0;
for (clause* c : m_clauses)
if (c->is_blocked())
blocked++;
SASSERT(blocked == m_num_blocked);
return true;
}
#ifdef LAZY_USE_LIST
void clause_use_list::iterator::consume() {
while (true) {
if (m_i == m_size)
@ -44,14 +47,11 @@ namespace sat {
m_i++;
}
}
#endif
clause_use_list::iterator::~iterator() {
#ifdef LAZY_USE_LIST
while (m_i < m_size)
next();
m_clauses.shrink(m_j);
#endif
}
};