348 if (!
stats.current.redundant && !
stats.current.irredundant)
352 stats.subsumerounds++;
355 if (
opts.subsumelimited) {
356 int64_t delta =
stats.propagations.search;
357 delta *= 1e-3 *
opts.subsumeeffort;
358 if (delta <
opts.subsumemineff)
359 delta =
opts.subsumemineff;
360 if (delta >
opts.subsumemaxeff)
361 delta =
opts.subsumemaxeff;
362 delta = max (delta, (int64_t) 2l *
active ());
365 "limit of %" PRId64
" subsumption checks", delta);
367 check_limit =
stats.subchecks + delta;
370 "unlimited subsumption checks");
371 check_limit = LONG_MAX;
374 int old_marked_candidate_variables_for_elimination =
stats.mark.elim;
385 int64_t left_over_from_last_subsumption_round = 0;
391 if (c->size >
opts.subsumeclslim)
398 for (
const auto &
lit : *c)
410 LOG (c,
"skipping (fixed literal)");
418 LOG (c,
"skipping (only %d added literals)",
subsume);
423 left_over_from_last_subsumption_round++;
425 for (
const auto &
lit : *c)
434 if (!left_over_from_last_subsumption_round)
435 for (
auto cs : schedule)
436 if (cs.clause->size > 2)
437 cs.clause->subsume =
true;
440 int64_t scheduled = schedule.
size ();
441 int64_t total =
stats.current.irredundant +
stats.current.redundant;
443 "scheduled %" PRId64
" clauses %.0f%% out of %" PRId64
" clauses",
444 scheduled,
percent (scheduled, total), total);
454 int64_t subsumed = 0, strengthened = 0, checked = 0;
460 for (
const auto &s : schedule) {
464 if (
stats.subchecks >= check_limit)
504 for (
const auto &
lit : *c) {
509 if (minlit && minsize <= size)
512 if (minlit && minsize == size && tmp <= minoccs)
514 minlit =
lit, minsize = size, minoccs = tmp;
529 if (minsize > (
size_t)
opts.subsumeocclim)
533 "watching %d with %zd current and total %" PRId64
" occurrences",
534 minlit, minsize, minoccs);
536 occs (minlit).push_back (c);
553 if (minsize > (
size_t)
opts.subsumebinlim)
557 "watching %d with %zd current binary and total %" PRId64
559 minlit, minsize, minoccs);
561 const int minlit_pos = (c->
literals[1] == minlit);
562 const int other = c->
literals[!minlit_pos];
563 bins (minlit).push_back (
Bin{other, c->
id});
568 "subsumed %" PRId64
" and strengthened %" PRId64
" out of %" PRId64
570 subsumed, strengthened, scheduled,
571 percent (subsumed + strengthened, scheduled));
573 const int64_t remain = schedule.
size () - checked;
574 const bool completed = !remain;
578 "checked all %" PRId64
" scheduled clauses", checked);
581 "checked %" PRId64
" clauses %.0f%% of scheduled (%" PRId64
583 checked,
percent (checked, scheduled), remain);
598 for (
const auto &c : shrunken)
602 report (
's', !
opts.reportall && !(subsumed + strengthened));
606 return old_marked_candidate_variables_for_elimination <
stats.mark.elim;