Class FormulaUtils
java.lang.Object
org.variantsync.diffdetective.util.fide.FormulaUtils
Utilities for handling
Nodes as logical formulas.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.prop4j.Andand(org.prop4j.Node... nodes) static org.prop4j.Equalsequivalent(org.prop4j.Node a, org.prop4j.Node b) static org.prop4j.Impliesimplies(org.prop4j.Node a, org.prop4j.Node b) static org.prop4j.Literalnegate(org.prop4j.Literal lit) Return a negated copy oflitwithout adding a newNode.static org.prop4j.Nodenegate(org.prop4j.Node node) Return a newNoderepresenting the negation ofnode.static intnumberOfLiterals(org.prop4j.Node formula) Recursively counts the number of instances ofLiteralinformula.static intnumberOfLiteralsInRegularCNF(org.prop4j.Node rcnf) static org.prop4j.Oror(org.prop4j.Node... nodes) static voidremoveSemanticDuplicates(List<org.prop4j.Node> formulas) static voidsortRegularCNF(org.prop4j.Node rcnf) static org.prop4j.Literal
-
Constructor Details
-
FormulaUtils
public FormulaUtils()
-
-
Method Details
-
negate
public static org.prop4j.Node negate(org.prop4j.Node node) Return a newNoderepresenting the negation ofnode. The result will share as much objects withnodepossible without modifyingnode. As a special caseLiterals are inverted directly without adding a new node. -
negate
public static org.prop4j.Literal negate(org.prop4j.Literal lit) Return a negated copy oflitwithout adding a newNode. -
var
-
and
public static org.prop4j.And and(org.prop4j.Node... nodes) -
or
public static org.prop4j.Or or(org.prop4j.Node... nodes) -
implies
public static org.prop4j.Implies implies(org.prop4j.Node a, org.prop4j.Node b) -
equivalent
public static org.prop4j.Equals equivalent(org.prop4j.Node a, org.prop4j.Node b) -
numberOfLiterals
public static int numberOfLiterals(org.prop4j.Node formula) Recursively counts the number of instances ofLiteralinformula. -
sortRegularCNF
public static void sortRegularCNF(org.prop4j.Node rcnf) -
numberOfLiteralsInRegularCNF
public static int numberOfLiteralsInRegularCNF(org.prop4j.Node rcnf) -
removeSemanticDuplicates
-