public class DefaultNegation extends ASPBodyElement
In answer set programming, the body of a rule is usually composed of a set of positive and negative literals, where this valuation refers to default negation or negation as failure. When implementing a rule, there are two opportunities:
| Constructor and Description |
|---|
DefaultNegation(ASPBodyElement at)
Creates new default negation with the given literal.
|
| Modifier and Type | Method and Description |
|---|---|
DefaultNegation |
clone() |
boolean |
equals(Object obj) |
Set<ASPAtom> |
getAtoms() |
ASPBodyElement |
getLiteral() |
SortedSet<ASPLiteral> |
getLiterals()
Returns all literals in this element in form of a SortedSet.
|
Set<net.sf.tweety.logics.commons.syntax.Predicate> |
getPredicates() |
net.sf.tweety.logics.fol.syntax.FolSignature |
getSignature() |
Set<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> |
getTerms() |
<C extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> |
getTerms(Class<C> cls) |
int |
hashCode() |
boolean |
isLiteral() |
boolean |
isWellFormed() |
void |
setLiteral(ASPBodyElement literal) |
ASPBodyElement |
substitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t,
net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v) |
String |
toString() |
containsTermsOfType, exchange, getPredicateCls, isGround, substitutepublic DefaultNegation(ASPBodyElement at)
at - a classical atom or an aggregate atompublic SortedSet<ASPLiteral> getLiterals()
ASPBodyElementgetLiterals in class ASPBodyElementpublic Set<net.sf.tweety.logics.commons.syntax.Predicate> getPredicates()
getPredicates in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulagetPredicates in class ASPElementpublic Set<ASPAtom> getAtoms()
getAtoms in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulagetAtoms in class ASPElementpublic ASPBodyElement substitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v)
substitute in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormulasubstitute in class ASPBodyElementpublic net.sf.tweety.logics.fol.syntax.FolSignature getSignature()
getSignature in interface net.sf.tweety.commons.FormulagetSignature in class ASPElementpublic boolean isWellFormed()
isWellFormed in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormulaisWellFormed in class ASPElementpublic boolean isLiteral()
public Set<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> getTerms()
public <C extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> Set<C> getTerms(Class<C> cls)
public DefaultNegation clone()
clone in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormulaclone in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulaclone in class ASPElementpublic ASPBodyElement getLiteral()
public void setLiteral(ASPBodyElement literal)
public int hashCode()
Copyright © 2019. All rights reserved.