- java.lang.Object
-
- org.logicng.transformations.cnf.TseitinTransformation
-
- All Implemented Interfaces:
FormulaTransformation
public final class TseitinTransformation extends Object implements FormulaTransformation
Transformation of a formula into CNF due to Tseitin. 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 Summary
Constructors Constructor Description TseitinTransformation()Constructor for a Tseitin transformation with a factorization bound of 12.TseitinTransformation(int boundaryForFactorization)Constructor for a Tseitin transformation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Formulaapply(Formula formula, boolean cache)Returns the transformed formula.StringtoString()
-
-
-
Constructor Detail
-
TseitinTransformation
public TseitinTransformation(int boundaryForFactorization)
Constructor for a Tseitin transformation.- Parameters:
boundaryForFactorization- the boundary of number of atoms up to which classical factorization is used
-
TseitinTransformation
public TseitinTransformation()
Constructor for a Tseitin transformation with a factorization bound of 12.
-
-
Method Detail
-
apply
public Formula apply(Formula formula, boolean cache)
Description copied from interface:FormulaTransformationReturns the transformed formula.- Specified by:
applyin interfaceFormulaTransformation- Parameters:
formula- the input formulacache- indicated whether the result (and associated predicates) should be cached in the formula's cache.- Returns:
- the transformed formula
-
-