src/subsume.cpp
// This is the actual subsumption and strengthening check.  We assume that
// all the literals of the candidate clause to be subsumed or strengthened
// are marked, so we only have to check that all the literals of the
// argument clause 'subsuming', which is checked for subsuming the candidate
// clause 'subsumed', has all its literals marked (in the correct phase).
// If exactly one is in the opposite phase we can still strengthen the
// candidate clause by this single literal which occurs in opposite phase.
//
// The result is INT_MIN if all literals are marked and thus the candidate
// clause can be subsumed.  It is zero if neither subsumption nor
// strengthening is possible.  Otherwise the candidate clause can be
// strengthened and as a result the negation of the literal which can be
// removed is returned.
This is the actual subsumption and strengthening check.  We assume that
all the literals of the candidate clause to be subsumed or strengthened
are marked, so we only have to check that all the literals of the
argument clause 'subsuming', which is checked for subsuming the candidate
clause 'subsumed', has all its literals marked (in the correct phase).
If exactly one is in the opposite phase we can still strengthen the
candidate clause by this single literal which occurs in opposite phase.

The result is INT_MIN if all literals are marked and thus the candidate
clause can be subsumed.  It is zero if neither subsumption nor
strengthening is possible.  Otherwise the candidate clause can be
strengthened and as a result the negation of the literal which can be
removed is returned.
This is the actual subsumption and strengthening check . We assume that all the literals of the candidate clause to be subsumed or strengthened are marked so we only have to check that all the literals of the argument clause ' subsuming ' which is checked for subsuming the candidate clause ' subsumed ' has all its literals marked ( in the correct phase ) . If exactly one is in the opposite phase we can still strengthen the candidate clause by this single literal which occurs in opposite phase . The result is INT_MIN if all literals are marked and thus the candidate clause can be subsumed . It is zero if neither subsumption nor strengthening is possible . Otherwise the candidate clause can be strengthened and as a result the negation of the literal which can be removed is returned .
inline int Internal::subsume_check (Clause * subsuming,
                                    Clause * subsumed) {
  assert (!subsumed->garbage);
  assert (!subsuming->garbage);
  assert (subsuming != subsumed);
  assert (subsuming->size <= subsumed->size);
  stats.subchecks++;
  if (subsuming->size == 2) stats.subchecks2++;
  const const_literal_iterator end = subsuming->end ();
  int flipped = 0;
  for (const_literal_iterator i = subsuming->begin (); i != end; i++) {
    const int lit = *i, tmp = marked (lit);
    if (!tmp) return 0;
    if (tmp > 0) continue;
    if (flipped) return 0;
    flipped = lit;
  }
  if (!flipped) return INT_MIN;                    subsumed!!
  else if (!opts.strengthen) return 0;
  else return flipped;                             strengthen!!
}
inline int Internal :: subsume_check ( Clause * subsuming , Clause * subsumed ) { assert ( ! subsumed -> garbage ) ; assert ( ! subsuming -> garbage ) ; assert ( subsuming != subsumed ) ; assert ( subsuming -> size <= subsumed -> size ) ; stats . subchecks ++ ; if ( subsuming -> size == 2 ) stats . subchecks2 ++ ; const const_literal_iterator end = subsuming -> end ( ) ; int flipped = 0 ; for ( const_literal_iterator i = subsuming -> begin ( ) ; i != end ; i ++ ) { const int lit = * i , tmp = marked ( lit ) ; if ( ! tmp ) return 0 ; if ( tmp > 0 ) continue ; if ( flipped ) return 0 ; flipped = lit ; } if ( ! flipped ) return INT_MIN ; else if ( ! opts . strengthen ) return 0 ; else return flipped ; }
This is the actual subsumption and strengthening check.
This is the actual subsumption and strengthening check .
// Only use 'subsumed' for these following assertion checks.  Otherwise we // only require that 'subsumed' has all its literals marked. // // subsumed!! // strengthen!!