Class ExclusiveDisjunction

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 ExclusiveDisjunction extends AssociativeFolFormula
The exclusive disjunction (XOR) in first-order logic.
Anna Gessler
  • Constructor Details

    • ExclusiveDisjunction

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

      public ExclusiveDisjunction()
      Creates a new (empty) exclusive disjunction.
    • ExclusiveDisjunction

      public ExclusiveDisjunction(RelationalFormula first, RelationalFormula second)
      Creates a new exclusive disjunction with the two given formulae
      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
      "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
      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
      the collapsed formula.
    • clone

      public ExclusiveDisjunction 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
      the cloned formula
    • createEmptyFormula

      public ExclusiveDisjunction createEmptyFormula()
      an empty version of the AssociativeFormula
    • getOperatorSymbol

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

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