3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-19 19:02:02 +00:00

fix transitive reduction bug, eliminate blocked tag on binary clauses, separate BIG structure from scc

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-12-13 02:38:06 -08:00
commit 71c52396cb
26 changed files with 572 additions and 355 deletions

View file

@ -40,6 +40,38 @@ namespace sat {
return false;
}
watched* find_binary_watch(watch_list & wlist, literal l) {
for (watched& w : wlist) {
if (w.is_binary_clause() && w.get_literal() == l) return &w;
}
return nullptr;
}
watched const* find_binary_watch(watch_list const& wlist, literal l) {
for (watched const& w : wlist) {
if (w.is_binary_clause() && w.get_literal() == l) return &w;
}
return nullptr;
}
void erase_binary_watch(watch_list& wlist, literal l) {
watch_list::iterator it = wlist.begin(), end = wlist.end();
watch_list::iterator it2 = it;
bool found = false;
for (; it != end; ++it) {
if (it->is_binary_clause() && it->get_literal() == l && !found) {
found = true;
}
else {
*it2 = *it;
++it2;
}
}
wlist.set_end(it2);
VERIFY(found);
}
std::ostream& display_watch_list(std::ostream & out, clause_allocator const & ca, watch_list const & wlist) {
bool first = true;
for (watched const& w : wlist) {