Class Tseytin.Convert
java.lang.Object
org.variantsync.diffdetective.analysis.logic.Tseytin.Convert
- Enclosing class:
Tseytin
Helper class for Tseytin conversion that remembers generated formulas.
This helper class basically models the conversion function equipped with some useful state.
(Function programmers might see this as a function within a state monad.)
-
Field Summary
Modifier and TypeFieldDescriptionprivate int
private final BiFunction<org.prop4j.Node,
org.prop4j.Node, org.prop4j.Node> private final List<org.prop4j.Node>
-
Constructor Summary
ModifierConstructorDescriptionprivate
Convert
(org.prop4j.Node formula, BiFunction<org.prop4j.Node, org.prop4j.Node, org.prop4j.Node> eq) Convertes the given formula with the given equivalence function. -
Method Summary
-
Field Details
-
newSubFormulas
-
currentIndex
private int currentIndex -
eq
-
-
Constructor Details
-
Convert
private Convert(org.prop4j.Node formula, BiFunction<org.prop4j.Node, org.prop4j.Node, org.prop4j.Node> eq) Convertes the given formula with the given equivalence function.- Parameters:
formula
- Formula to tseytin convert.eq
- Function that models the equivelency relationship between two given nodes. Typically, this function produces a propositional "iff" (<=>).
-
-
Method Details
-
tseytin
private org.prop4j.Node tseytin(org.prop4j.Node formula) Performs tseyting conversion on the given formula.- Parameters:
formula
- Formula to convert.- Returns:
- The tseyting variable representing the input formula.
-
getNextVariableName
-