- java.lang.Object
-
- org.logicng.transformations.BDDNormalFormTransformation
-
- org.logicng.transformations.cnf.BDDCNFTransformation
-
- All Implemented Interfaces:
FormulaTransformation
public final class BDDCNFTransformation extends BDDNormalFormTransformation
Transformation of a formula in CNF by converting it to a BDD.- Since:
- 1.4.0
- Version:
- 2.3.0
-
-
Constructor Summary
Constructors Constructor Description BDDCNFTransformation()Constructs a new BDD-based CNF transformation and constructs a new BDD kernel for every formula application.BDDCNFTransformation(FormulaFactory f, int numVars)Constructs a new BDD-based CNF transformation for a given number of variables.BDDCNFTransformation(BDDKernel kernel)Constructs a new BDD-based CNF transformation with an optional BDD kernel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Formulaapply(Formula formula, boolean cache)Returns the transformed formula.-
Methods inherited from class org.logicng.transformations.BDDNormalFormTransformation
compute
-
-
-
-
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 usenumVars- 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:FormulaTransformationReturns the transformed formula.- Parameters:
formula- the input formulacache- indicated whether the result (and associated predicates) should be cached in the formula's cache.- Returns:
- the transformed formula
-
-