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

add unit walk engine

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-12-17 16:09:07 -08:00
parent 5adfae0fa8
commit a5b663c52d
16 changed files with 604 additions and 47 deletions

View file

@ -27,11 +27,10 @@ namespace sat {
for (; it != end; ++it) {
if (it->is_clause() && it->get_clause_offset() == c) {
watch_list::iterator it2 = it;
++it;
for (; it != end; ++it) {
++it;
for (; it != end; ++it, ++it2) {
SASSERT(!((it->is_clause() && it->get_clause_offset() == c)));
*it2 = *it;
++it2;
}
wlist.set_end(it2);
return true;
@ -71,6 +70,13 @@ namespace sat {
VERIFY(found);
}
void conflict_cleanup(watch_list::iterator it, watch_list::iterator it2, watch_list& wlist) {
watch_list::iterator end = wlist.end();
for (; it != end; ++it, ++it2)
*it2 = *it;
wlist.set_end(it2);
}
std::ostream& display_watch_list(std::ostream & out, clause_allocator const & ca, watch_list const & wlist) {
bool first = true;