Class AspicArgument<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.arg.dung.syntax.DungEntity, net.sf.tweety.commons.Formula, net.sf.tweety.graphs.Node

    public class AspicArgument<T extends net.sf.tweety.logics.commons.syntax.interfaces.Invertable>
    extends net.sf.tweety.arg.dung.syntax.Argument
    Author:
    Nils Geilen An argument according to the ASPIC+ specification
    • Constructor Detail

      • AspicArgument

        public AspicArgument​(InferenceRule<T> toprule,
                             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)
      • 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 Collection<AspicArgument<T>> getAllSubs()
        returns the Subs according to the ASPIC+ specification
        Returns:
        all subarguments including this
      • getDefeasibleSubs

        public 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 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 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 Collection<InferenceRule<T>> getAllRules()
        Returns all rules appearing in this argument.
        Returns:
        all rules appearing in this argument.
      • getAllConclusions

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

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

        public int hashCode()
        Overrides:
        hashCode in class net.sf.tweety.arg.dung.syntax.Argument
      • equals

        public boolean equals​(Object obj)
        Overrides:
        equals in class net.sf.tweety.arg.dung.syntax.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 String toString()
        Overrides:
        toString in class net.sf.tweety.arg.dung.syntax.Argument
      • isAttack

        public static <T extends net.sf.tweety.logics.commons.syntax.interfaces.Invertable> boolean isAttack​(AspicArgument<T> active,
                                                                                                             AspicArgument<T> passive,
                                                                                                             RuleFormulaGenerator<T> rfgen,
                                                                                                             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