Package net.sf.tweety.lp.asp.syntax
Class ASPBodyElement
- java.lang.Object
 - 
- net.sf.tweety.lp.asp.syntax.ASPElement
 - 
- net.sf.tweety.lp.asp.syntax.ASPBodyElement
 
 
 
- 
- All Implemented Interfaces:
 Formula,ComplexLogicalFormula,LogicStructure,SimpleLogicalFormula
- Direct Known Subclasses:
 AggregateAtom,ASPLiteral,ComparativeAtom,DefaultNegation
public abstract class ASPBodyElement extends ASPElement
This class is a common base class for ASP formulas that can be part of an ASP rule body (premise of a rule):- Literals (i.e. atoms or strictly negated atoms)
 - Built-in atoms (i.e. terms connected by comparative operators like == and !=)
 - Aggregate atoms
 - Default negations of literals or aggregates (i.e. 'not a' a for a literal or aggregate a)
 
- Author:
 - Tim Janus, Anna Gessler
 
 
- 
- 
Constructor Summary
Constructors Constructor Description ASPBodyElement() 
- 
Method Summary
Modifier and Type Method Description abstract java.util.SortedSet<ASPLiteral>getLiterals()Returns all literals in this element in form of a SortedSet.abstract ASPBodyElementsubstitute(Term<?> t, Term<?> v)Substitutes all occurrences of term "v" in this formula by term "t" and returns the new formula.- 
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.LogicStructure
getTerms, getTerms 
- 
Methods inherited from interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
equals, hashCode, isLiteral 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getLiterals
public abstract java.util.SortedSet<ASPLiteral> getLiterals()
Returns all literals in this element in form of a SortedSet. Literals are atoms or strict negations of atoms.- Returns:
 - all the literals used in the rule element
 
 
- 
substitute
public abstract ASPBodyElement substitute(Term<?> t, Term<?> v)
Description copied from interface:ComplexLogicalFormulaSubstitutes all occurrences of term "v" in this formula by term "t" and returns the new formula.- Specified by:
 substitutein interfaceComplexLogicalFormula- Specified by:
 substitutein classASPElement- Parameters:
 t- the term to be substituted.v- the term to substitute.- Returns:
 - a formula where every occurrence of "v" is replaced by "t".
 
 
 - 
 
 -