@@ -379,6 +379,8 @@ private void lookForUnitRefutation(OTTERAnswerHandler ansHandler,
379379 }
380380 }
381381
382+ // This is a simple indexing on the clauses to support
383+ // more efficient forward and backward subsumption testing.
382384 class IndexedClauses {
383385 private LightestClauseHeuristic lightestClauseHeuristic = null ;
384386 // Group the clauses by their # of literals.
@@ -390,10 +392,10 @@ class IndexedClauses {
390392 public IndexedClauses (LightestClauseHeuristic lightestClauseHeuristic ,
391393 Set <Clause > sos , Set <Clause > usable ) {
392394 this .lightestClauseHeuristic = lightestClauseHeuristic ;
393- Set < Clause > allClauses = new HashSet < Clause >();
394- allClauses . addAll ( sos );
395- allClauses . addAll ( usable );
396- for (Clause c : allClauses ) {
395+ for ( Clause c : sos ) {
396+ indexClause ( c );
397+ }
398+ for (Clause c : usable ) {
397399 indexClause (c );
398400 }
399401 }
@@ -420,7 +422,8 @@ public void addClause(Clause c, Set<Clause> sos, Set<Clause> usable) {
420422 sos .add (c );
421423 lightestClauseHeuristic .addedClauseToSOS (c );
422424 indexClause (c );
423- // Perform backward subsumption elimination
425+ // Have added clause, therefore
426+ // perform backward subsumption elimination
424427 Set <Clause > subsumed = new HashSet <Clause >();
425428 for (int i = c .getNumberLiterals () + 1 ; i <= maxNoLiterals ; i ++) {
426429 subsumed .clear ();
0 commit comments