Class AspicArgument<T extends Invertable>

  • Type Parameters:
    T - is the type of the language that the ASPIC theory's rules range over
    All Implemented Interfaces:
    DungEntity, Formula, Node

    public class AspicArgument<T extends Invertable>
    extends Argument
    Author:
    Nils Geilen An argument according to the ASPIC+ specification
    • Constructor Detail

      • AspicArgument

        public AspicArgument​(InferenceRule<T> toprule,
                             java.util.Collection<AspicArgument<T>> directsubs)
        Creates an empty Argument
        Parameters:
        toprule - the argument's TopRule
        directsubs - the direct sub arguments
      • AspicArgument

        public AspicArgument​(InferenceRule<T> toprule)
        Creates an empty Argument
        Parameters:
        toprule - the argument's TopRule
    • Method Detail

      • hasDefeasibleSub

        public boolean hasDefeasibleSub()
        Checks whether this has a defeasible subrule, premises do not count as subrules
        Returns:
        whether this has a defeasible subrule
      • isStrict

        public boolean isStrict()
        An argument is strict iff it does not contain defeasible subrules
        Returns:
        true iff this argument is strict
      • isFirm

        public boolean isFirm()
        An argument is firm iff it does not contain ordinary premises
        Returns:
        iff this is firm
      • isSubArgumentOf

        public boolean isSubArgumentOf​(AspicArgument<T> arg)
        Checks wheter this is a direct or indirect subargument of arg
        Parameters:
        arg - an ASPIC argument
        Returns:
        true iff this is in Sub(arg)
      • getOrdinaryPremises

        public java.util.Collection<AspicArgument<T>> getOrdinaryPremises()
        Returns:
        all ordinary premises
      • getConclusion

        public T getConclusion()
        Returns Conc according to the ASPIC+ specification
        Returns:
        the top rule's conclusion
      • setConclusion

        public void setConclusion​(T conc)
        Change the conclusion
        Parameters:
        conc - the new conclusion
      • getAllSubs

        public java.util.Collection<AspicArgument<T>> getAllSubs()
        returns the Subs according to the ASPIC+ specification
        Returns:
        all subarguments including this
      • getDefeasibleSubs

        public java.util.Collection<AspicArgument<T>> getDefeasibleSubs()
        Determines subarguments with defeasible toprules, premises do not count as subrules
        Returns:
        all arguments in Subs with defeasible top rules
      • getListLastDefeasibleRules

        public java.util.Collection<InferenceRule<T>> getListLastDefeasibleRules()
        Returns all defeasible subrules of the level where the first defeasible subrule appears, i.e. the set of defeasible subrules with the smallest depth
        Returns:
        the last defeasible rules
      • getDefeasibleRules

        public java.util.Collection<InferenceRule<T>> getDefeasibleRules()
        Returns the DefRules according to ASPIC+ specification, i.e. the defeasible toprules of subarguments
        Returns:
        this argument's defeasible rules
      • getAllRules

        public java.util.Collection<InferenceRule<T>> getAllRules()
        Returns all rules appearing in this argument.
        Returns:
        all rules appearing in this argument.
      • getAllConclusions

        public java.util.Collection<T> getAllConclusions()
        Returns all conclusions appearing in this argument.
        Returns:
        all conclusions appearing in this argument.
      • getDirectSubs

        public java.util.Collection<AspicArgument<T>> getDirectSubs()
        The argument's direct children, whose conclusions fit its prerequisites
        Returns:
        the direct subrules
      • equals

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

        public void addDirectSub​(AspicArgument<T> sub)
        Adds a subargument
        Parameters:
        sub - to be added
      • getTopRule

        public InferenceRule<T> getTopRule()
        Retruns the TopRule according to ASPIC+ specification
        Returns:
        the top rule
      • setTopRule

        public void setTopRule​(InferenceRule<T> toprule)
        Changes the TopRule
        Parameters:
        toprule - the new TopRule
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class Argument
      • isAttack

        public static <T extends Invertable> boolean isAttack​(AspicArgument<T> active,
                                                              AspicArgument<T> passive,
                                                              RuleFormulaGenerator<T> rfgen,
                                                              java.util.Comparator<AspicArgument<T>> order)
        Determines whether the attack is successful
        Type Parameters:
        T - the type of formulas
        Parameters:
        active - the active argument
        passive - the passive argument
        rfgen - a rule formula generator
        order - a comparator
        Returns:
        true iff the attack is successful