Package net.sf.tweety.lp.asp.syntax
Class ASPLiteral
- java.lang.Object
-
- net.sf.tweety.lp.asp.syntax.ASPElement
-
- net.sf.tweety.lp.asp.syntax.ASPBodyElement
-
- net.sf.tweety.lp.asp.syntax.ASPLiteral
-
- All Implemented Interfaces:
Comparable<ASPLiteral>,net.sf.tweety.commons.Formula,net.sf.tweety.logics.commons.syntax.interfaces.Atom,net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula,net.sf.tweety.logics.commons.syntax.interfaces.Invertable,net.sf.tweety.logics.commons.syntax.interfaces.LogicStructure,net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
- Direct Known Subclasses:
ASPAtom,StrictNegation
public abstract class ASPLiteral extends ASPBodyElement implements net.sf.tweety.logics.commons.syntax.interfaces.Atom, net.sf.tweety.logics.commons.syntax.interfaces.Invertable, Comparable<ASPLiteral>
This interface defines common functionality for literals, meaning atoms or strictly negated atoms. In the ASP-Core-2 standard, the formulas represented by this class are also referred to as 'classical atoms'.- Author:
- Anna Gessler, Tim Janus
-
-
Constructor Summary
Constructors Constructor Description ASPLiteral()
-
Method Summary
Modifier and Type Method Description abstract ASPLiteralcloneWithAddedTerm(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> term)Creates a copy of the literal and adds the given term as argument to the end of the argument list.abstract ASPLiteralcomplement()abstract ASPAtomgetAtom()booleanisLiteral()-
Methods inherited from class net.sf.tweety.lp.asp.syntax.ASPBodyElement
getLiterals, substitute
-
Methods inherited from class net.sf.tweety.lp.asp.syntax.ASPElement
clone, containsTermsOfType, exchange, getAtoms, getPredicateCls, getPredicates, getSignature, isGround, isWellFormed, substitute
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.tweety.logics.commons.syntax.interfaces.Atom
addArgument, getArguments, getName, getPredicate, isComplete, setPredicate
-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Method Detail
-
cloneWithAddedTerm
public abstract ASPLiteral cloneWithAddedTerm(net.sf.tweety.logics.commons.syntax.interfaces.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.
-
getAtom
public abstract ASPAtom getAtom()
- Returns:
- The atom representing the literal.
-
isLiteral
public boolean isLiteral()
- Specified by:
isLiteralin interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
-
complement
public abstract ASPLiteral complement()
- Specified by:
complementin interfacenet.sf.tweety.logics.commons.syntax.interfaces.Invertable
-
-