Package kodkod.engine.bool

Examples of kodkod.engine.bool.BooleanFactory.numberOfVariables()


   */
  private Translation generateSBP(BooleanAccumulator circuit, LeafInterpreter interpreter, SymmetryBreaker breaker) {
    options.reporter().generatingSBP();
    final BooleanFactory factory = interpreter.factory();
    circuit.add(breaker.generateSBP(interpreter, options.symmetryBreaking()));
    return toCNF((BooleanFormula)factory.accumulate(circuit), factory.numberOfVariables(), interpreter.vars());
  }
 
  /**
   * Conjoins the given circuit with an SBP generated using the given symmetry breaker and interpreter,
   * and returns the resulting circuit's translation to CNF.
View Full Code Here


      options.reporter().flattening(circuit);
      final BooleanValue flatCircuit = BooleanFormulaFlattener.flatten(circuit, factory);
      if (flatCircuit.op()==Operator.CONST) {
        throw new TrivialFormulaException(annotated.node(), bounds, (BooleanConstant)flatCircuit, null);
      } else {
        return toCNF((BooleanFormula)flatCircuit, factory.numberOfVariables(), interpreter.vars());
      }
    } else {
      return toCNF(circuit, factory.numberOfVariables(), interpreter.vars());
    }
  }
View Full Code Here

        throw new TrivialFormulaException(annotated.node(), bounds, (BooleanConstant)flatCircuit, null);
      } else {
        return toCNF((BooleanFormula)flatCircuit, factory.numberOfVariables(), interpreter.vars());
      }
    } else {
      return toCNF(circuit, factory.numberOfVariables(), interpreter.vars());
    }
  }
 
  /**
   * Translates the given circuit to CNF, adds the clauses to a SATSolver returned
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.