21 if (!
stats.current.redundant)
23 return stats.conflicts >=
lim.reduce;
39 const int tier1limit =
tier1[
false];
40 const int tier2limit = max (tier1limit,
tier2[
false]);
48 const unsigned used = c->used;
51 if (c->glue < tier1limit && used)
53 if (c->glue < tier2limit && used >=
max_used - 1)
59 stats.flush.learned++;
101 const int tier1limit =
tier1[
false];
102 const int tier2limit = max (tier1limit,
tier2[
false]);
104 stack.reserve (
stats.current.redundant);
106 for (
const auto &c :
clauses) {
113 const unsigned used = c->used;
116 if (c->glue <= tier1limit && used)
118 if (c->glue <= tier2limit && used >=
max_used - 1)
130 size_t target = 1e-2 *
opts.reducetarget * stack.
size ();
136 if (target > stack.
size ())
137 target = stack.
size ();
139 PHASE (
"reduce",
stats.reductions,
"reducing %zd clauses %.0f%%", target,
142 auto i = stack.begin ();
143 const auto t = i + target;
146 LOG (c,
"marking useless to be collected");
151 lim.keptsize =
lim.keptglue = 0;
153 const auto end = stack.end ();
154 for (i = t; i != end; i++) {
165 PHASE (
"reduce",
stats.reductions,
"maximum kept size %d glue %d",
166 lim.keptsize,
lim.keptglue);
185 LOG (
"found out-of-order assigned unit %d", oou);
239 int64_t delta =
opts.reduceint;
241 if (
opts.reduceopt ==
243 delta = delta * delta / 2;
244 else if (
opts.reduceopt == 1) {
248 }
else if (
opts.reduceopt == 2)
259 lim.reduce =
stats.conflicts + delta;
261 "new reduce limit %" PRId64
" after %" PRId64
" conflicts",
266 PHASE (
"flush",
stats.flush.count,
"new flush increment %" PRId64
"",
270 PHASE (
"flush",
stats.flush.count,
"new flush limit %" PRId64
"",
278 report (flush ?
'f' :
'-');
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
#define CADICAL_assert(ignore)
void erase_vector(std::vector< T > &v)
double percent(double a, double b)
int64_t irredundant() const
void garbage_collection()
void mark_garbage(Clause *)
void report(char type, int verbose_level=0)
void learn_empty_clause()
bool propagate_out_of_order_units()
signed char val(int lit) const
void mark_useless_redundant_clauses_as_garbage()
void backtrack(int target_level=0)
vector< Clause * > clauses
void mark_satisfied_clauses_as_garbage()
void mark_clauses_to_be_flushed()
bool operator()(const Clause *c, const Clause *d) const