Class ASPElement

  • All Implemented Interfaces:
    net.sf.tweety.commons.Formula, net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula, net.sf.tweety.logics.commons.syntax.interfaces.LogicStructure, net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
    Direct Known Subclasses:
    AggregateElement, ASPBodyElement, ASPHead, ASPRule

    public abstract class ASPElement
    extends Object
    implements net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula
    This class acts as an abstract base class for elements of ASP rules.
    Author:
    Anna Gessler
    • Constructor Summary

      Constructors 
      Constructor Description
      ASPElement()  
    • Method Summary

      Modifier and Type Method Description
      abstract ASPElement clone()  
      <C extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>>
      boolean
      containsTermsOfType​(Class<C> cls)  
      ASPElement exchange​(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t)  
      abstract Set<ASPAtom> getAtoms()  
      Class<? extends net.sf.tweety.logics.commons.syntax.Predicate> getPredicateCls()  
      abstract Set<net.sf.tweety.logics.commons.syntax.Predicate> getPredicates()  
      abstract net.sf.tweety.logics.fol.syntax.FolSignature getSignature()  
      boolean isGround()  
      boolean isWellFormed()  
      ASPElement substitute​(Map<? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>,​? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> map)  
      abstract ASPElement substitute​(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v)  
      • 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
    • Constructor Detail

      • ASPElement

        public ASPElement()
    • Method Detail

      • getPredicates

        public abstract Set<net.sf.tweety.logics.commons.syntax.Predicate> getPredicates()
        Specified by:
        getPredicates in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
      • substitute

        public abstract ASPElement substitute​(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t,
                                              net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v)
        Specified by:
        substitute in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula
      • getSignature

        public abstract net.sf.tweety.logics.fol.syntax.FolSignature getSignature()
        Specified by:
        getSignature in interface net.sf.tweety.commons.Formula
      • getAtoms

        public abstract Set<ASPAtom> getAtoms()
        Specified by:
        getAtoms in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
      • clone

        public abstract ASPElement clone()
        Specified by:
        clone in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula
        Specified by:
        clone in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
        Overrides:
        clone in class Object
      • substitute

        public ASPElement substitute​(Map<? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>,​? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> map)
                              throws IllegalArgumentException
        Specified by:
        substitute in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula
        Throws:
        IllegalArgumentException
      • exchange

        public ASPElement exchange​(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v,
                                   net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t)
                            throws IllegalArgumentException
        Specified by:
        exchange in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula
        Throws:
        IllegalArgumentException
      • containsTermsOfType

        public <C extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> boolean containsTermsOfType​(Class<C> cls)
        Specified by:
        containsTermsOfType in interface net.sf.tweety.logics.commons.syntax.interfaces.LogicStructure
      • isGround

        public boolean isGround()
        Specified by:
        isGround in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula
      • isWellFormed

        public boolean isWellFormed()
        Specified by:
        isWellFormed in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula
      • getPredicateCls

        public Class<? extends net.sf.tweety.logics.commons.syntax.Predicate> getPredicateCls()
        Specified by:
        getPredicateCls in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula