ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
cadical_block.cpp
Go to the documentation of this file.
1#include "global.h"
2
3#include "internal.hpp"
4
6
7namespace CaDiCaL {
8
9/*------------------------------------------------------------------------*/
10
11// This implements an inprocessing version of blocked clause elimination and
12// is assumed to be triggered just before bounded variable elimination. It
13// has a separate 'block' flag while variable elimination uses 'elim'.
14// Thus it only tries to block clauses on a literal which was removed in an
15// irredundant clause in negated form before and has not been tried to use
16// as blocking literal since then.
17
18/*------------------------------------------------------------------------*/
19
20inline bool block_more_occs_size::operator() (unsigned a, unsigned b) {
21 size_t s = internal->noccs (-internal->u2i (a));
22 size_t t = internal->noccs (-internal->u2i (b));
23 if (s > t)
24 return true;
25 if (s < t)
26 return false;
27 s = internal->noccs (internal->u2i (a));
28 t = internal->noccs (internal->u2i (b));
29 if (s > t)
30 return true;
31 if (s < t)
32 return false;
33 return a > b;
34}
35
36/*------------------------------------------------------------------------*/
37
38// Determine whether 'c' is blocked on 'lit', by first marking all its
39// literals and then checking all resolvents with negative clauses (with
40// '-lit') are tautological. We use a move-to-front scheme for both the
41// occurrence list of negative clauses (with '-lit') and then for literals
42// within each such clause. The clause move-to-front scheme has the goal to
43// find non-tautological clauses faster in the future, while the literal
44// move-to-front scheme has the goal to faster find the matching literal,
45// which makes the resolvent tautological (again in the future).
46
48
49 LOG (c, "trying to block on %d", lit);
50
51 CADICAL_assert (c->size >= opts.blockminclslim);
52 CADICAL_assert (c->size <= opts.blockmaxclslim);
58
59 mark (c); // First mark all literals in 'c'.
60
61 Occs &os = occs (-lit);
62 LOG ("resolving against at most %zd clauses with %d", os.size (), -lit);
63
64 bool res = true; // Result is true if all resolvents tautological.
65
66 // Can not use 'auto' here since we update 'os' during traversal.
67 //
68 const auto end_of_os = os.end ();
69 auto i = os.begin ();
70
71 Clause *prev_d = 0; // Previous non-tautological clause.
72
73 for (; i != end_of_os; i++) {
74 // Move the first clause with non-tautological resolvent to the front of
75 // the occurrence list to improve finding it faster later.
76 //
77 Clause *d = *i;
78
81 CADICAL_assert (d->size <= opts.blockmaxclslim);
82
83 *i = prev_d; // Move previous non-tautological clause
84 prev_d = d; // backwards but remember clause at this position.
85
86 LOG (d, "resolving on %d against", lit);
87 stats.blockres++;
88
89 int prev_other = 0; // Previous non-tautological literal.
90
91 // No 'auto' since we update literals of 'd' during traversal.
92 //
93 const const_literal_iterator end_of_d = d->end ();
95
96 for (l = d->begin (); l != end_of_d; l++) {
97 // Same move-to-front mechanism for literals within a clause. It
98 // moves the first negatively marked literal to the front to find it
99 // faster in the future.
100 //
101 const int other = *l;
102 *l = prev_other;
103 prev_other = other;
104 if (other == -lit)
105 continue;
106 CADICAL_assert (other != lit);
107 CADICAL_assert (active (other));
108 CADICAL_assert (!val (other));
109 if (marked (other) < 0) {
110 LOG ("found tautological literal %d", other);
111 d->literals[0] = other; // Move to front of 'd'.
112 break;
113 }
114 }
115
116 if (l == end_of_d) {
117 LOG ("no tautological literal found");
118 //
119 // Since we did not find a tautological literal we restore the old
120 // order of literals in the clause.
121 //
122 const const_literal_iterator begin_of_d = d->begin ();
123 while (l-- != begin_of_d) {
124 const int other = *l;
125 *l = prev_other;
126 prev_other = other;
127 }
128 res = false; // Now 'd' is a witness that 'c' is not blocked.
129 os[0] = d; // Move it to the front of the occurrence list.
130 break;
131 }
132 }
133 unmark (c); // ... all literals of the candidate clause.
134
135 // If all resolvents are tautological and thus the clause is blocked we
136 // restore the old order of clauses in the occurrence list of '-lit'.
137 //
138 if (res) {
139 CADICAL_assert (i == end_of_os);
140 const auto boc = os.begin ();
141 while (i != boc) {
142 Clause *d = *--i;
143 *i = prev_d;
144 prev_d = d;
145 }
146 }
147
148 return res;
149}
150
151/*------------------------------------------------------------------------*/
152
154 // Set skip flags for all literals in too large clauses.
155 //
156 for (const auto &c : clauses) {
157
158 if (c->garbage)
159 continue;
160 if (c->redundant)
161 continue;
162 if (c->size <= opts.blockmaxclslim)
163 continue;
164
165 for (const auto &lit : *c)
166 mark_skip (-lit);
167 }
168
169 // Connect all literal occurrences in irredundant clauses.
170 //
171 for (const auto &c : clauses) {
172
173 if (c->garbage)
174 continue;
175 if (c->redundant)
176 continue;
177
178 for (const auto &lit : *c) {
181 occs (lit).push_back (c);
182 }
183 }
184
185 // We establish the invariant that 'noccs' gives the number of actual
186 // occurrences of 'lit' in non-garbage clauses, while 'occs' might still
187 // refer to garbage clauses, thus 'noccs (lit) <= occs (lit).size ()'. It
188 // is expensive to remove references to garbage clauses from 'occs' during
189 // blocked clause elimination, but decrementing 'noccs' is cheap.
190
191 for (auto lit : lits) {
192 if (!active (lit))
193 continue;
195 Occs &os = occs (lit);
196 noccs (lit) = os.size ();
197 }
198
199 // Now we fill the schedule (priority queue) of candidate literals to be
200 // tried as blocking literals. It is probably slightly faster to do this
201 // in one go after all occurrences have been determined, instead of
202 // filling the priority queue during pushing occurrences. Filling the
203 // schedule can not be fused with the previous loop (easily) since we
204 // first have to initialize 'noccs' for both 'lit' and '-lit'.
205
206#ifndef CADICAL_QUIET
207 int skipped = 0;
208#endif
209
210 for (auto idx : vars) {
211 if (!active (idx))
212 continue;
213 if (frozen (idx)) {
214#ifndef CADICAL_QUIET
215 skipped += 2;
216#endif
217 continue;
218 }
219 CADICAL_assert (!val (idx));
220 for (int sign = -1; sign <= 1; sign += 2) {
221 const int lit = sign * idx;
222 if (marked_skip (lit)) {
223#ifndef CADICAL_QUIET
224 skipped++;
225#endif
226 continue;
227 }
228 if (!marked_block (lit))
229 continue;
231 LOG ("scheduling %d with %" PRId64 " positive and %" PRId64
232 " negative occurrences",
233 lit, noccs (lit), noccs (-lit));
234 blocker.schedule.push_back (vlit (lit));
235 }
236 }
237
238 PHASE ("block", stats.blockings,
239 "scheduled %zd candidate literals %.2f%% (%d skipped %.2f%%)",
240 blocker.schedule.size (),
241 percent (blocker.schedule.size (), 2.0 * active ()), skipped,
242 percent (skipped, 2.0 * active ()));
243}
244
245/*------------------------------------------------------------------------*/
246
247// A literal is pure if it only occurs positive. Then all clauses in which
248// it occurs are blocked on it. This special case can be implemented faster
249// than trying to block literals with at least one negative occurrence and
250// is thus handled separately. It also allows to avoid pushing blocked
251// clauses onto the extension stack.
252
254 if (frozen (lit))
255 return;
257
258 Occs &pos = occs (lit);
259 Occs &nos = occs (-lit);
260
262#ifndef CADICAL_NDEBUG
263 for (const auto &c : nos)
264 CADICAL_assert (c->garbage);
265#endif
266 stats.blockpurelits++;
267 LOG ("found pure literal %d", lit);
268#ifdef LOGGING
269 int64_t pured = 0;
270#endif
271 for (const auto &c : pos) {
272 if (c->garbage)
273 continue;
274 CADICAL_assert (!c->redundant);
275 LOG (c, "pure literal %d in", lit);
276 blocker.reschedule.push_back (c);
277 if (proof) {
278 proof->weaken_minus (c);
279 }
280 external->push_clause_on_extension_stack (c, lit);
281 stats.blockpured++;
282 mark_garbage (c);
283#ifdef LOGGING
284 pured++;
285#endif
286 }
287
289 erase_vector (nos);
290
291 mark_pure (lit);
292 stats.blockpured++;
293 LOG ("blocking %" PRId64 " clauses on pure literal %d", pured, lit);
294}
295
296/*------------------------------------------------------------------------*/
297
298// If there is only one negative clause with '-lit' it is faster to mark it
299// instead of marking all the positive clauses with 'lit' one after the
300// other and then resolving against the negative clause.
301
303 int lit) {
306 CADICAL_assert (noccs (lit) > 0);
307 CADICAL_assert (noccs (-lit) == 1);
308
309 Occs &nos = occs (-lit);
310 CADICAL_assert (nos.size () >= 1);
311
312 Clause *d = 0;
313 for (const auto &c : nos) {
314 if (c->garbage)
315 continue;
316 CADICAL_assert (!d);
317 d = c;
318#ifndef CADICAL_NDEBUG
319 break;
320#endif
321 }
322 CADICAL_assert (d);
323 nos.resize (1);
324 nos[0] = d;
325
326 if (d && d->size > opts.blockmaxclslim) {
327 LOG (d, "skipped common antecedent");
328 return;
329 }
330
333 CADICAL_assert (d->size <= opts.blockmaxclslim);
334
335 LOG (d, "common %d antecedent", lit);
336 mark (d);
337 int64_t blocked = 0;
338#ifdef LOGGING
339 int64_t skipped = 0;
340#endif
341 Occs &pos = occs (lit);
342
343 // Again no 'auto' since 'pos' is update during traversal.
344 //
345 const auto eop = pos.end ();
346 auto j = pos.begin (), i = j;
347
348 for (; i != eop; i++) {
349 Clause *c = *j++ = *i;
350
351 if (c->garbage) {
352 j--;
353 continue;
354 }
355 if (c->size > opts.blockmaxclslim) {
356#ifdef LOGGING
357 skipped++;
358#endif
359 continue;
360 }
361 if (c->size < opts.blockminclslim) {
362#ifdef LOGGING
363 skipped++;
364#endif
365 continue;
366 }
367
368 LOG (c, "trying to block on %d", lit);
369
370 // We use the same literal move-to-front strategy as in
371 // 'is_blocked_clause'. See there for more explanations.
372
373 int prev_other = 0; // Previous non-tautological literal.
374
375 // No 'auto' since literals of 'c' are updated during traversal.
376 //
377 const const_literal_iterator end_of_c = c->end ();
379
380 for (l = c->begin (); l != end_of_c; l++) {
381 const int other = *l;
382 *l = prev_other;
383 prev_other = other;
384 if (other == lit)
385 continue;
386 CADICAL_assert (other != -lit);
387 CADICAL_assert (active (other));
388 CADICAL_assert (!val (other));
389 if (marked (other) < 0) {
390 LOG ("found tautological literal %d", other);
391 c->literals[0] = other; // Move to front of 'c'.
392 break;
393 }
394 }
395
396 if (l == end_of_c) {
397 LOG ("no tautological literal found");
398
399 // Restore old literal order in the clause because.
400
401 const const_literal_iterator begin_of_c = c->begin ();
402 while (l-- != begin_of_c) {
403 const int other = *l;
404 *l = prev_other;
405 prev_other = other;
406 }
407
408 continue; // ... with next candidate 'c' in 'pos'.
409 }
410
411 blocked++;
412 LOG (c, "blocked");
413 if (proof) {
414 proof->weaken_minus (c);
415 }
416 external->push_clause_on_extension_stack (c, lit);
417 blocker.reschedule.push_back (c);
418 mark_garbage (c);
419 j--;
420 }
421 if (j == pos.begin ())
423 else
424 pos.resize (j - pos.begin ());
425
426 stats.blocked += blocked;
427 LOG ("blocked %" PRId64 " clauses on %d (skipped %" PRId64 ")", blocked,
428 lit, skipped);
429
430 unmark (d);
431}
432
433/*------------------------------------------------------------------------*/
434
435// Determine the set of candidate clauses with 'lit', which are checked to
436// be blocked by 'lit'. Filter out too large and small clauses and which do
437// not have any negated other literal in any of the clauses with '-lit'.
438
439size_t Internal::block_candidates (Blocker &blocker, int lit) {
440
441 CADICAL_assert (blocker.candidates.empty ());
442
443 Occs &pos = occs (lit); // Positive occurrences of 'lit'.
444 Occs &nos = occs (-lit);
445
446 CADICAL_assert ((size_t) noccs (lit) <= pos.size ());
447 CADICAL_assert ((size_t) noccs (-lit) == nos.size ()); // Already flushed.
448
449 // Mark all literals in clauses with '-lit'. Note that 'mark2' uses
450 // separate bits for 'lit' and '-lit'.
451 //
452 for (const auto &c : nos)
453 mark2 (c);
454
455 const auto eop = pos.end ();
456 auto j = pos.begin (), i = j;
457
458 for (; i != eop; i++) {
459 Clause *c = *j++ = *i;
460 if (c->garbage) {
461 j--;
462 continue;
463 }
465 if (c->size > opts.blockmaxclslim)
466 continue;
467 if (c->size < opts.blockminclslim)
468 continue;
469 const const_literal_iterator eoc = c->end ();
471 for (l = c->begin (); l != eoc; l++) {
472 const int other = *l;
473 if (other == lit)
474 continue;
475 CADICAL_assert (other != -lit);
476 CADICAL_assert (active (other));
477 CADICAL_assert (!val (other));
478 if (marked2 (-other))
479 break;
480 }
481 if (l != eoc)
482 blocker.candidates.push_back (c);
483 }
484 if (j == pos.begin ())
486 else
487 pos.resize (j - pos.begin ());
488
489 CADICAL_assert (pos.size () == (size_t) noccs (lit)); // Now also flushed.
490
491 for (const auto &c : nos)
492 unmark (c);
493
494 return blocker.candidates.size ();
495}
496
497/*------------------------------------------------------------------------*/
498
499// Try to find a clause with '-lit' which does not have any literal in
500// clauses with 'lit'. If such a clause exists no candidate clause can be
501// blocked on 'lit' since all candidates would produce a non-tautological
502// resolvent with that clause.
503
505 CADICAL_assert (noccs (-lit) > 1);
506 CADICAL_assert (blocker.candidates.size () > 1);
507
508 for (const auto &c : blocker.candidates)
509 mark2 (c);
510
511 Occs &nos = occs (-lit);
512 Clause *res = 0;
513
514 for (const auto &c : nos) {
515 CADICAL_assert (!c->garbage);
516 CADICAL_assert (!c->redundant);
517 CADICAL_assert (c->size <= opts.blockmaxclslim);
518 const const_literal_iterator eoc = c->end ();
520 for (l = c->begin (); l != eoc; l++) {
521 const int other = *l;
522 if (other == -lit)
523 continue;
524 CADICAL_assert (other != lit);
525 CADICAL_assert (active (other));
526 CADICAL_assert (!val (other));
527 if (marked2 (-other))
528 break;
529 }
530 if (l == eoc)
531 res = c;
532 }
533
534 for (const auto &c : blocker.candidates)
535 unmark (c);
536
537 if (res) {
538 LOG (res, "common non-tautological resolvent producing");
539 blocker.candidates.clear ();
540 }
541
542 return res;
543}
544
545/*------------------------------------------------------------------------*/
546
547// In the general case we have at least two negative occurrences.
548
550 Blocker &blocker, int lit) {
553 CADICAL_assert (noccs (lit) > 0);
554 CADICAL_assert (noccs (-lit) > 1);
555
556 Occs &nos = occs (-lit);
557 CADICAL_assert ((size_t) noccs (-lit) <= nos.size ());
558
559 int max_size = 0;
560
561 // Flush all garbage clauses in occurrence list 'nos' of '-lit' and
562 // determine the maximum size of negative clauses (with '-lit').
563 //
564 const auto eon = nos.end ();
565 auto j = nos.begin (), i = j;
566 for (; i != eon; i++) {
567 Clause *c = *j++ = *i;
568 if (c->garbage)
569 j--;
570 else if (c->size > max_size)
571 max_size = c->size;
572 }
573 if (j == nos.begin ())
574 erase_vector (nos);
575 else
576 nos.resize (j - nos.begin ());
577
578 CADICAL_assert (nos.size () == (size_t) noccs (-lit));
579 CADICAL_assert (nos.size () > 1);
580
581 // If the maximum size of a negative clause (with '-lit') exceeds the
582 // maximum clause size limit ignore this candidate literal.
583 //
584 if (max_size > opts.blockmaxclslim) {
585 LOG ("maximum size %d of clauses with %d exceeds clause size limit %d",
586 max_size, -lit, opts.blockmaxclslim);
587 return;
588 }
589
590 LOG ("maximum size %d of clauses with %d", max_size, -lit);
591
592 // We filter candidate clauses with positive occurrence of 'lit' in
593 // 'blocker.candidates' and return if no candidate clause remains.
594 // Candidates should be small enough and should have at least one literal
595 // which occurs negated in one of the clauses with '-lit'.
596 //
597 size_t candidates = block_candidates (blocker, lit);
598 if (!candidates) {
599 LOG ("no candidate clauses found");
600 return;
601 }
602
603 LOG ("found %zd candidate clauses", candidates);
604
605 // We further search for a clause with '-lit' that has no literal
606 // negated in any of the candidate clauses (except 'lit'). If such a
607 // clause exists, we know that none of the candidates is blocked.
608 //
609 if (candidates > 1 && block_impossible (blocker, lit)) {
610 LOG ("impossible to block any candidate clause on %d", lit);
611 CADICAL_assert (blocker.candidates.empty ());
612 return;
613 }
614
615 LOG ("trying to block %zd clauses out of %" PRId64 " with literal %d",
616 candidates, noccs (lit), lit);
617
618 int64_t blocked = 0;
619
620 // Go over all remaining candidates and try to block them on 'lit'.
621 //
622 for (const auto &c : blocker.candidates) {
623 CADICAL_assert (!c->garbage);
624 CADICAL_assert (!c->redundant);
625 if (!is_blocked_clause (c, lit))
626 continue;
627 blocked++;
628 LOG (c, "blocked");
629 if (proof) {
630 proof->weaken_minus (c);
631 }
632 external->push_clause_on_extension_stack (c, lit);
633 blocker.reschedule.push_back (c);
634 mark_garbage (c);
635 }
636
637 LOG ("blocked %" PRId64
638 " clauses on %d out of %zd candidates in %zd occurrences",
639 blocked, lit, blocker.candidates.size (), occs (lit).size ());
640
641 blocker.candidates.clear ();
642 stats.blocked += blocked;
643 if (blocked)
644 flush_occs (lit);
645}
646
647/*------------------------------------------------------------------------*/
648
649// Reschedule literals in a clause (except 'lit') which was blocked.
650
652 Clause *c) {
653#ifdef CADICAL_NDEBUG
654 (void) lit;
655#endif
657
658 for (const auto &other : *c) {
659
660 int64_t &n = noccs (other);
661 CADICAL_assert (n > 0);
662 n--;
663
664 LOG ("updating %d with %" PRId64 " positive and %" PRId64
665 " negative occurrences",
666 other, noccs (other), noccs (-other));
667
668 if (blocker.schedule.contains (vlit (-other)))
669 blocker.schedule.update (vlit (-other));
670 else if (active (other) && !frozen (other) && !marked_skip (-other)) {
671 LOG ("rescheduling to block clauses on %d", -other);
672 blocker.schedule.push_back (vlit (-other));
673 }
674
675 if (blocker.schedule.contains (vlit (other))) {
676 CADICAL_assert (other != lit);
677 blocker.schedule.update (vlit (other));
678 }
679 }
680}
681
682// Reschedule all literals in clauses blocked by 'lit' (except 'lit').
683
685 while (!blocker.reschedule.empty ()) {
686 Clause *c = blocker.reschedule.back ();
687 blocker.reschedule.pop_back ();
688 block_reschedule_clause (blocker, lit, c);
689 }
690}
691
692/*------------------------------------------------------------------------*/
693
694void Internal::block_literal (Blocker &blocker, int lit) {
696
697 if (!active (lit))
698 return; // Pure literal '-lit'.
699 if (frozen (lit))
700 return;
701
703
704 // If the maximum number of a negative clauses (with '-lit') exceeds the
705 // occurrence limit ignore this candidate literal.
706 //
707 if (noccs (-lit) > opts.blockocclim)
708 return;
709
710 LOG ("blocking literal candidate %d "
711 "with %" PRId64 " positive and %" PRId64 " negative occurrences",
712 lit, noccs (lit), noccs (-lit));
713
714 stats.blockcands++;
715
716 CADICAL_assert (blocker.reschedule.empty ());
717 CADICAL_assert (blocker.candidates.empty ());
718
719 if (!noccs (-lit))
720 block_pure_literal (blocker, lit);
721 else if (!noccs (lit)) {
722 // Rare situation, where the clause length limit was hit for 'lit' and
723 // '-lit' is skipped and then it becomes pure. Can be ignored. We also
724 // so it once happening for a 'elimboundmin=-1' and zero positive and
725 // one negative occurrence.
726 } else if (noccs (-lit) == 1)
728 else
730
731 // Done with blocked clause elimination on this literal and we do not
732 // have to try blocked clause elimination on it again until irredundant
733 // clauses with its negation are removed.
734 //
735 CADICAL_assert (!frozen (lit)); // just to be sure ...
737}
738
739/*------------------------------------------------------------------------*/
740
742
743 if (!opts.block)
744 return false;
745 if (unsat)
746 return false;
747 if (!stats.current.irredundant)
748 return false;
750 return false;
751
752 if (propagated < trail.size ()) {
753 LOG ("need to propagate %zd units first", trail.size () - propagated);
754 init_watches ();
756 if (!propagate ()) {
757 LOG ("propagating units results in empty clause");
760 }
761 clear_watches ();
762 reset_watches ();
763 if (unsat)
764 return false;
765 }
766
768
769 stats.blockings++;
770
771 LOG ("block-%" PRId64 "", stats.blockings);
772
776
778
779 init_occs (); // Occurrence lists for all literals.
780 init_noccs (); // Number of occurrences to avoid flushing garbage clauses.
781
782 Blocker blocker (this);
783 block_schedule (blocker);
784
785 int64_t blocked = stats.blocked;
786 int64_t resolutions = stats.blockres;
787 int64_t purelits = stats.blockpurelits;
788 int64_t pured = stats.blockpured;
789
790 while (!terminated_asynchronously () && !blocker.schedule.empty ()) {
791 int lit = u2i (blocker.schedule.front ());
792 blocker.schedule.pop_front ();
793 block_literal (blocker, lit);
794 block_reschedule (blocker, lit);
795 }
796
797 blocker.erase ();
798 reset_noccs ();
799 reset_occs ();
800
801 resolutions = stats.blockres - resolutions;
802 blocked = stats.blocked - blocked;
803
804 PHASE ("block", stats.blockings,
805 "blocked %" PRId64 " clauses in %" PRId64 " resolutions", blocked,
806 resolutions);
807
808 pured = stats.blockpured - pured;
809 purelits = stats.blockpurelits - purelits;
810
811 if (pured)
813
814 if (purelits)
815 PHASE ("block", stats.blockings,
816 "found %" PRId64 " pure literals in %" PRId64 " clauses",
817 purelits, pured);
818 else
819 PHASE ("block", stats.blockings, "no pure literals found");
820
821 report ('b', !opts.reportall && !blocked);
822
824
825 return blocked;
826}
827
828} // namespace CaDiCaL
829
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
#define CADICAL_assert(ignore)
Definition global.h:14
#define LOG(...)
bool empty() const
Definition heap.hpp:135
bool contains(unsigned e) const
Definition heap.hpp:139
size_t size() const
Definition heap.hpp:131
void push_back(unsigned e)
Definition heap.hpp:147
unsigned pop_front()
Definition heap.hpp:167
unsigned front() const
Definition heap.hpp:160
void update(unsigned e)
Definition heap.hpp:182
bool pos
Definition globals.c:30
#define PHASE(...)
Definition message.hpp:52
int sign(int lit)
Definition util.hpp:22
vector< Clause * > Occs
Definition occs.hpp:18
int * literal_iterator
Definition clause.hpp:17
const int * const_literal_iterator
Definition clause.hpp:18
void erase_vector(std::vector< T > &v)
Definition util.hpp:90
double percent(double a, double b)
Definition util.hpp:21
#define START_SIMPLIFIER(S, M)
Definition profile.hpp:172
#define STOP_SIMPLIFIER(S, M)
Definition profile.hpp:197
int lit
Definition satVec.h:130
literal_iterator begin()
Definition clause.hpp:131
literal_iterator end()
Definition clause.hpp:132
bool is_blocked_clause(Clause *c, int pivot)
bool marked_block(int lit) const
External * external
Definition internal.hpp:312
void block_reschedule_clause(Blocker &, int lit, Clause *)
void block_literal_with_at_least_two_negative_occs(Blocker &, int lit)
void mark_garbage(Clause *)
void report(char type, int verbose_level=0)
void mark_redundant_clauses_with_eliminated_variables_as_garbage()
int u2i(unsigned u)
Definition internal.hpp:412
void unmark(int lit)
Definition internal.hpp:490
void block_literal(Blocker &, int lit)
vector< int > trail
Definition internal.hpp:259
bool terminated_asynchronously(int factor=1)
Clause * block_impossible(Blocker &, int lit)
const Sange lits
Definition internal.hpp:325
bool frozen(int lit)
bool marked_skip(int lit)
void block_pure_literal(Blocker &, int lit)
void block_reschedule(Blocker &, int lit)
void unmark_block(int lit)
bool watching() const
Definition internal.hpp:462
signed char val(int lit) const
signed char marked(int lit) const
Definition internal.hpp:478
bool active(int lit)
Definition internal.hpp:360
int64_t & noccs(int lit)
Definition internal.hpp:466
void block_literal_with_one_negative_occ(Blocker &, int lit)
unsigned vlit(int lit) const
Definition internal.hpp:408
void mark2(int lit)
Definition internal.hpp:561
void block_schedule(Blocker &)
vector< Clause * > clauses
Definition internal.hpp:283
const Range vars
Definition internal.hpp:324
size_t block_candidates(Blocker &, int lit)
Occs & occs(int lit)
Definition internal.hpp:465
bool occurring() const
Definition internal.hpp:461
bool marked2(int lit) const
Definition internal.hpp:555
void mark_satisfied_clauses_as_garbage()
void mark_skip(int lit)
size_t flush_occs(int lit)
void connect_watches(bool irredundant_only=false)
bool operator()(unsigned a, unsigned b)
unsigned size
Definition vector.h:35
signed char mark
Definition value.h:8