Module logicng

Class PlaistedGreenbaumTransformationSolver


  • public final class PlaistedGreenbaumTransformationSolver
    extends Object
    A Plaisted-Greenbaum CNF conversion which is performed directly on the internal SAT solver, not on a formula factory.
    Since:
    1.6.0
    Version:
    2.0.0
    • Constructor Detail

      • PlaistedGreenbaumTransformationSolver

        public PlaistedGreenbaumTransformationSolver​(boolean performNNF,
                                                     MiniSatStyleSolver solver,
                                                     boolean initialPhase)
        Constructs a new transformation for a given SAT solver.
        Parameters:
        performNNF - flag whether an NNF transformation should be performed on the input formula
        solver - the solver
        initialPhase - the initial phase for new variables
    • Method Detail

      • addCNFtoSolver

        public void addCNFtoSolver​(Formula formula,
                                   Proposition proposition)
        Adds the CNF of the given formula (and its optional proposition) to the solver,
        Parameters:
        formula - the formula to add to the solver
        proposition - the optional proposition of the formula
      • clearCache

        public void clearCache()
        Clears the cache.