mirror of
https://github.com/Z3Prover/z3
synced 2025-10-01 21:49:29 +00:00
This reverts commit c8e866f568
.
This commit is contained in:
parent
1e7832a391
commit
e24a5b6624
9 changed files with 224 additions and 1054 deletions
|
@ -931,10 +931,6 @@ namespace smt {
|
|||
set_bool_var(id, v);
|
||||
m_bdata.reserve(v+1);
|
||||
m_activity.reserve(v+1);
|
||||
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);
|
||||
|
@ -1423,7 +1419,6 @@ namespace smt {
|
|||
break;
|
||||
case CLS_LEARNED:
|
||||
dump_lemma(num_lits, lits);
|
||||
add_scores(num_lits, lits);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -1532,27 +1527,6 @@ namespace smt {
|
|||
}}
|
||||
}
|
||||
|
||||
// void context::add_scores(unsigned n, literal const* lits) {
|
||||
// for (unsigned i = 0; i < n; ++i) {
|
||||
// auto lit = lits[i];
|
||||
// unsigned v = lit.var();
|
||||
// m_lit_scores[v][lit.sign()] += 1.0 / n;
|
||||
// }
|
||||
// }
|
||||
|
||||
void context::add_scores(unsigned n, literal const* lits) {
|
||||
for (unsigned i = 0; i < n; ++i) {
|
||||
auto lit = lits[i];
|
||||
unsigned v = lit.var(); // unique key per literal
|
||||
|
||||
m_lit_scores[lit.sign()][v] += 1.0 / n;
|
||||
|
||||
auto new_score = m_lit_scores[0][v] * m_lit_scores[1][v];
|
||||
m_pq_scores.set(v, new_score);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void context::dump_axiom(unsigned n, literal const* lits) {
|
||||
if (m_fparams.m_axioms2files) {
|
||||
literal_buffer tmp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue