src/elim.cpp
// Try to eliminate 'pivot' by bounded variable elimination.
Try to eliminate 'pivot' by bounded variable elimination.
Try to eliminate ' pivot ' by bounded variable elimination .
inline void Internal::try_to_eliminate_variable (int pivot) {
  if (!active (pivot)) return;
  LOG ("trying to eliminate %d", pivot);
  assert (!flags (pivot).eliminated ());
  long pos = flush_occs (pivot);
  long neg = flush_occs (-pivot);
   Bound the number of resolvents tried per variable by '2*elimocclim'.
  if (pos > opts.elimocclim || neg > opts.elimocclim) {
    LOG ("now too many occurrences of %d", pivot);
    return;
  }
   The 'mark_clauses_with_literal_garbage' benefits from having the
   'pivot' in the phase with less occurrences than its negation.  It
   reduces the size of the extension stack greatly.
  if (pos > neg) pivot = -pivot, swap (pos, neg);
  if (!elim_resolvents_are_bounded (pivot, pos, neg)) {
    LOG ("kept and not eliminated %d", pivot);
    return;
  }
  elim_add_resolvents (pivot);
  if (!unsat) mark_eliminated_clauses_as_garbage (pivot);
  assert (active (pivot));
  flags (pivot).status = Flags::ELIMINATED;
  LOG ("eliminated %d", pivot);
  stats.all.eliminated++;
  stats.now.eliminated++;
}
inline void Internal :: try_to_eliminate_variable ( int pivot ) { if ( ! active ( pivot ) ) return ; LOG ( " " , pivot ) ; assert ( ! flags ( pivot ) . eliminated ( ) ) ; long pos = flush_occs ( pivot ) ; long neg = flush_occs ( - pivot ) ; if ( pos > opts . elimocclim || neg > opts . elimocclim ) { LOG ( " " , pivot ) ; return ; } if ( pos > neg ) pivot = - pivot , swap ( pos , neg ) ; if ( ! elim_resolvents_are_bounded ( pivot , pos , neg ) ) { LOG ( " " , pivot ) ; return ; } elim_add_resolvents ( pivot ) ; if ( ! unsat ) mark_eliminated_clauses_as_garbage ( pivot ) ; assert ( active ( pivot ) ) ; flags ( pivot ) . status = Flags :: ELIMINATED ; LOG ( " " , pivot ) ; stats . all . eliminated ++ ; stats . now . eliminated ++ ; }
Try to eliminate 'pivot' by bounded variable elimination.
Try to eliminate ' pivot ' by bounded variable elimination .
// First remove garbage clauses to get a (more) accurate count. There // might still be satisfied clauses included in this count which we have // not found yet but we ignore them in the following check. // // Bound the number of resolvents tried per variable by '2*elimocclim'. // // The 'mark_clauses_with_literal_garbage' benefits from having the // 'pivot' in the phase with less occurrences than its negation.  It // reduces the size of the extension stack greatly. //