Class ASPLiteral

All Implemented Interfaces:
Comparable<ASPLiteral>, Formula, Atom, ComplexLogicalFormula, Invertable, LogicStructure, SimpleLogicalFormula
Direct Known Subclasses:
ASPAtom, StrictNegation

public abstract class ASPLiteral extends ASPBodyElement implements Atom, Invertable, Comparable<ASPLiteral>
This class defines common functionality for literals, meaning atoms or strictly negated atoms. In the ASP-Core-2 standard, the formulas represented by this class are referred to as 'classical atoms'.
Author:
Anna Gessler, Tim Janus
  • Constructor Details

    • ASPLiteral

      public ASPLiteral()
  • Method Details

    • getAtom

      public abstract ASPAtom getAtom()
      Returns:
      The atom representing the literal.
    • cloneWithAddedTerm

      public abstract ASPLiteral cloneWithAddedTerm(Term<?> term)
      Creates a copy of the literal and adds the given term as argument to the end of the argument list.
      Parameters:
      term - the new argument.
      Returns:
      A copy of the literal containing the given term as new argument.
    • isLiteral

      public boolean isLiteral()
      Specified by:
      isLiteral in interface SimpleLogicalFormula
      Returns:
      true if the formula represents a literal in the language or false otherwise
    • complement

      public abstract ASPLiteral complement()
      Specified by:
      complement in interface Invertable
      Returns:
      the complement of this formula.