12 "large on-the-fly strengthening "
13 "by removing %s from",
15 unsigned *lits = c->
lits;
17 INC (on_the_fly_strengthened);
19 clause *old_next = kissat_next_clause (c);
22 SWAP (
unsigned, lits[0], lits[1]);
25 kissat_unwatch_blocking (
solver,
lit, ref);
29 const unsigned old_size = c->
size;
30 unsigned new_size = 1;
32 for (
unsigned i = 2; i < old_size; i++) {
33 const unsigned other = lits[i];
37 lits[new_size++] = other;
39 kissat_mark_added_literal (
solver, other);
51 LOGCLS (c,
"unsorted on-the-fly strengthened");
54 unsigned highest_pos = 1;
55 unsigned highest_level =
LEVEL (lits[1]);
57 for (
unsigned i = 2; i <
size; i++) {
58 const unsigned other = lits[i];
60 const unsigned level =
LEVEL (other);
61 if (level <= highest_level)
64 highest_level = level;
67 SWAP (
unsigned, lits[1], lits[highest_pos]);
68 LOGCLS (c,
"sorted on-the-fly strengthened");
69 kissat_watch_blocking (
solver, lits[1], lits[0], ref);
88 p[-2].blocking.lit = lits[1];
89 LOGREF (ref,
"updating watching %s now blocking %s in",
93 clause *new_next = kissat_next_clause (c);
104 "binary on-the-fly strengthening "
105 "by removing %s from",
134 LOGBINARY (first, second,
"on-the-fly strengthened");
137 kissat_unwatch_blocking (
solver, c->
lits[0], ref);
138 kissat_unwatch_blocking (
solver, c->
lits[1], ref);
140 clause *conflict = kissat_binary_conflict (
solver, first, second);
149 kissat_mark_removed_literal (
solver,
lit);
151 if (
solver->antecedent_size == 3)
152 res = binary_on_the_fly_strengthen (
solver, c,
lit);
154 res = large_on_the_fly_strengthen (
solver, c,
lit);
159 LOGCLS (c,
"on-the-fly subsuming");
160 LOGCLS (d,
"on-the-fly subsumed");
166 INC (on_the_fly_subsumed);
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
#define CHECK_SHRINK_CLAUSE(...)
void kissat_mark_clause_as_garbage(kissat *solver, clause *c)
void kissat_new_binary_clause(kissat *solver, unsigned first, unsigned second)
void kissat_update_last_irredundant(kissat *solver, clause *irredundant)
#define all_literals_in_clause(LIT, C)
#define KISSAT_assert(ignore)
#define SHRINK_CLAUSE_IN_PROOF(...)
ABC_NAMESPACE_HEADER_START typedef unsigned reference
void kissat_on_the_fly_subsume(kissat *solver, clause *c, clause *d)
clause * kissat_on_the_fly_strengthen(kissat *solver, clause *c, unsigned lit)
#define BEGIN_WATCHES(WS)