mirror of
https://github.com/Z3Prover/z3
synced 2025-07-19 19:02:02 +00:00
fix missing clear of weights
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
5206e29bdd
commit
4f7b6a2f18
1 changed files with 2 additions and 1 deletions
|
@ -481,6 +481,7 @@ namespace sat {
|
||||||
w2 = m_weights[(~l).index()];
|
w2 = m_weights[(~l).index()];
|
||||||
if (w1 >= w2) {
|
if (w1 >= w2) {
|
||||||
if (w2 >= k) {
|
if (w2 >= k) {
|
||||||
|
for (literal l2 : lits) m_weights[l2.index()] = 0;
|
||||||
// constraint is true
|
// constraint is true
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2614,8 +2615,8 @@ namespace sat {
|
||||||
|
|
||||||
// pre-condition is that the literals, except c.lit(), in c are unwatched.
|
// pre-condition is that the literals, except c.lit(), in c are unwatched.
|
||||||
if (c.id() == _bad_id) std::cout << "recompile: " << c << "\n";
|
if (c.id() == _bad_id) std::cout << "recompile: " << c << "\n";
|
||||||
// IF_VERBOSE(0, verbose_stream() << "re: " << c << "\n";);
|
|
||||||
m_weights.resize(2*s().num_vars(), 0);
|
m_weights.resize(2*s().num_vars(), 0);
|
||||||
|
|
||||||
for (literal l : c) {
|
for (literal l : c) {
|
||||||
++m_weights[l.index()];
|
++m_weights[l.index()];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue