Class Disjunction

All Implemented Interfaces:
Iterable<RelationalFormula>, Collection<RelationalFormula>, List<RelationalFormula>, Formula, AssociativeFormulaSupport.AssociativeSupportBridge, AssociativeFormula<RelationalFormula>, ClassicalFormula, ComplexLogicalFormula, Conjunctable, Disjunctable, Invertable, LogicStructure, ProbabilityAware, QuantifiedFormula, SimpleLogicalFormula

public class Disjunction extends AssociativeFolFormula
The classical disjunction of first-order logic.
Author:
Matthias Thimm
  • Constructor Details

    • Disjunction

      public Disjunction(Collection<? extends RelationalFormula> formulas)
      Creates a new disjunction with the given inner formulas.
      Parameters:
      formulas - a collection of formulas.
    • Disjunction

      public Disjunction()
      Creates a new (empty) disjunction.
    • Disjunction

      public Disjunction(RelationalFormula first, RelationalFormula second)
      Creates a new disjunction with the two given formulae
      Parameters:
      first - a relational formula.
      second - a relational formula.
  • Method Details

    • isDnf

      public boolean isDnf()
      Description copied from class: FolFormula
      Checks whether this formula is in disjunctive normal form.
      Specified by:
      isDnf in class FolFormula
      Returns:
      "true" iff this formula is in disjunctive normal form.
    • toNnf

      public FolFormula toNnf()
      Description copied from class: FolFormula
      Makes the negation normal form of this formula.
      Specified by:
      toNnf in class FolFormula
      Returns:
      the NNF of this formula
    • collapseAssociativeFormulas

      public RelationalFormula collapseAssociativeFormulas()
      Description copied from class: FolFormula
      This method collapses all associative operations appearing in this term, e.g. every a||(b||c) becomes a||b||c.
      Specified by:
      collapseAssociativeFormulas in class FolFormula
      Returns:
      the collapsed formula.
    • clone

      public Disjunction clone()
      Description copied from interface: SimpleLogicalFormula
      Creates a deep copy of this formula
      Specified by:
      clone in interface ComplexLogicalFormula
      Specified by:
      clone in interface SimpleLogicalFormula
      Specified by:
      clone in class FolFormula
      Returns:
      the cloned formula
    • createEmptyFormula

      public Disjunction createEmptyFormula()
      Returns:
      an empty version of the AssociativeFormula
    • getOperatorSymbol

      public String getOperatorSymbol()
      Returns:
      A String representing the operator which connects two items of the associative formula.
    • getEmptySymbol

      public String getEmptySymbol()
      Returns:
      A String representing an empty version of the Associative Formula implementation