Class InferenceRule<T extends Invertable>

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

    public abstract class InferenceRule<T extends Invertable>
    extends java.lang.Object
    implements 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.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private T conclusion
      The rule's conclusion
      private java.lang.String name
      Identifying name.
      private java.util.Collection<T> premises
      The rule's premises
    • Constructor Summary

      Constructors 
      Constructor Description
      InferenceRule()
      Creates an empty instance
      InferenceRule​(T conclusion, java.util.Collection<T> premise)
      Constructs a new inference rule of rule p -> c if strict or p => c else
    • Field Detail

      • conclusion

        private T extends Invertable conclusion
        The rule's conclusion
      • premises

        private java.util.Collection<T extends Invertable> premises
        The rule's premises
      • name

        private java.lang.String name
        Identifying name. used e.g. for formula generation
    • Constructor Detail

      • InferenceRule

        public InferenceRule()
        Creates an empty instance
      • InferenceRule

        public InferenceRule​(T conclusion,
                             java.util.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 java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • isDefeasible

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getIdentifier

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

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

        public void setName​(java.lang.String name)
        Sets the name
        Parameters:
        name - new name
      • getPremise

        public java.util.Collection<? extends T> getPremise()
        Description copied from interface: Rule
        Returns the premise of this rule.
        Specified by:
        getPremise in interface Rule<T extends Invertable,​T extends Invertable>
        Returns:
        the premise of this rule.
      • getConclusion

        public T getConclusion()
        Description copied from interface: Rule
        Returns the conclusion of this rule.
        Specified by:
        getConclusion in interface Rule<T extends Invertable,​T extends Invertable>
        Returns:
        the conclusion of this rule.