mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
create insert-fresh and insert for indexed_uint_set to make use cases with non-fresh inserts easier
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
0478ab1498
commit
7b36563196
5 changed files with 13 additions and 8 deletions
|
@ -317,7 +317,7 @@ namespace sat {
|
|||
// cls becomes false: flip any variable in clause to receive reward w
|
||||
switch (ci.m_num_trues) {
|
||||
case 0: {
|
||||
m_unsat.insert(cls_idx);
|
||||
m_unsat.insert_fresh(cls_idx);
|
||||
clause const& c = get_clause(cls_idx);
|
||||
for (literal l : c) {
|
||||
inc_reward(l, w);
|
||||
|
@ -406,7 +406,7 @@ namespace sat {
|
|||
inc_reward(lit, ci.m_weight);
|
||||
inc_make(lit);
|
||||
}
|
||||
m_unsat.insert(i);
|
||||
m_unsat.insert_fresh(i);
|
||||
break;
|
||||
case 1:
|
||||
dec_reward(to_literal(ci.m_trues), ci.m_weight);
|
||||
|
|
|
@ -178,7 +178,7 @@ namespace sat {
|
|||
|
||||
inline void inc_make(literal lit) {
|
||||
bool_var v = lit.var();
|
||||
if (make_count(v)++ == 0) m_unsat_vars.insert(v);
|
||||
if (make_count(v)++ == 0) m_unsat_vars.insert_fresh(v);
|
||||
}
|
||||
|
||||
inline void dec_make(literal lit) {
|
||||
|
|
|
@ -990,7 +990,7 @@ namespace sat {
|
|||
m_rating.push_back(0);
|
||||
m_vprefix.push_back(prefix());
|
||||
if (!m_s.was_eliminated(v))
|
||||
m_freevars.insert(v);
|
||||
m_freevars.insert_fresh(v);
|
||||
}
|
||||
|
||||
void lookahead::init(bool learned) {
|
||||
|
@ -1096,7 +1096,7 @@ namespace sat {
|
|||
literal l = m_trail[i];
|
||||
set_undef(l);
|
||||
TRACE("sat", tout << "inserting free var v" << l.var() << "\n";);
|
||||
m_freevars.insert(l.var());
|
||||
m_freevars.insert_fresh(l.var());
|
||||
}
|
||||
|
||||
m_num_tc1 = m_num_tc1_lim.back();
|
||||
|
|
|
@ -80,7 +80,7 @@ namespace sat {
|
|||
ci.del(lit);
|
||||
switch (ci.m_num_trues) {
|
||||
case 0:
|
||||
m_unsat.insert(cls_idx);
|
||||
m_unsat.insert_fresh(cls_idx);
|
||||
dec_break(lit);
|
||||
break;
|
||||
case 1:
|
||||
|
@ -184,7 +184,7 @@ namespace sat {
|
|||
}
|
||||
switch (ci.m_num_trues) {
|
||||
case 0:
|
||||
m_unsat.insert(i);
|
||||
m_unsat.insert_fresh(i);
|
||||
break;
|
||||
case 1:
|
||||
inc_break(to_literal(ci.m_trues));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue