22 if (!
stats.current.redundant && !
stats.current.irredundant)
43 "transitive reduction limit of %" PRId64
" propagations",
limit);
45 const auto end =
clauses.end ();
50 for (; i != end; i++) {
67 "rescheduling all clauses since no clauses to check left");
68 for (i =
clauses.begin (); i != end; i++) {
86 int64_t propagations = 0, units = 0, removed = 0;
89 propagations <
limit) {
109 LOG (c,
"checking transitive reduction of");
118 if (
val (src) ||
val (dst))
126 LOG (
"searching path from %d to %d", src, dst);
136 work.push_back (src);
137 LOG (
"transred assign %d", src);
139 bool transitive =
false;
148 while (!transitive && !
failed && j < work.
size ()) {
149 const int lit = work[j++];
151 LOG (
"transred propagating %d",
lit);
156 for (k = ws.begin (); !transitive && !
failed && k != eow; k++) {
167 const int other = w.
blit;
171 const int tmp =
marked (other);
178 work.push_back (other);
180 LOG (
"found both %d and %d reachable", -other, other);
188 work.push_back (other);
189 LOG (
"transred assign %d", other);
195 int failed_lit = work.back ();
201 while (!work.empty ()) {
202 const int lit = work.back ();
206 LOG (
"transred LRAT current lit %d next pos %d next neg %d",
lit,
208 if (
lit == failed_lit ||
lit == next_pos) {
211 }
else if (
lit == -failed_lit ||
lit == next_neg) {
229 LOG (c,
"transitive redundant");
233 LOG (
"found failed literal %d during transitive reduction", src);
235 stats.transredunits++;
238 VERBOSE (1,
"propagating new unit results in conflict");
245 last.transred.propagations =
stats.propagations.search;
246 stats.propagations.transred += propagations;
250 "removed %" PRId64
" transitive clauses, found %" PRId64
" units",
254 report (
't', !
opts.reportall && !(removed + units));
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
#define CADICAL_assert(ignore)
Watches::const_iterator const_watch_iterator
void erase_vector(std::vector< T > &v)
#define START_SIMPLIFIER(S, M)
#define STOP_SIMPLIFIER(S, M)
int64_t irredundant() const
void mark_garbage(Clause *)
vector< int64_t > lrat_chain
void report(char type, int verbose_level=0)
bool terminated_asynchronously(int factor=1)
void learn_empty_clause()
void assign_unit(int lit)
signed char val(int lit) const
bool limit(const char *name, int)
signed char marked(int lit) const
vector< Clause * > clauses
vector< int64_t > mini_chain
Watches & watches(int lit)