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

adding wpm2 algorithm

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2013-12-20 16:46:23 -08:00
parent 0deb951873
commit 6aa0086969
3 changed files with 197 additions and 9 deletions

View file

@ -199,6 +199,9 @@ namespace smt {
bool context::bcp() {
SASSERT(!inconsistent());
while (m_qhead < m_assigned_literals.size()) {
if (m_cancel_flag) {
return true;
}
literal l = m_assigned_literals[m_qhead];
SASSERT(get_assignment(l) == l_true);
m_qhead++;
@ -225,9 +228,6 @@ namespace smt {
case l_true:
break;
}
if (m_cancel_flag) {
return true;
}
}
}

View file

@ -35,6 +35,7 @@ namespace smt {
sum += coeff(i);
}
m_k = sum - m_k + numeral::one();
VERIFY(l_undef == normalize());
SASSERT(well_formed());
}
@ -381,9 +382,11 @@ namespace smt {
else {
SASSERT(m_util.is_at_least_k(atom) || m_util.is_ge(atom));
}
TRACE("pb", display(tout, *c););
c->unique();
lbool is_true = c->normalize();
c->prune();
TRACE("pb", display(tout, *c););
literal lit(abv);