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:
java.lang.Comparable<ASPLiteral>
,Formula
,Atom
,ComplexLogicalFormula
,Invertable
,LogicStructure
,SimpleLogicalFormula
- Direct Known Subclasses:
ASPAtom
,StrictNegation
public abstract class ASPLiteral extends ASPBodyElement implements Atom, Invertable, java.lang.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.sf.tweety.logics.commons.syntax.interfaces.Atom
Atom.AtomImpl, Atom.RETURN_SET_PREDICATE
-
-
Constructor Summary
Constructors Constructor Description ASPLiteral()
-
Method Summary
Modifier and Type Method Description 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.abstract ASPLiteral
complement()
abstract ASPAtom
getAtom()
boolean
isLiteral()
-
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, 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 net.sf.tweety.commons.Formula
getSignature
-
Methods inherited from interface net.sf.tweety.logics.commons.syntax.interfaces.LogicStructure
getTerms, getTerms
-
Methods inherited from interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
equals, getAtoms, getPredicateCls, getPredicates, hashCode
-
-
-
-
Method Detail
-
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.
-
getAtom
public abstract ASPAtom getAtom()
- Returns:
- The atom representing the literal.
-
isLiteral
public boolean isLiteral()
- Specified by:
isLiteral
in interfaceSimpleLogicalFormula
- Returns:
- true if the formula represents a literal in the language or false otherwise
-
complement
public abstract ASPLiteral complement()
- Specified by:
complement
in interfaceInvertable
- Returns:
- the complement of this formula.
-
-