3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-12 02:38:07 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2025-08-04 09:44:32 -07:00
parent d593bb89f3
commit d190c83984
4 changed files with 29 additions and 18 deletions

View file

@ -931,8 +931,10 @@ namespace smt {
set_bool_var(id, v);
m_bdata.reserve(v+1);
m_activity.reserve(v+1);
m_lit_scores.reserve(v + 1);
m_lit_scores[v][0] = m_lit_scores[v][1] = 0.0;
m_lit_scores[0].reserve(v + 1);
m_lit_scores[1].reserve(v + 1);
m_lit_scores[0][v] = m_lit_scores[1][v] = 0.0;
m_bool_var2expr.reserve(v+1);
m_bool_var2expr[v] = n;
literal l(v, false);
@ -1543,10 +1545,9 @@ namespace smt {
auto lit = lits[i];
unsigned v = lit.var(); // unique key per literal
auto curr_score = m_lit_scores[v][0] * m_lit_scores[v][1];
m_lit_scores[v][lit.sign()] += 1.0 / n;
m_lit_scores[lit.sign()][v] += 1.0 / n;
auto new_score = m_lit_scores[v][0] * m_lit_scores[v][1];
auto new_score = m_lit_scores[0][v] * m_lit_scores[1][v];
m_pq_scores.set(v, new_score);
}