Module logicng

Class PlaistedGreenbaumTransformation

  • All Implemented Interfaces:
    FormulaTransformation

    public final class PlaistedGreenbaumTransformation
    extends Object
    implements FormulaTransformation
    Transformation of a formula into CNF due to Plaisted & Greenbaum. Results in this implementation will always be cached.

    ATTENTION: if you mix formulas from different formula factories this can lead to clashes in the naming of newly introduced variables.

    Since:
    1.0
    Version:
    2.0.0
    • Constructor Detail

      • PlaistedGreenbaumTransformation

        public PlaistedGreenbaumTransformation​(int boundaryForFactorization)
        Constructor for a Plaisted & Greenbaum transformation.
        Parameters:
        boundaryForFactorization - the boundary of number of atoms up to which classical factorization is used
      • PlaistedGreenbaumTransformation

        public PlaistedGreenbaumTransformation()
        Constructor for a Plaisted & Greenbaum transformation with conversion to nnf and a factorization bound of 12.
    • Method Detail

      • apply

        public Formula apply​(Formula formula,
                             boolean cache)
        Description copied from interface: FormulaTransformation
        Returns the transformed formula.
        Specified by:
        apply in interface FormulaTransformation
        Parameters:
        formula - the input formula
        cache - indicated whether the result (and associated predicates) should be cached in the formula's cache.
        Returns:
        the transformed formula