Class BipolarArgFramework

  • All Implemented Interfaces:
    Comparable<net.sf.tweety.arg.dung.syntax.DungTheory>, Iterable<net.sf.tweety.arg.dung.syntax.Argument>, Collection<net.sf.tweety.arg.dung.syntax.Argument>, net.sf.tweety.commons.BeliefBase, net.sf.tweety.graphs.Graph<net.sf.tweety.arg.dung.syntax.Argument>
    Direct Known Subclasses:
    EvidentialArgSystem

    public class BipolarArgFramework
    extends net.sf.tweety.arg.dung.syntax.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 Summary

      • Fields inherited from class net.sf.tweety.commons.BeliefSet

        EQUALS_USES_SIGNATURE, signature
      • Fields inherited from interface net.sf.tweety.graphs.Graph

        IGNORE_SELFLOOPS, INVERT_SELFLOOPS, REMOVE_SELFLOOPS
    • Constructor Summary

      Constructors 
      Constructor Description
      BipolarArgFramework()
      Default constructor; initializes empty sets of arguments, attacks and supports
      BipolarArgFramework​(net.sf.tweety.graphs.Graph<net.sf.tweety.arg.dung.syntax.Argument> graph)
      Creates a new theory from the given graph.
    • Method Summary

      Modifier and Type Method Description
      boolean add​(BipolarArgFramework baf)
      Adds all arguments, attacks and supports of the given framework to this framework
      boolean add​(Support support)
      Adds the given support to this bipolar argumentation framework.
      boolean addAllSupports​(Collection<? extends Support> c)
      Adds the set of supports to this bipolar argumentation framework.
      boolean addSupport​(net.sf.tweety.arg.dung.syntax.Argument supporter, net.sf.tweety.arg.dung.syntax.Argument supported)
      Adds a support from the first argument to the second to this bipolar argumentation framework.
      boolean areAdjacent​(net.sf.tweety.arg.dung.syntax.Argument a, net.sf.tweety.arg.dung.syntax.Argument b)  
      boolean contains​(Object o)  
      boolean containsSupport​(Support supp)
      Checks whether this theory contains the given support.
      net.sf.tweety.arg.dung.syntax.DungTheory getCompleteAssociatedDungTheory()
      constructs the complete associated dung theory of this bipolar argumentation framework# i.e.
      Set<net.sf.tweety.arg.dung.syntax.Attack> getComplexAttacks()
      Calculates the set of complex attacks in this bipolar argumentation framework i.e.
      Set<net.sf.tweety.arg.dung.syntax.Attack> getDeductiveComplexAttacks()
      Calculates the set of deductive complex attacks (d-attacks) in this bipolar argumentation framework i.e.
      Set<net.sf.tweety.arg.dung.syntax.Argument> getDirectSupported​(net.sf.tweety.arg.dung.syntax.Argument argument)
      Computes the set {A | (argument,A) in supports}.
      Set<net.sf.tweety.arg.dung.syntax.Argument> getDirectSupporters​(net.sf.tweety.arg.dung.syntax.Argument argument)
      Computes the set {A | (A,argument) in supports}.
      Set<net.sf.tweety.arg.dung.syntax.Attack> getMediatedAttacks​(net.sf.tweety.arg.dung.syntax.Argument arg1)
      Calculates the set of mediated attack from "arg1" to other arguments "y", i.e.
      net.sf.tweety.arg.dung.syntax.DungTheory getMetaFramework()
      constructs the meta dung theory of this bipolar argumentation framework by adding meta-arguments for every attack and support relation
      Set<net.sf.tweety.arg.dung.syntax.Argument> getSupported​(Collection<net.sf.tweety.arg.dung.syntax.Argument> ext)
      Computes the set {A | there is a sequence of direct supports from an element of ext to A
      Set<net.sf.tweety.arg.dung.syntax.Argument> getSupported​(net.sf.tweety.arg.dung.syntax.Argument argument)
      Computes the set {A | there is a sequence of direct supports from argument to A
      Set<net.sf.tweety.arg.dung.syntax.Attack> getSupportedAttacks​(net.sf.tweety.arg.dung.syntax.Argument arg1)
      Calculates the set of supported attack from "arg1" to other arguments "y", i.e.
      Set<net.sf.tweety.arg.dung.syntax.Argument> getSupporters​(net.sf.tweety.arg.dung.syntax.Argument argument)
      Computes the set {A | there is a sequence of direct supports from A to argument
      Set<Support> getSupports()
      Returns all supports of this framework.
      boolean isClosed​(net.sf.tweety.arg.dung.semantics.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
      boolean isDirectSupportedBy​(net.sf.tweety.arg.dung.syntax.Argument arg1, net.sf.tweety.arg.dung.syntax.Argument arg2)
      Checks whether arg1 is directly supported by arg2.
      boolean isMediatedAttack​(net.sf.tweety.arg.dung.syntax.Argument arg1, net.sf.tweety.arg.dung.syntax.Argument arg2)
      Checks whether there exists a mediated attack from "arg1" to "arg2", i.e.
      boolean isSuperMediatedAttack​(net.sf.tweety.arg.dung.syntax.Argument arg1, net.sf.tweety.arg.dung.syntax.Argument arg2)
      Checks whether there exists a super-mediated attack from "arg1" to "arg2", i.e.
      boolean isSupported​(net.sf.tweety.arg.dung.semantics.Extension ext1, net.sf.tweety.arg.dung.semantics.Extension ext2)
      returns true if some argument of ext2 supports some argument in ext1
      boolean isSupported​(net.sf.tweety.arg.dung.syntax.Argument argument, net.sf.tweety.arg.dung.semantics.Extension ext)
      returns true if some argument of ext supports argument.
      boolean isSupportedAttack​(net.sf.tweety.arg.dung.syntax.Argument arg1, net.sf.tweety.arg.dung.syntax.Argument arg2)
      Checks whether there exists a supported attack from "arg1" to "arg2", i.e.
      boolean isSupportedBy​(net.sf.tweety.arg.dung.syntax.Argument argument, Collection<net.sf.tweety.arg.dung.syntax.Argument> ext)
      returns true if some argument of ext is supported by argument.
      boolean isSupportedBy​(net.sf.tweety.arg.dung.syntax.Argument arg1, net.sf.tweety.arg.dung.syntax.Argument arg2)
      Checks whether there is a sequence of direct supports from arg1 to arg2.
      String prettyPrint()
      Pretty print of the framework.
      boolean remove​(Support support)
      Removes the given support from this bipolar argumentation framework.
      boolean remove​(net.sf.tweety.arg.dung.syntax.Argument a)
      Removes the argument and all its attacks and supports
      boolean removeAll​(Collection<?> c)  
      • Methods inherited from class net.sf.tweety.arg.dung.syntax.DungTheory

        add, add, add, add, addAllAttacks, addAttack, compareTo, containsAll, containsAttack, containsCycle, equals, existsDirectedPath, faf, getAdjacencyMatrix, getAttacked, getAttackers, getAttacks, getChildren, getComplementGraph, getComponents, getEdge, getEdges, getMinimalSignature, getNeighbors, getNodes, getNumberOfNodes, getParents, getRestriction, getStronglyConnectedComponents, getSubgraphs, hasAttackBranch, hasDefenseBranch, hashCode, hasSelfLoops, instantiateSignature, isAttackBranch, isAttacked, isAttacked, isAttackedBy, isAttackedBy, isAttackingAllOtherArguments, isCoherent, isDefenseBranch, isIndirectAttack, isRelativelyCoherent, isStable, isSupport, isWeightedGraph, isWellFounded, remove, toString
      • Methods inherited from class net.sf.tweety.commons.BeliefSet

        addAll, clear, getSignature, instantiateSet, isEmpty, iterator, remove, retainAll, setSignature, size, toArray, toArray
      • Methods inherited from interface net.sf.tweety.graphs.Graph

        iterator
    • Constructor Detail

      • BipolarArgFramework

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

        public BipolarArgFramework​(net.sf.tweety.graphs.Graph<net.sf.tweety.arg.dung.syntax.Argument> graph)
        Creates a new theory from the given graph.
        Parameters:
        graph - some graph
    • Method Detail

      • isClosed

        public boolean isClosed​(net.sf.tweety.arg.dung.semantics.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 Set<net.sf.tweety.arg.dung.syntax.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 Set<net.sf.tweety.arg.dung.syntax.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 Set<net.sf.tweety.arg.dung.syntax.Attack> getMediatedAttacks​(net.sf.tweety.arg.dung.syntax.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​(net.sf.tweety.arg.dung.syntax.Argument arg1,
                                        net.sf.tweety.arg.dung.syntax.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​(net.sf.tweety.arg.dung.syntax.Argument arg1,
                                             net.sf.tweety.arg.dung.syntax.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 Set<net.sf.tweety.arg.dung.syntax.Attack> getSupportedAttacks​(net.sf.tweety.arg.dung.syntax.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​(net.sf.tweety.arg.dung.syntax.Argument arg1,
                                         net.sf.tweety.arg.dung.syntax.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 Set<net.sf.tweety.arg.dung.syntax.Argument> getSupported​(Collection<net.sf.tweety.arg.dung.syntax.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 Set<net.sf.tweety.arg.dung.syntax.Argument> getSupported​(net.sf.tweety.arg.dung.syntax.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.
      • getDirectSupported

        public Set<net.sf.tweety.arg.dung.syntax.Argument> getDirectSupported​(net.sf.tweety.arg.dung.syntax.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 Set<net.sf.tweety.arg.dung.syntax.Argument> getSupporters​(net.sf.tweety.arg.dung.syntax.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.
      • getDirectSupporters

        public Set<net.sf.tweety.arg.dung.syntax.Argument> getDirectSupporters​(net.sf.tweety.arg.dung.syntax.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​(net.sf.tweety.arg.dung.syntax.Argument argument,
                                   net.sf.tweety.arg.dung.semantics.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​(net.sf.tweety.arg.dung.syntax.Argument argument,
                                     Collection<net.sf.tweety.arg.dung.syntax.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​(net.sf.tweety.arg.dung.semantics.Extension ext1,
                                   net.sf.tweety.arg.dung.semantics.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​(net.sf.tweety.arg.dung.syntax.Argument arg1,
                                     net.sf.tweety.arg.dung.syntax.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​(net.sf.tweety.arg.dung.syntax.Argument arg1,
                                           net.sf.tweety.arg.dung.syntax.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 String prettyPrint()
        Pretty print of the framework.
        Overrides:
        prettyPrint in class net.sf.tweety.arg.dung.syntax.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​(net.sf.tweety.arg.dung.syntax.Argument supporter,
                                  net.sf.tweety.arg.dung.syntax.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​(net.sf.tweety.arg.dung.syntax.Argument a)
        Removes the argument and all its attacks and supports
        Overrides:
        remove in class net.sf.tweety.arg.dung.syntax.DungTheory
        Parameters:
        a - some argument
        Returns:
        true if this structure has been changed
      • removeAll

        public boolean removeAll​(Collection<?> c)
        Specified by:
        removeAll in interface Collection<net.sf.tweety.arg.dung.syntax.Argument>
        Overrides:
        removeAll in class net.sf.tweety.arg.dung.syntax.DungTheory
      • contains

        public boolean contains​(Object o)
        Specified by:
        contains in interface Collection<net.sf.tweety.arg.dung.syntax.Argument>
        Specified by:
        contains in interface net.sf.tweety.graphs.Graph<net.sf.tweety.arg.dung.syntax.Argument>
        Overrides:
        contains in class net.sf.tweety.arg.dung.syntax.DungTheory
      • 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​(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 Set<Support> getSupports()
        Returns all supports of this framework.
        Returns:
        all supports of this framework.
      • getCompleteAssociatedDungTheory

        public net.sf.tweety.arg.dung.syntax.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 net.sf.tweety.arg.dung.syntax.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​(net.sf.tweety.arg.dung.syntax.Argument a,
                                   net.sf.tweety.arg.dung.syntax.Argument b)
        Specified by:
        areAdjacent in interface net.sf.tweety.graphs.Graph<net.sf.tweety.arg.dung.syntax.Argument>
        Overrides:
        areAdjacent in class net.sf.tweety.arg.dung.syntax.DungTheory