예제 #1
0
 // remove from clauses the clauses that are subsumed by clauses in pruningSet
 public CNF pruneWith(Collection<Clause> clauses, Collection<Clause> pruningSet)
     throws ParseException {
   CNF result = new CNF();
   if (!pruneInDepth)
     for (Clause cl : clauses) {
       boolean toKeep = true;
       for (Clause cl2 : pruningSet) {
         if (cl2.subsumes(cl)) {
           toKeep = false;
           break;
         }
       }
       if (toKeep) result.add(cl);
     }
   else {
     result.addAll(
         CFSolver.pruneClauseSetFromCons(
             getEnv(),
             clauses,
             pruningSet,
             true,
             theory.getDepthLimit(),
             -1,
             stats.getSolarCtrList()));
   }
   return result;
 }
예제 #2
0
 public double computeWeight(Clause cl, Env env) {
   List<Double> weights = new ArrayList<Double>();
   for (Literal lit : cl.getLiterals()) {
     weights.add(computeWeight(lit, env));
   }
   if (weights.isEmpty()) return 1;
   return aggregate(weights, clauseAggregator);
 }