Class BipolarArgFramework

  • All Implemented Interfaces:
    java.lang.Comparable<DungTheory>, java.lang.Iterable<Argument>, java.util.Collection<Argument>, BeliefBase, Graph<Argument>
    Direct Known Subclasses:
    EvidentialArgSystem

    public class BipolarArgFramework
    extends DungTheory
    This class implements a bipolar abstract argumentation theory with support in a deductive sense. ie. if a supports b, then the acceptance of a implies the acceptance of b and as a consequence the non-acceptance of b implies the non-acceptance of a.

    See

    Cayrol, Lagasquie-Schiex. Bipolarity in argumentation graphs: Towards a better understanding. 2013

    and

    Boella et al. Support in Abstract Argumentation. 2010
    • Field Detail

      • supportParents

        private java.util.Map<Argument,​java.util.Set<Argument>> supportParents
        explicit listing of direct supporters and supported (for efficiency reasons)
      • supportChildren

        private java.util.Map<Argument,​java.util.Set<Argument>> supportChildren
    • Constructor Detail

      • BipolarArgFramework

        public BipolarArgFramework()
        Default constructor; initializes empty sets of arguments, attacks and supports
      • BipolarArgFramework

        public BipolarArgFramework​(Graph<Argument> graph)
        Creates a new theory from the given graph.
        Parameters:
        graph - some graph
    • Method Detail

      • isClosed

        public boolean isClosed​(Extension ext)
        Determines if ext is closed under the support relation of this framework i.e., if all arguments supported by ext are an element of ext
        Parameters:
        ext - an extension
        Returns:
        true if ext is closed under R_sup
      • getDeductiveComplexAttacks

        public java.util.Set<Attack> getDeductiveComplexAttacks()
        Calculates the set of deductive complex attacks (d-attacks) in this bipolar argumentation framework i.e. all direct, supported, mediated and super-mediated attacks
        Returns:
        set of d-attacks in this bipolar argumentation framework
      • getComplexAttacks

        public java.util.Set<Attack> getComplexAttacks()
        Calculates the set of complex attacks in this bipolar argumentation framework i.e. all direct, supported and mediated attacks
        Returns:
        set of complex attacks in this bipolar argumentation framework
      • getMediatedAttacks

        public java.util.Set<Attack> getMediatedAttacks​(Argument arg1)
        Calculates the set of mediated attack from "arg1" to other arguments "y", i.e. whether there is a sequence of direct supports from "y" to "x" and a direct attack from "arg1" to "x".
        Parameters:
        arg1 - an argument.
        Returns:
        set of mediated attacks starting from "arg1".
      • isMediatedAttack

        public boolean isMediatedAttack​(Argument arg1,
                                        Argument arg2)
        Checks whether there exists a mediated attack from "arg1" to "arg2", i.e. whether there is a sequence of direct supports from "arg2" to "x" and a direct attack from "arg1" to "x".
        Parameters:
        arg1 - an argument.
        arg2 - an argument.
        Returns:
        "true" iff there is a mediated attack from "arg1" to "arg2".
      • isSuperMediatedAttack

        public boolean isSuperMediatedAttack​(Argument arg1,
                                             Argument arg2)
        Checks whether there exists a super-mediated attack from "arg1" to "arg2", i.e. whether there is a sequence of direct supports from "arg2" to "x" and a direct or supported attack from "arg1" to "x".
        Parameters:
        arg1 - an argument.
        arg2 - an argument.
        Returns:
        "true" iff there is a super-mediated attack from "arg1" to "arg2".
      • getSupportedAttacks

        public java.util.Set<Attack> getSupportedAttacks​(Argument arg1)
        Calculates the set of supported attack from "arg1" to other arguments "y", i.e. whether there is a sequence of direct supports from "arg1" to "x" and a direct attack from "x" to "y".
        Parameters:
        arg1 - an argument.
        Returns:
        set of supported attacks starting from "arg1".
      • isSupportedAttack

        public boolean isSupportedAttack​(Argument arg1,
                                         Argument arg2)
        Checks whether there exists a supported attack from "arg1" to "arg2", i.e. whether there is a sequence of direct supports from "arg1" to "x" and a direct attack from "x" to "arg2".
        Parameters:
        arg1 - an argument.
        arg2 - an argument.
        Returns:
        "true" iff there is a supported attack from "arg1" to "arg2".
      • getSupported

        public java.util.Set<Argument> getSupported​(java.util.Collection<Argument> ext)
        Computes the set {A | there is a sequence of direct supports from an element of ext to A
        Parameters:
        ext - an extension ie. a set of arguments
        Returns:
        the set of all arguments that are supported by ext.
      • getSupported

        public java.util.Set<Argument> getSupported​(Argument argument)
        Computes the set {A | there is a sequence of direct supports from argument to A
        Parameters:
        argument - an argument
        Returns:
        the set of all arguments that are supported by argument.
      • getSupported

        private java.util.Set<Argument> getSupported​(Argument argument,
                                                     java.util.Set<Argument> visited)
        Computes the set {A | there is a sequence of direct supports from argument to A}.
        Parameters:
        argument - an argument
        visited - already visited arguments
        Returns:
        the set of all arguments that are supported by argument.
      • getDirectSupported

        public java.util.Set<Argument> getDirectSupported​(Argument argument)
        Computes the set {A | (argument,A) in supports}.
        Parameters:
        argument - an argument
        Returns:
        the set of all arguments that are supported by argument.
      • getSupporters

        public java.util.Set<Argument> getSupporters​(Argument argument)
        Computes the set {A | there is a sequence of direct supports from A to argument
        Parameters:
        argument - an argument
        Returns:
        the set of all arguments that support argument.
      • getSupporters

        private java.util.Set<Argument> getSupporters​(Argument argument,
                                                      java.util.Set<Argument> visited)
        Computes the set {A | there is a sequence of direct supports from A to argument}.
        Parameters:
        argument - an argument
        visited - already visited arguments
        Returns:
        the set of all arguments that support argument.
      • getDirectSupporters

        public java.util.Set<Argument> getDirectSupporters​(Argument argument)
        Computes the set {A | (A,argument) in supports}.
        Parameters:
        argument - an argument
        Returns:
        the set of all arguments that support argument.
      • isSupported

        public boolean isSupported​(Argument argument,
                                   Extension ext)
        returns true if some argument of ext supports argument.
        Parameters:
        argument - an argument
        ext - an extension, ie. a set of arguments
        Returns:
        true if some argument of ext supports argument.
      • isSupportedBy

        public boolean isSupportedBy​(Argument argument,
                                     java.util.Collection<Argument> ext)
        returns true if some argument of ext is supported by argument.
        Parameters:
        argument - an argument
        ext - an extension, ie. a set of arguments
        Returns:
        true if some argument of ext is supported by argument.
      • isSupported

        public boolean isSupported​(Extension ext1,
                                   Extension ext2)
        returns true if some argument of ext2 supports some argument in ext1
        Parameters:
        ext1 - an extension, ie. a set of arguments
        ext2 - an extension, ie. a set of arguments
        Returns:
        true if some argument of ext2 supports some argument in ext1
      • isSupportedBy

        public boolean isSupportedBy​(Argument arg1,
                                     Argument arg2)
        Checks whether there is a sequence of direct supports from arg1 to arg2.
        Parameters:
        arg1 - an argument.
        arg2 - an argument.
        Returns:
        "true" if arg1 is supported by arg2
      • isDirectSupportedBy

        public boolean isDirectSupportedBy​(Argument arg1,
                                           Argument arg2)
        Checks whether arg1 is directly supported by arg2.
        Parameters:
        arg1 - an argument.
        arg2 - an argument.
        Returns:
        "true" if arg1 is directly supported by arg2
      • prettyPrint

        public java.lang.String prettyPrint()
        Pretty print of the framework.
        Overrides:
        prettyPrint in class DungTheory
        Returns:
        the pretty print of the framework.
      • add

        public boolean add​(Support support)
        Adds the given support to this bipolar argumentation framework.
        Parameters:
        support - a support
        Returns:
        "true" if the set of supports has been modified.
      • addSupport

        public boolean addSupport​(Argument supporter,
                                  Argument supported)
        Adds a support from the first argument to the second to this bipolar argumentation framework.
        Parameters:
        supporter - some argument
        supported - some argument
        Returns:
        "true" if the set of supports has been modified.
      • remove

        public boolean remove​(Support support)
        Removes the given support from this bipolar argumentation framework.
        Parameters:
        support - a support
        Returns:
        "true" if the set of supports has been modified.
      • remove

        public boolean remove​(Argument a)
        Removes the argument and all its attacks and supports
        Overrides:
        remove in class DungTheory
        Parameters:
        a - some argument
        Returns:
        true if this structure has been changed
      • removeAll

        public boolean removeAll​(java.util.Collection<?> c)
        Specified by:
        removeAll in interface java.util.Collection<Argument>
        Overrides:
        removeAll in class DungTheory
      • contains

        public boolean contains​(java.lang.Object o)
        Description copied from interface: Graph
        Returns "true" when this graph contains the given node or edge.
        Specified by:
        contains in interface java.util.Collection<Argument>
        Specified by:
        contains in interface Graph<Argument>
        Overrides:
        contains in class DungTheory
        Parameters:
        o - an object
        Returns:
        "true" if this graph contains the given node or edge.
      • containsSupport

        public boolean containsSupport​(Support supp)
        Checks whether this theory contains the given support.
        Parameters:
        supp - some support
        Returns:
        "true" iff this theory contains the given support.
      • addAllSupports

        public boolean addAllSupports​(java.util.Collection<? extends Support> c)
        Adds the set of supports to this bipolar argumentation framework.
        Parameters:
        c - a collection of supports
        Returns:
        "true" if this bipolar argumentation framework has been modified.
      • add

        public boolean add​(BipolarArgFramework baf)
        Adds all arguments, attacks and supports of the given framework to this framework
        Parameters:
        baf - some bipolar argumentation framework
        Returns:
        "true" if this bipolar argumentation framework has been modified
      • getSupports

        public java.util.Set<Support> getSupports()
        Returns all supports of this framework.
        Returns:
        all supports of this framework.
      • getCompleteAssociatedDungTheory

        public DungTheory getCompleteAssociatedDungTheory()
        constructs the complete associated dung theory of this bipolar argumentation framework# i.e. constructs all deductive complex attacks of BAF and returns dung theory without supports
        Returns:
        the complete associated Dung Theory of this bipolar argumentation framework
      • getMetaFramework

        public DungTheory getMetaFramework()
        constructs the meta dung theory of this bipolar argumentation framework by adding meta-arguments for every attack and support relation
        Returns:
        the meta dung theory of this bipolar argumentation framework
      • areAdjacent

        public boolean areAdjacent​(Argument a,
                                   Argument b)
        Description copied from interface: Graph
        Returns "true" iff the two nodes are connected by a directed edge from a to b or an undirected edge.
        Specified by:
        areAdjacent in interface Graph<Argument>
        Overrides:
        areAdjacent in class DungTheory
        Parameters:
        a - some node
        b - some node
        Returns:
        "true" iff the two nodes are connected by a directed edge from a to b or an undirected edge.