Class FormulaUtils

java.lang.Object
org.variantsync.diffdetective.util.fide.FormulaUtils

public class FormulaUtils extends Object
Utilities for handling Nodes as logical formulas.
  • Constructor Details

    • FormulaUtils

      public FormulaUtils()
  • Method Details

    • negate

      public static org.prop4j.Node negate(org.prop4j.Node node)
      Return a new Node representing the negation of node. The result will share as much objects with node possible without modifying node. As a special case Literals are inverted directly without adding a new node.
    • negate

      public static org.prop4j.Literal negate(org.prop4j.Literal lit)
      Return a negated copy of lit without adding a new Node.
    • var

      public static org.prop4j.Literal var(String name)
    • and

      public static org.prop4j.And and(org.prop4j.Node... nodes)
    • numberOfLiterals

      public static int numberOfLiterals(org.prop4j.Node formula)
      Recursively counts the number of instances of Literal in formula.
    • sortRegularCNF

      public static void sortRegularCNF(org.prop4j.Node rcnf)
    • numberOfLiteralsInRegularCNF

      public static int numberOfLiteralsInRegularCNF(org.prop4j.Node rcnf)
    • removeSemanticDuplicates

      public static void removeSemanticDuplicates(List<org.prop4j.Node> formulas)