Interface AbstractDialecticalFramework

All Superinterfaces:
ArgumentationFramework<Argument>, BeliefBase, Collection<Argument>, GeneralGraph<Argument>, Graph<Argument>, Iterable<Argument>

public interface AbstractDialecticalFramework extends Graph<Argument>, Collection<Argument>, ArgumentationFramework<Argument>
The implementing subtypes must ensure the following properties:
  • Immutability
  • All methods return a non-null value if its parameters, e.g. arguments, are from this ADF
  • If a method returns a collection or stream, all its elements are non-null
This makes the usage of AbstractDialecticalFramework implementations more convenient to the user, since it avoids unnecessary nullchecks and therefore leads to more readable code. Immutability should lead to more robust code, since an ADF always remains in a valid state after creation. It makes it also easier to use in a parallel context.
Author:
Mathias Hofer
  • Method Details

    • empty

      Returns an empty AbstractDialecticalFramework. This can be used to create an ADF with no arguments or links.
      Returns:
      an empty AbstractDialecticalFramework instance
    • builder

      Returns a builder for constructing a new AbstractDialecticalFramework. The builder allows for adding arguments, acceptance conditions, and links incrementally.
      Returns:
      a builder for constructing an AbstractDialecticalFramework
    • fromFile

      Reads an AbstractDialecticalFramework from a file. The file is parsed into an ADF using a format parser.
      Parameters:
      file - the file containing the ADF definition
      Returns:
      an AbstractDialecticalFramework parsed from the file
      Throws:
      FileNotFoundException - if the file is not found
      IOException - if an I/O error occurs while reading the file
    • fromMap

      Creates a builder from a map of arguments and their corresponding acceptance conditions.
      Parameters:
      map - a map of arguments to acceptance conditions
      Returns:
      a builder for constructing an AbstractDialecticalFramework from the given map
    • transform

      Creates a new AbstractDialecticalFramework with acceptance conditions transformed using the provided function.
      Parameters:
      transformer - the transformer to apply to each acceptance condition
      Returns:
      a new ADF with transformed acceptance conditions
    • transform

      Creates a new AbstractDialecticalFramework with acceptance conditions transformed based on both the argument and its acceptance condition.
      Parameters:
      transformer - the transformer to apply to each acceptance condition and argument
      Returns:
      a new ADF with transformed acceptance conditions
    • transform

      Creates a new AbstractDialecticalFramework with acceptance conditions transformed using a Transformer.
      Parameters:
      transformer - the transformer to apply to each acceptance condition
      Returns:
      a new ADF with transformed acceptance conditions
    • query

      default SemanticsStep query()
      Initiates a query on this AbstractDialecticalFramework using the default configuration. The returned SemanticsStep allows further refinement of the query.
      Returns:
      a SemanticsStep to refine the query
    • size

      default int size()
      Returns the number of arguments in this AbstractDialecticalFramework.
      Specified by:
      size in interface Collection<Argument>
      Returns:
      the number of arguments in this ADF
    • getArguments

      Set<Argument> getArguments()
      Returns an unmodifiable set of all the arguments in this AbstractDialecticalFramework.
      Returns:
      an unmodifiable set of arguments
    • linksStream

      default Stream<Link> linksStream()
      Returns a stream of the links in this AbstractDialecticalFramework. This method is preferable if the caller only needs to consume some of the links.
      Returns:
      a stream of links in this ADF
    • links

      Set<Link> links()
      Returns an unmodifiable set of all the links in this AbstractDialecticalFramework. This method returns all the links and should be used when access to all links is needed.
      Returns:
      an unmodifiable set of links in this ADF
    • link

      Link link(Argument parent, Argument child)
      Computes and returns the link between the given parent and child arguments.
      Parameters:
      parent - the parent argument
      child - the child argument
      Returns:
      the link between the parent and child
      Throws:
      IllegalArgumentException - if the ADF does not contain a link between the parent and child
    • linksTo

      Set<Link> linksTo(Argument child)
      Returns a set of links directed towards the specified child argument.
      Parameters:
      child - the target argument
      Returns:
      a set of links pointing to the given argument
    • linksFrom

      Set<Link> linksFrom(Argument parent)
      Returns a set of links originating from the specified parent argument.
      Parameters:
      parent - the source argument
      Returns:
      a set of links originating from the given argument
    • parents

      Set<Argument> parents(Argument child)
      Returns a set of parent arguments for the given child argument.
      Parameters:
      child - the target argument
      Returns:
      a set of parent arguments
    • children

      Set<Argument> children(Argument parent)
      Returns a set of child arguments for the given parent argument.
      Parameters:
      parent - the source argument
      Returns:
      a set of child arguments
    • outgoingDegree

      int outgoingDegree(Argument arg)
      Returns the number of outgoing links from the given argument.
      Parameters:
      arg - the argument
      Returns:
      the number of outgoing links
    • incomingDegree

      int incomingDegree(Argument arg)
      Returns the number of incoming links to the given argument.
      Parameters:
      arg - the argument
      Returns:
      the number of incoming links
    • contains

      boolean contains(Argument arg)
      Checks if the given argument is contained in this AbstractDialecticalFramework.
      Parameters:
      arg - the argument to check
      Returns:
      true if the argument is contained, false otherwise
    • getAcceptanceCondition

      AcceptanceCondition getAcceptanceCondition(Argument argument)
      Retrieves the acceptance condition for the specified argument. The acceptance condition is guaranteed to be non-null if the argument is present in the ADF.
      Parameters:
      argument - the argument for which to retrieve the acceptance condition
      Returns:
      the acceptance condition for the given argument
      Throws:
      IllegalArgumentException - if the argument is not contained in the ADF
    • bipolar

      default boolean bipolar()
      Checks if the ADF is bipolar, meaning all links are either supporting or attacking.
      Returns:
      true if the ADF is bipolar, false otherwise
    • kBipolar

      int kBipolar()
      Returns the number of non-bipolar links, indicating the degree of bipolarity in this ADF.
      Returns:
      the count of non-bipolar links