Class InferenceRule<T extends net.sf.tweety.logics.commons.syntax.interfaces.Invertable>

  • Type Parameters:
    T - is the type of the language that the ASPIC theory's rules range over
    All Implemented Interfaces:
    net.sf.tweety.commons.Formula, net.sf.tweety.commons.util.rules.Rule<T,​T>
    Direct Known Subclasses:
    DefeasibleInferenceRule, StrictInferenceRule

    public abstract class InferenceRule<T extends net.sf.tweety.logics.commons.syntax.interfaces.Invertable>
    extends Object
    implements net.sf.tweety.commons.util.rules.Rule<T,​T>
    Author:
    Nils Geilen This stands for an inference rule or for a premise if premises has length 0. If this is a premise and defeasible it is an ordinary premise else it is an axiom.
    • Constructor Detail

      • InferenceRule

        public InferenceRule()
        Creates an empty instance
      • InferenceRule

        public InferenceRule​(T conclusion,
                             Collection<T> premise)
        Constructs a new inference rule of rule p -> c if strict or p => c else
        Parameters:
        conclusion - ^= p
        premise - ^= c
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • isDefeasible

        public abstract boolean isDefeasible()
        Returns:
        true iff this rule is defeasible
      • getIdentifier

        public String getIdentifier()
        Returns the name if it has one, else it returns the hashcode
        Returns:
        an identifier for this rule
      • getName

        public String getName()
        Returns the name
        Returns:
        this rul's name
      • setName

        public void setName​(String name)
        Sets the name
        Parameters:
        name - new name
      • isFact

        public boolean isFact()
        Specified by:
        isFact in interface net.sf.tweety.commons.util.rules.Rule<T extends net.sf.tweety.logics.commons.syntax.interfaces.Invertable,​T extends net.sf.tweety.logics.commons.syntax.interfaces.Invertable>
      • isConstraint

        public boolean isConstraint()
        Specified by:
        isConstraint in interface net.sf.tweety.commons.util.rules.Rule<T extends net.sf.tweety.logics.commons.syntax.interfaces.Invertable,​T extends net.sf.tweety.logics.commons.syntax.interfaces.Invertable>
      • setConclusion

        public void setConclusion​(T conclusion)
        Specified by:
        setConclusion in interface net.sf.tweety.commons.util.rules.Rule<T extends net.sf.tweety.logics.commons.syntax.interfaces.Invertable,​T extends net.sf.tweety.logics.commons.syntax.interfaces.Invertable>
      • addPremise

        public void addPremise​(T premise)
        Specified by:
        addPremise in interface net.sf.tweety.commons.util.rules.Rule<T extends net.sf.tweety.logics.commons.syntax.interfaces.Invertable,​T extends net.sf.tweety.logics.commons.syntax.interfaces.Invertable>
      • addPremises

        public void addPremises​(Collection<? extends T> premises)
        Specified by:
        addPremises in interface net.sf.tweety.commons.util.rules.Rule<T extends net.sf.tweety.logics.commons.syntax.interfaces.Invertable,​T extends net.sf.tweety.logics.commons.syntax.interfaces.Invertable>
      • getSignature

        public net.sf.tweety.commons.Signature getSignature()
        Specified by:
        getSignature in interface net.sf.tweety.commons.Formula
        Specified by:
        getSignature in interface net.sf.tweety.commons.util.rules.Rule<T extends net.sf.tweety.logics.commons.syntax.interfaces.Invertable,​T extends net.sf.tweety.logics.commons.syntax.interfaces.Invertable>
      • getPremise

        public Collection<? extends T> getPremise()
        Specified by:
        getPremise in interface net.sf.tweety.commons.util.rules.Rule<T extends net.sf.tweety.logics.commons.syntax.interfaces.Invertable,​T extends net.sf.tweety.logics.commons.syntax.interfaces.Invertable>
      • getConclusion

        public T getConclusion()
        Specified by:
        getConclusion in interface net.sf.tweety.commons.util.rules.Rule<T extends net.sf.tweety.logics.commons.syntax.interfaces.Invertable,​T extends net.sf.tweety.logics.commons.syntax.interfaces.Invertable>