21#define INVALID64 INT64_MAX
22#define INVALID UINT_MAX
45 START (sweepimplicant);
47 STOP (sweepimplicant);
52 uint64_t remaining = 0;
53 const uint64_t current =
sweeper.current_ticks;
56 LOG (
"'cadical_kitten_ticks' remaining %" PRIu64, remaining);
63 for (
const auto &
lit : *c) {
87 for (
const auto &
lit : *c) {
88 const signed char tmp =
val (
lit);
99 for (
const auto &
lit : *c)
108 for (
const auto &c :
clauses) {
110 for (
const auto &
lit : *c)
113 }
else if (c->size == 2) {
117 proof->delete_clause (c);
136 uint64_t &ticks =
sweeper.current_ticks;
137 while (i < work.
size ()) {
139 LOG (
"sweeping propagation of %d",
lit);
143 for (
const auto &c : ns) {
148 for (
const auto &other : *c) {
149 const signed char tmp =
val (other);
162 LOG (c,
"sweeping propagation of %d finds %d satisfied",
lit,
167 LOG (
"empty clause during sweeping propagation of %d",
lit);
173 }
else if (unit != INT_MIN) {
174 LOG (
"new unit %d during sweeping propagation of %d", unit,
lit);
177 work.push_back (unit);
187 for (
const auto &c : ps) {
193 LOG (c,
"sweeping propagation of %d produces satisfied",
lit);
202 const uint64_t current =
205 LOG (
"'cadical_kitten_ticks' limit of %" PRIu64
" ticks hit after %" PRIu64
239 sweeper.prev_units.push_back (0);
240 for (
const auto &idx :
vars) {
241 sweeper.prev_units.push_back (
val (idx) != 0);
245 unsigned completed =
stats.sweep_completed;
246 const unsigned max_completed = 32;
247 if (completed > max_completed)
248 completed = max_completed;
250 uint64_t vars_limit =
opts.sweepvars;
251 vars_limit <<= completed;
252 const unsigned max_vars_limit =
opts.sweepmaxvars;
253 if (vars_limit > max_vars_limit)
254 vars_limit = max_vars_limit;
258 uint64_t depth_limit =
stats.sweep_completed;
259 depth_limit +=
opts.sweepdepth;
260 const unsigned max_depth =
opts.sweepmaxdepth;
261 if (depth_limit > max_depth)
262 depth_limit = max_depth;
266 uint64_t clause_limit =
opts.sweepclauses;
267 clause_limit <<= completed;
268 const unsigned max_clause_limit =
opts.sweepmaxclauses;
269 if (clause_limit > max_clause_limit)
270 clause_limit = max_clause_limit;
288 for (
unsigned i = 0; i < 2; i++)
299 LOG (
"clearing sweeping environment");
328 LOG (
"sweeping repr[%d] = %d",
lit, res);
330 const int not_res = -res;
331 int next, prev =
lit;
333 const int not_prev = -prev;
348 const int idx = abs (
lit);
355 LOG (
"sweeping[%u] adding literal %d", depth,
lit);
374 LOG (c,
"sweeping[%u]", depth);
376 for (
const auto &
lit : *c) {
377 const signed char tmp =
val (
lit);
397static void save_core_clause (
void *state,
unsigned id,
bool learned,
398 size_t size,
const unsigned *lits) {
415 const unsigned *end = lits +
size;
416 for (
const unsigned *
p = lits;
p != end;
p++) {
421 pc.
learned ==
true ?
"learned" :
"original");
426static void save_core_clause_with_lrat (
void *state,
unsigned cid,
427 unsigned id,
bool learned,
428 size_t size,
const unsigned *lits,
430 const unsigned *chain) {
439 pc.learned = learned;
448 pc.cad_id = clauses[id]->id;
449 for (
const auto &
lit : *clauses[
id]) {
450 pc.literals.push_back (
lit);
456 const unsigned *end = lits +
size;
457 for (
const unsigned *
p = lits;
p != end;
p++) {
458 pc.literals.push_back (internal->citten2lit (*
p));
460 for (
const unsigned *
p = chain + chain_size;
p != chain;
p--) {
461 pc.chain.push_back (*(
p - 1));
466 LOG (pc.literals,
"traced %s",
467 pc.learned ==
true ?
"learned" :
"original");
470 LOG (clauses[
id],
"traced");
476static int citten_terminate (
void *data) {
477 return ((
Internal *) data)->terminated_asynchronously ();
490 cadical_kitten_set_logging (
citten);
497 LOG (
"check and add extracted core[%u] lemmas to proof", core_idx);
503 unsigned unsat_size = 0;
504 for (
auto &pc : core) {
509 "not adding already present core[%u] cadical_kitten[%u] clause",
510 core_idx, pc.kit_id);
514 LOG (pc.literals,
"adding extracted core[%u] cadical_kitten[%u] lemma",
515 core_idx, pc.kit_id);
517 const unsigned new_size = pc.literals.size ();
521 for (
auto &cid : pc.chain) {
523 for (
const auto &cpc : core) {
524 if (cpc.kit_id == cid) {
532 for (
const auto &
lit : cpc.literals) {
537 const int idx = abs (
lit);
557 LOG (
"sweeping produced empty clause");
559 core.resize (unsat_size);
564 int unit = pc.literals[0];
565 if (
val (unit) > 0) {
566 LOG (
"already assigned sweeping unit %d", unit);
568 }
else if (
val (unit) < 0) {
569 LOG (
"falsified sweeping unit %d leads to empty clause", unit);
575 core.resize (unsat_size);
578 LOG (
"sweeping produced unit %d", unit);
581 sweeper.propagate.push_back (unit);
600 LOG (
"saving extracted core[%u] lemmas", core);
614 LOG (
"clearing core[%u] lemmas", core_idx);
617 LOG (
"deleting sub-solver core clauses");
618 for (
auto &pc : core) {
619 if (pc.learned && pc.literals.size () > 1)
620 proof->delete_clause (pc.cad_id,
true, pc.literals);
633 LOG (
"initializing backbone and equivalent literals candidates");
641 const int not_lit = -
lit;
661 LOG (
"refining partition");
664 auto old_begin = old_partition.begin ();
665 const auto old_end = old_partition.end ();
667 unsigned old_classes = 0;
668 unsigned new_classes = 0;
670 for (
auto p = old_begin, q =
p;
p != old_end;
p = q + 1) {
671 unsigned assigned_true = 0;
673 for (q =
p; (other = *q) != 0; q++) {
680 LOG (
"dropping sub-solver unassigned %d", other);
681 else if (
value > 0) {
682 new_partition.push_back (other);
687 LOG (
"refining class %u of size %zu", old_classes, (
size_t) (q -
p));
690 if (assigned_true == 0)
691 LOG (
"no positive literal in class");
692 else if (assigned_true == 1) {
698 new_partition.back ();
699 new_partition.pop_back ();
700 LOG (
"dropping singleton class %d", other);
702 LOG (
"%u positive literal in class", assigned_true);
703 new_partition.push_back (0);
709 unsigned assigned_false = 0;
710 for (q =
p; (other = *q) != 0; q++) {
717 new_partition.push_back (other);
722 if (assigned_false == 0)
723 LOG (
"no negative literal in class");
724 else if (assigned_false == 1) {
730 new_partition.back ();
731 new_partition.pop_back ();
732 LOG (
"dropping singleton class %d", other);
734 LOG (
"%u negative literal in class", assigned_false);
735 new_partition.push_back (0);
741 old_partition.swap (new_partition);
742 LOG (
"refined %u classes into %u", old_classes, new_classes);
746 LOG (
"refining backbone candidates");
749 for (
auto p = q;
p != end;
p++) {
755 LOG (
"dropping sub-solver unassigned %d",
lit);
765 LOG (
"no need to refine empty backbone candidates");
769 LOG (
"no need to refine empty partition candidates");
775 const unsigned max_rounds =
opts.sweepfliprounds;
782 unsigned total_flipped = 0;
784 unsigned flipped, round = 0;
791 bool limit_hit =
false;
793 const int lit = *
p++;
794 stats.sweep_flip_backbone++;
798 LOG (
"flipping backbone candidate %d succeeded",
lit);
802 stats.sweep_flipped_backbone++;
805 LOG (
"flipping backbone candidate %d failed",
lit);
812 LOG (
"flipped %u backbone candidates in round %u", flipped, round);
822 }
while (flipped && round < max_rounds);
823 LOG (
"flipped %u backbone candidates in total in %u rounds",
824 total_flipped, round);
828 const int not_lit = -
lit;
829 stats.sweep_solved_backbone++;
833 stats.sweep_unknown_backbone++;
837 LOG (
"sweep unit %d",
lit);
839 stats.sweep_unsat_backbone++;
844 LOG (
"trying backbone candidate %d",
lit);
847 stats.sweep_fixed_backbone++;
852 LOG (
"literal %d already fixed",
lit);
858 LOG (
"not flipping due to status %d != 10", res);
860 stats.sweep_flip_backbone++;
862 stats.sweep_flipped_backbone++;
863 LOG (
"flipping %d succeeded",
lit);
868 LOG (
"flipping %d failed",
lit);
869 const int not_lit = -
lit;
870 stats.sweep_solved_backbone++;
874 LOG (
"sweeping backbone candidate %d failed",
lit);
876 stats.sweep_sat_backbone++;
881 LOG (
"sweep unit %d",
lit);
884 stats.sweep_unsat_backbone++;
888 stats.sweep_unknown_backbone++;
890 LOG (
"sweeping backbone candidate %d failed",
lit);
910 for (
const auto &plit : pc.
literals) {
925 external->push_binary_clause_on_extension_stack (
id,
lit, other);
937 bin.push_back (sb.
lit);
938 bin.push_back (sb.
other);
939 proof->delete_clause (sb.
id,
false, bin);
952 LOG (
"rescheduling inner %d as last", idx);
975 LOG (
"scheduling inner %d as last", idx);
988 LOG (
"keeping inner %d scheduled as last", idx);
1005 LOG (
"scheduling outer %d as first", idx);
1011 LOG (
"no more scheduled variables left");
1015 LOG (
"dequeuing next scheduled %d", res);
1033 for (
const auto &
lit : *c) {
1044#define all_scheduled(IDX) \
1045 int IDX = sweeper.first, NEXT_##IDX; \
1046 IDX != 0 && (NEXT_##IDX = sweeper.next[IDX], true); \
1052 int repr, int64_t
id) {
1059 LOG (
"substituting %d with %d in all irredundant clauses",
lit, repr);
1067 uint64_t &ticks =
sweeper.current_ticks;
1072 auto const begin = ns.begin ();
1073 const auto end = ns.end ();
1083 bool repr_already_watched =
false;
1084 const int not_repr = -repr;
1085#ifndef CADICAL_NDEBUG
1088 for (
const auto &other : *c) {
1090#ifndef CADICAL_NDEBUG
1098 if (other == repr) {
1100 repr_already_watched =
true;
1103 if (other == not_repr) {
1107 const signed char tmp =
val (other);
1114 clause.push_back (other);
1123 const unsigned new_size =
clause.size ();
1125 if (new_size == 0) {
1126 LOG (c,
"substituted empty clause");
1132 if (new_size == 1) {
1133 LOG (c,
"reduces to unit");
1134 const int unit =
clause[0];
1137 sweeper.propagate.push_back (unit);
1140 stats.sweep_units++;
1150 proof->delete_clause (c);
1156 for (l = 0; l <
clause.size (); l++)
1158 int flushed = c->
size - (int) l;
1160 LOG (
"flushed %d literals", flushed);
1164 LOG (c,
"substituted");
1165 if (!repr_already_watched) {
1166 occs (repr).push_back (c);
1174 ns.resize (q - ns.begin ());
1188 for (
const auto &sb :
sweeper.binaries) {
1190 const auto lit = sb.lit;
1191 const auto other = sb.other;
1192 if (abs (
lit) < abs (other)) {
1207 }
else if (
val (other) < 0) {
1209 const int64_t oid =
unit_id (-other);
1216 }
else if (
val (other) < 0) {
1219 const int64_t oid =
unit_id (-other);
1231 const auto idx = abs (
lit) < abs (other) ? abs (other) : abs (
lit);
1245 const auto begin_partition = partition.begin ();
1246 auto p = begin_partition;
1247 const auto end_partition = partition.end ();
1248 for (; *
p !=
lit;
p++)
1250 auto begin_class =
p;
1251 while (begin_class != begin_partition && begin_class[-1] != 0)
1254 while (*end_class != 0)
1256 const unsigned size = end_class - begin_class;
1257 LOG (
"removing non-representative %d from equivalence class of size %u",
1260 auto q = begin_class;
1262 LOG (
"completely squashing equivalence class of %d",
lit);
1263 for (
auto r = end_class + 1; r != end_partition; r++)
1266 for (
auto r = begin_class; r != end_partition; r++)
1270 partition.resize (q - partition.begin ());
1274 const unsigned max_rounds =
opts.sweepfliprounds;
1281 unsigned total_flipped = 0;
1283 unsigned flipped, round = 0;
1287 bool refine =
false;
1288 bool limit_hit =
false;
1291 while (src != end) {
1295 unsigned size = end_src - src;
1298 for (
auto p = src;
p != end_src;
p++) {
1308 LOG (
"flipping equivalence candidate %d succeeded",
lit);
1316 LOG (
"flipping equivalence candidate %d failed",
lit);
1319 stats.sweep_flip_equivalences++;
1327 stats.sweep_flipped_equivalences += flipped;
1329 LOG (
"flipped %u equivalence candidates in round %u", flipped, round);
1336 }
while (flipped && round < max_rounds);
1337 LOG (
"flipped %u equivalence candidates in total in %u rounds",
1338 total_flipped, round);
1343 LOG (
"trying equivalence candidates %d = %d",
lit, other);
1349 const int third = (end - begin == 3) ? 0 : end[-4];
1352 stats.sweep_flip_equivalences++;
1354 stats.sweep_flipped_equivalences++;
1355 LOG (
"flipping %d succeeded",
lit);
1357 LOG (
"squashing equivalence class of %d",
lit);
1360 LOG (
"removing %d from equivalence class of %d",
lit, other);
1367 stats.sweep_flip_equivalences++;
1369 stats.sweep_flipped_equivalences++;
1370 LOG (
"flipping %d succeeded", other);
1372 LOG (
"squashing equivalence class of %d",
lit);
1375 LOG (
"removing %d from equivalence class of %d", other,
lit);
1389 LOG (
"squashing equivalence class of %d",
lit);
1392 LOG (
"removing %d from equivalence class of %d",
lit, other);
1398 }
else if (abs (other) > abs (
lit) &&
frozen (other)) {
1400 LOG (
"squashing equivalence class of %d",
lit);
1403 LOG (
"removing %d from equivalence class of %d",
lit, other);
1410 const int not_other = -other;
1411 const int not_lit = -
lit;
1412 LOG (
"flipping %d and %d both failed",
lit, other);
1415 stats.sweep_solved_equivalences++;
1418 stats.sweep_sat_equivalences++;
1419 LOG (
"first sweeping implication %d -> %d failed", other,
lit);
1422 stats.sweep_unknown_equivalences++;
1423 LOG (
"first sweeping implication %d -> %d hit ticks limit", other,
lit);
1429 stats.sweep_unsat_equivalences++;
1430 LOG (
"first sweeping implication %d -> %d succeeded", other,
lit);
1437 stats.sweep_solved_equivalences++;
1439 stats.sweep_sat_equivalences++;
1440 LOG (
"second sweeping implication %d <- %d failed", other,
lit);
1443 stats.sweep_unknown_equivalences++;
1444 LOG (
"second sweeping implication %d <- %d hit ticks limit", other,
1455 stats.sweep_unsat_equivalences++;
1456 LOG (
"second sweeping implication %d <- %d succeeded too", other,
lit);
1460 LOG (
"sweep equivalence %d = %d",
lit, other);
1471 stats.sweep_equivalences++;
1474 if (abs (
lit) > abs (other)) {
1476 bin1.
other = not_other;
1482 bin1.
lit = not_other;
1485 bin2.
other = not_lit;
1489 if (bin1.
id && bin2.
id) {
1490 sweeper.binaries.push_back (bin1);
1491 sweeper.binaries.push_back (bin2);
1496 if (abs (
lit) < abs (other)) {
1508 const int repr_idx = abs (repr);
1517 return "inactive variable";
1518 const int start = idx;
1520 return "non-representative variable";
1527 stats.sweep_variables++;
1529 LOG (
"sweeping %d", idx);
1531 LOG (
"starting sweeping[0]");
1533 LOG (
"finished sweeping[0]");
1534 LOG (
"starting sweeping[1]");
1536 bool limit_reached =
false;
1537 size_t expand = 0, next = 1;
1538 bool success =
false;
1541 uint64_t &ticks =
sweeper.current_ticks;
1542 while (!limit_reached) {
1544 LOG (
"environment clause limit reached");
1545 limit_reached =
true;
1549 LOG (
"finished sweeping[%u]", depth);
1551 LOG (
"environment depth limit reached");
1556 LOG (
"completely copied all clauses");
1560 LOG (
"starting sweeping[%u]", depth);
1562 const unsigned choices = next -
expand;
1563 if (
opts.sweeprand && choices > 1) {
1564 const unsigned swaps =
sweeper.random.pick_int (0, choices - 1);
1571 LOG (
"traversing and adding clauses of %d", idx);
1573 const int lit =
sign ? -idx : idx;
1582 LOG (
"environment variable limit reached");
1583 limit_reached =
true;
1592 stats.sweep_depth += depth;
1596 "sweeping variable %d environment of "
1597 "%zu variables %u clauses depth %u",
1602 LOG (
"not sweeping literal %d with environment size 1", idx);
1606 LOG (
"sub-solver returns '%d'", res);
1609#ifndef CADICAL_QUIET
1610 uint64_t units =
stats.sweep_units;
1611 uint64_t solved =
stats.sweep_solved;
1613 START (sweepbackbone);
1617 limit_reached =
true;
1618 STOP_SWEEP_BACKBONE:
1619 STOP (sweepbackbone);
1625 limit_reached =
true;
1626 goto STOP_SWEEP_BACKBONE;
1637 STOP (sweepbackbone);
1638#ifndef CADICAL_QUIET
1639 units =
stats.sweep_units - units;
1640 solved =
stats.sweep_solved - solved;
1643 "complete swept variable %d backbone with %" PRIu64
1644 " units in %" PRIu64
" solver calls",
1647#ifndef CADICAL_QUIET
1648 uint64_t equivalences =
stats.sweep_equivalences;
1649 solved =
stats.sweep_solved;
1651 START (sweepequivalences);
1655 limit_reached =
true;
1656 STOP_SWEEP_EQUIVALENCES:
1657 STOP (sweepequivalences);
1663 limit_reached =
true;
1664 goto STOP_SWEEP_EQUIVALENCES;
1672 int other = end[-2];
1678 STOP (sweepequivalences);
1679#ifndef CADICAL_QUIET
1680 equivalences =
stats.sweep_equivalences - equivalences;
1681 solved =
stats.sweep_solved - solved;
1684 "complete swept variable %d partition with %" PRIu64
1685 " equivalences in %" PRIu64
" solver calls",
1688 }
else if (res == 20)
1699 if (success && limit_reached)
1700 return "successfully despite reaching limit";
1701 if (!success && !limit_reached)
1702 return "unsuccessfully without reaching limit";
1703 else if (success && !limit_reached)
1704 return "successfully without reaching limit";
1706 return "unsuccessfully and reached limit";
1728 const int lit = idx;
1733 if (
pos > max_occurrences)
1735 const int not_lit = -
lit;
1736 const size_t neg =
noccs (not_lit);
1739 if (neg > max_occurrences)
1741 *occ_ptr =
pos + neg;
1747 for (
const auto &idx :
vars) {
1763 fresh.push_back (cand);
1765 const size_t size = fresh.
size ();
1768 for (
auto &cand : fresh)
1774 unsigned rescheduled = 0;
1795 for (
const auto &idx :
vars) {
1809 flags (idx).sweep =
true;
1814#ifndef CADICAL_QUIET
1815 VERBOSE (2,
"marked %u scheduled sweeping variables as incomplete",
1825 const unsigned scheduled = fresh + rescheduled;
1827#ifndef CADICAL_QUIET
1829 "scheduled %u variables %.0f%% "
1830 "(%u rescheduled %.0f%%, %u incomplete %.0f%%)",
1832 percent (rescheduled, scheduled), incomplete,
1833 percent (incomplete, scheduled));
1839 stats.sweep_completed++;
1846 unsigned scheduled) {
1848 (void) scheduled, (
void) swept;
1855 LOG (
"untried scheduled %d", idx);
1857#ifndef CADICAL_QUIET
1860 VERBOSE (3,
"retained %u variables %.0f%% to be swept next time",
1864 VERBOSE (3,
"need to sweep %u more variables %.0f%% for completion",
1867 VERBOSE (3,
"no more variables needed to complete sweep");
1869 stats.sweep_completed++;
1871 PHASE (
"sweep",
stats.sweep,
"swept %u variables (%u remain %.0f%%)",
1872 swept, incomplete,
percent (incomplete, scheduled));
1883 last.sweep.ticks =
stats.ticks.search[0] +
stats.ticks.search[1];
1893 uint64_t equivalences =
stats.sweep_equivalences;
1894 uint64_t units =
stats.sweep_units;
1896 if (
opts.sweepcomplete)
1902 uint64_t swept = 0,
limit = 10;
1913 flags (idx).sweep =
false;
1914#ifndef CADICAL_QUIET
1918 VERBOSE (2,
"swept[%" PRIu64
"] external variable %d %s", swept,
1920 if (++swept ==
limit) {
1922 "found %" PRIu64
" equivalences and %" PRIu64
1923 " units after sweeping %" PRIu64
" variables ",
1924 stats.sweep_equivalences - equivalences,
1925 stats.sweep_units - units, swept);
1929 VERBOSE (2,
"swept %" PRIu64
" variables", swept);
1930 equivalences =
stats.sweep_equivalences - equivalences,
1931 units =
stats.sweep_units - units;
1933 "found %" PRIu64
" equivalences and %" PRIu64
" units",
1934 equivalences, units);
1945 uint64_t eliminated = equivalences + units;
1946 report (
'=', !eliminated);
1948 if (
relative (eliminated, swept) < 0.001) {
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
#define CADICAL_assert(ignore)
void cadical_kitten_assume_signed(cadical_kitten *cadical_kitten, int elit)
void cadical_kitten_traverse_core_clauses_with_id(cadical_kitten *cadical_kitten, void *state, void(*traverse)(void *state, unsigned, bool learned, size_t, const unsigned *))
unsigned cadical_kitten_compute_clausal_core(cadical_kitten *cadical_kitten, uint64_t *learned_ptr)
cadical_kitten * cadical_kitten_init(void)
int cadical_kitten_flip_and_implicant_for_signed_literal(cadical_kitten *cadical_kitten, int elit)
uint64_t cadical_kitten_current_ticks(cadical_kitten *cadical_kitten)
void cadical_kitten_set_ticks_limit(cadical_kitten *cadical_kitten, uint64_t delta)
ABC_NAMESPACE_IMPL_START typedef signed char value
signed char cadical_kitten_signed_value(cadical_kitten *cadical_kitten, int selit)
int cadical_kitten_solve(cadical_kitten *cadical_kitten)
void cadical_kitten_trace_core(cadical_kitten *cadical_kitten, void *state, void(*trace)(void *, unsigned, unsigned, bool, size_t, const unsigned *, size_t, const unsigned *))
void cadical_kitten_set_terminator(cadical_kitten *cadical_kitten, void *data, int(*terminator)(void *))
void cadical_kitten_clear(cadical_kitten *cadical_kitten)
void citten_clause_with_id(cadical_kitten *cadical_kitten, unsigned id, size_t size, int *elits)
void cadical_kitten_randomize_phases(cadical_kitten *cadical_kitten)
int cadical_kitten_status(cadical_kitten *cadical_kitten)
bool cadical_kitten_flip_signed_literal(cadical_kitten *cadical_kitten, int elit)
void cadical_kitten_release(cadical_kitten *cadical_kitten)
signed char cadical_kitten_fixed_signed(cadical_kitten *cadical_kitten, int elit)
void cadical_kitten_track_antecedents(cadical_kitten *cadical_kitten)
#define all_scheduled(IDX)
#define SET_EFFORT_LIMIT(LIMIT, NAME, THRESHHOLD)
double relative(double a, double b)
void erase_vector(std::vector< T > &v)
double percent(double a, double b)
#define START_SIMPLIFIER(S, M)
#define STOP_SIMPLIFIER(S, M)
void citten_clear_track_log_terminate()
void save_add_clear_core(Sweeper &sweeper)
int64_t cache_lines(size_t bytes)
unsigned schedule_all_other_not_scheduled_yet(Sweeper &sweeper)
void sweep_dense_propagate(Sweeper &sweeper)
void unschedule_sweeping(Sweeper &sweeper, unsigned swept, unsigned scheduled)
void sweep_refine(Sweeper &sweeper)
int next_scheduled(Sweeper &sweeper)
void sweep_update_noccs(Clause *c)
unsigned incomplete_variables()
void add_literal_to_environment(Sweeper &sweeper, unsigned depth, int)
void sweep_substitute_lrat(Clause *c, int64_t id)
unsigned reschedule_previously_remaining(Sweeper &sweeper)
void mark_garbage(Clause *)
vector< int64_t > lrat_chain
bool scheduled_variable(Sweeper &sweeper, int idx)
void report(char type, int verbose_level=0)
bool cadical_kitten_ticks_limit_hit(Sweeper &sweeper, const char *when)
void sweep_add_clause(Sweeper &sweeper, unsigned depth)
void sweep_remove(Sweeper &sweeper, int lit)
bool terminated_asynchronously(int factor=1)
void mark_removed(int lit)
unsigned schedule_sweeping(Sweeper &sweeper)
void sweep_set_cadical_kitten_ticks_limit(Sweeper &sweeper)
bool can_sweep_clause(Clause *c)
void learn_empty_clause()
void assign_unit(int lit)
void mark_substituted(int)
void schedule_outer(Sweeper &sweeper, int idx)
void clear_sweeper(Sweeper &sweeper)
void release_sweeper(Sweeper &sweeper)
const char * sweep_variable(Sweeper &sweeper, int idx)
int sweep_flip_and_implicant(int)
void sweep_empty_clause(Sweeper &sweeper)
void sweep_substitute_new_equivalences(Sweeper &sweeper)
signed char val(int lit) const
bool limit(const char *name, int)
signed char marked(int lit) const
int64_t unit_id(int lit) const
void init_sweeper(Sweeper &sweeper)
vector< int > sweep_schedule
bool sweep_extract_fixed(Sweeper &sweeper, int lit)
void save_core(Sweeper &sweeper, unsigned core)
void sweep_refine_backbone(Sweeper &sweeper)
void sweep_refine_partition(Sweeper &sweeper)
void sweep_dense_mode_and_watch_irredundant()
void clear_core(Sweeper &sweeper, unsigned core_idx)
int sweep_repr(Sweeper &sweeper, int lit)
void init_backbone_and_partition(Sweeper &sweeper)
vector< Clause * > clauses
void flip_backbone_literals(struct Sweeper &sweeper)
void clear_analyzed_literals()
int64_t add_sweep_binary(sweep_proof_clause, int lit, int other)
void substitute_connected_clauses(Sweeper &sweeper, int lit, int other, int64_t id)
void add_core(Sweeper &sweeper, unsigned core_idx)
bool scheduable_variable(Sweeper &sweeper, int idx, size_t *occ_ptr)
void delete_sweep_binary(const sweep_binary &sb)
size_t shrink_clause(Clause *, int new_size)
int citten2lit(unsigned ulit)
void schedule_inner(Sweeper &sweeper, int idx)
void sweep_clause(Sweeper &sweeper, unsigned depth, Clause *)
void mark_added(int lit, int size, bool redundant)
void flip_partition_literals(struct Sweeper &sweeper)
bool likely_to_be_kept_clause(Clause *c)
bool sweep_backbone_candidate(Sweeper &sweeper, int lit)
bool sweep_equivalence_candidates(Sweeper &sweeper, int lit, int other)
void build_chain_for_units(int lit, Clause *reason, bool forced)
void mark_incomplete(Sweeper &sweeper)
void connect_watches(bool irredundant_only=false)
Sweeper(Internal *internal)
bool operator()(sweep_candidate a, sweep_candidate b) const
struct sweeper::@220272220222261246232307276064033320167134062222 limit