Module logicng

Class BDDCNFTransformation

    • Constructor Detail

      • BDDCNFTransformation

        public BDDCNFTransformation​(BDDKernel kernel)
        Constructs a new BDD-based CNF transformation with an optional BDD kernel.

        Warning: You can use this object for arbitrarily many transformations, but the number of different variables in all applied formulas must not exceed the number of variables in the kernel.

        Parameters:
        kernel - the optional BDD kernel
      • BDDCNFTransformation

        public BDDCNFTransformation​(FormulaFactory f,
                                    int numVars)
        Constructs a new BDD-based CNF transformation for a given number of variables.

        Warning: You can use this object for arbitrarily many transformations, but the number of different variables in all applied formulas must not exceed numVars.

        To improve performance you might want to use BDDCNFTransformation(BDDKernel), where you have full control over the node and cache size in the used BDD kernel.

        Parameters:
        f - the formula factory to use
        numVars - the number of variables
      • BDDCNFTransformation

        public BDDCNFTransformation()
        Constructs a new BDD-based CNF transformation and constructs a new BDD kernel for every formula application.
    • Method Detail

      • apply

        public Formula apply​(Formula formula,
                             boolean cache)
        Description copied from interface: FormulaTransformation
        Returns the transformed formula.
        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