Package org.sat4j.specs

Examples of org.sat4j.specs.IConstr


        for (int q : firstmodel) {
            clause.push(-q);
        }
        boolean result = false;
        try {
            IConstr added = addClause(clause);
            result = !isSatisfiable(assumptions);
            removeConstr(added);
        } catch (ContradictionException e) {
            result = true;
        }
View Full Code Here


  // Taken from MiniSAT 1.14: Simplify conflict clause (a little):
  private void simpleSimplification(IVecInt conflictToReduce) {
    int i, j;
    final boolean[] seen = mseen;
    for (i = j = 1; i < conflictToReduce.size(); i++) {
      IConstr r = voc.getReason(conflictToReduce.get(i));
      if (r == null) {
        conflictToReduce.moveTo(j++, i);
      } else {
        for (int k = 0; k < r.size(); k++)
          if (voc.isFalsified(r.get(k)) && !seen[r.get(k) >> 1]
              && (voc.getLevel(r.get(k)) != 0)) {
            conflictToReduce.moveTo(j++, i);
            break;
          }
      }
    }
View Full Code Here

TOP

Related Classes of org.sat4j.specs.IConstr

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.