Class ASPLiteral
java.lang.Object
org.tweetyproject.lp.asp.syntax.ASPElement
org.tweetyproject.lp.asp.syntax.ASPBodyElement
org.tweetyproject.lp.asp.syntax.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
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.tweetyproject.logics.commons.syntax.interfaces.Atom
Atom.AtomImpl, Atom.RETURN_SET_PREDICATE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ASPLiteralcloneWithAddedTerm(Term<?> term) Creates a copy of the literal and adds the given term as argument to the end of the argument list.abstract ASPLiteralabstract ASPAtomgetAtom()Return The atom representing the literal.booleanMethods inherited from class org.tweetyproject.lp.asp.syntax.ASPBodyElement
getLiterals, substituteMethods inherited from class org.tweetyproject.lp.asp.syntax.ASPElement
clone, containsTermsOfType, exchange, getAtoms, getPredicateCls, getPredicates, getSignature, isGround, isWellFormed, printToClingo, printToDLV, substituteMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.tweetyproject.logics.commons.syntax.interfaces.Atom
addArgument, getArguments, getName, getPredicate, isComplete, setPredicateMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.tweetyproject.commons.Formula
getSignatureMethods inherited from interface org.tweetyproject.logics.commons.syntax.interfaces.LogicStructure
getTerms, getTermsMethods inherited from interface org.tweetyproject.logics.commons.syntax.interfaces.SimpleLogicalFormula
equals, getAtoms, getPredicateCls, getPredicates, hashCode
-
Constructor Details
-
ASPLiteral
public ASPLiteral()Default Constructor
-
-
Method Details
-
getAtom
Return The atom representing the literal.- Returns:
- The atom representing the literal.
-
cloneWithAddedTerm
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:
isLiteralin interfaceSimpleLogicalFormula- Returns:
- true if the formula represents a literal in the language or false otherwise
-
complement
- Specified by:
complementin interfaceInvertable- Returns:
- the complement of this formula.
-