Class SerialisationGraphGenerator

java.lang.Object
org.tweetyproject.arg.dung.serialisibility.plotting.SerialisationGraphGenerator

public class SerialisationGraphGenerator extends Object
This class represents a generator for exemplary frameworks with serialisable extensions. The objects of this class verify that the generated frameworks and their serialisation graphs comply specified conditions.
Version:
TweetyProject 1.23
Author:
Julian Sander
See Also:
  • Constructor Details

  • Method Details

    • addConditionForFramework

      public void addConditionForFramework(Principle condition, AbstractExtensionReasoner reasonerToCheck)
      Adds a specified principle as a condition, which is fulfilled by all frameworks generated by this class. The specified reasoner will check if the principle is satisfied.
      Parameters:
      condition - Principle, which will be fulfilled by all frameworks generated by this class.
      reasonerToCheck - Reasoner, which will be used to check whether the condition is satisfied or not.
    • addConditionForGraph

      public void addConditionForGraph(Postulate<Argument> condition, PostulateEvaluatable<Argument> evaluation)
      Adds a specified postulate as a condition, which is satisfied by all serialisation graphs wrt the specified semantics, for all generated frameworks. The parameter evaluation is used to verify the condition.
      Parameters:
      condition - condition, which is satisfied by all analyses, or rather the graph resulting from the analysis
      evaluation - Used to verify if the condition is satisfied by a analysis or rather the graph resulting from the analysis
    • changeParameterAttackProbability

      public void changeParameterAttackProbability(double attackProbability)
      Changes the Parameter to generate exemplary serializability analyses.
      Parameters:
      attackProbability - DungTheoryGenerationParameters.attackProbability
    • changeParameterNumberOfArguments

      public void changeParameterNumberOfArguments(int numberOfArguments)
      Changes the Parameter to generate exemplary serializability analyses.
      Parameters:
      numberOfArguments - DungTheoryGenerationParameters.numberOfArguments
    • changeParameterSeed

      public void changeParameterSeed(long seed)
      Changes the Parameter to generate exemplary serializability analyses.
      Parameters:
      seed - DungTheoryGenerator.setSeed(long)
    • changeParameterSelfAttacks

      public void changeParameterSelfAttacks(boolean avoidSelfAttacks)
      Changes the Parameter to generate exemplary serializability analyses.
      Parameters:
      avoidSelfAttacks - DungTheoryGenerationParameters.avoidSelfAttacks
    • findExample

      public DungTheory findExample(Semantics semanticsForSerializing, boolean abortFrameworkNotComply, boolean abortGraphNotComply) throws NoExampleFoundException
      Creates an exemplary abstract argumentation framework. The framework itself, and its serialisation graphs comply to the conditions of this generator.
      Parameters:
      semanticsForSerializing - Semantics of the extensions created during the serializing process, which will be analyzed.
      abortFrameworkNotComply - If TRUE, an exception is thrown and the method aborted whenever no framework compliant to the conditions can be generated. If FALSE, returns NULL if no framework can be generated.
      abortGraphNotComply - If TRUE, an exception is thrown and the method aborted whenever an graph doesn't comply the conditions. If FALSE, returns NULL if graph doesn't satisfies conditions.
      Returns:
      Generated exemplary framework.
      Throws:
      NoExampleFoundException - Throws an exception, if no framework compliant to the conditions could be created within the specified number of maximum attempts or if the serilisation graph of the generated framework does not comply the conditions
    • findExample

      public DungTheory[] findExample(Semantics semanticsForSerializing, int numberOfExamples, boolean abortFrameworkNotComply, boolean abortAnalysisNotComply) throws NoExampleFoundException
      Creates exemplary abstract argumentation frameworks. The frameworks themselves, and their serialisation graphs comply to the conditions of this generator.
      Parameters:
      semanticsForSerializing - Semantics of the extensions created during the serializing process, which will be analyzed.
      numberOfExamples - Number of examples generated.
      abortFrameworkNotComply - If TRUE, an exception is thrown and the method aborted whenever no framework compliant to the conditions can be generated. If FALSE, skips settings for non compliant frameworks and returns less output.
      abortAnalysisNotComply - If TRUE, an exception is thrown and the method aborted whenever an analysis doesn't comply the conditions. If FALSE, skips non compliant analysis and returns less output.
      Returns:
      Generated exemplary frameworks.
      Throws:
      NoExampleFoundException - Throws an exception, if no framework compliant to the conditions could be created within the specified number of maximum attempts or if the serilisation graph of the generated framework does not comply the conditions
    • findExample

      public DungTheory[] findExample(Semantics semanticsForSerializing, int numberOfArgumentsStart, int maxNumberOfArguments, int numberOfExamplesPerIncrement, int incrementForNumberOfArguments, boolean abortFrameworkNotComply, boolean abortAnalysisNotComply) throws NoExampleFoundException
      Creates exemplary argumentation frameworks and analyzes their serialisable extensions. The method generates frameworks starting with the specified number of arguments, and increasing this number by the specified increment as long as the number stays lower or equal than the specified maximum number of arguments (inclusive boundary).
      Parameters:
      semanticsForSerializing - Semantics of the extensions created during the serializing process, which will be analyzed.
      numberOfArgumentsStart - Number of Arguments of the first framework, which will be generated as an example.
      maxNumberOfArguments - Maximum number of arguments of any framework generated by this method.
      numberOfExamplesPerIncrement - Number of examples created with the same number of arguments.
      incrementForNumberOfArguments - Increment by which the number of arguments is increased each time.
      abortFrameworkNotComply - If TRUE, an exception is thrown and the method aborted whenever no framework compliant to the conditions can be generated. If FALSE, skips settings for non compliant frameworks and returns less output.
      abortAnalysisNotComply - If TRUE, an exception is thrown and the method aborted whenever an analysis doesn't comply the conditions. If FALSE, skips non compliant analysis and returns less output.
      Returns:
      Array of analysis results, analyzing each a different randomly generated exemplary argumentation framework.
      Throws:
      NoExampleFoundException - Throws an exception, if no framework compliant to the conditions could be created within the specified number of maximum attempts or if the serilisation graph of the generated framework does not comply the conditions
    • findExampleForDifferentSemantics

      public LinkedHashMap<DungTheory,SerialisationGraph[]> findExampleForDifferentSemantics(Semantics[] semanticsForSerializing, int numberOfExamples, boolean abortFrameworkNotComply, boolean abortAnalysisNotComply) throws NoExampleFoundException
      Generates argumentation frameworks and analyzes their serialisable extensions regarding the specified semantics.
      Parameters:
      semanticsForSerializing - Array of semantics, used to create the different analyses.
      numberOfExamples - Number of exemplary frameworks, which will be generated.
      abortFrameworkNotComply - If TRUE, an exception is thrown and the method aborted whenever no framework compliant to the conditions can be generated. If FALSE, skips settings for non compliant frameworks and returns less output.
      abortAnalysisNotComply - If TRUE, an exception is thrown and the method aborted whenever an analysis doesn't comply the conditions. If FALSE, skips non compliant analysis and returns less output.
      Returns:
      Frameworks mapped to the associated serialisation graphs using different semantics
      Throws:
      NoExampleFoundException - Throws an exception, if no framework compliant to the conditions could be created within the specified number of maximum attempts or if the serilisation graph of the generated framework does not comply the conditions
    • findExampleForDifferentSemantics

      public LinkedHashMap<DungTheory,SerialisationGraph[]> findExampleForDifferentSemantics(Semantics[] semanticsForSerializing, int numberOfArgumentsStart, int maxNumberOfArguments, int numberOfExamplesPerIncrement, int incrementForNumberOfArguments, boolean abortFrameworkNotComply, boolean abortAnalysisNotComply) throws NoExampleFoundException
      Creates exemplary argumentation frameworks and analyzes their serialisable extensions. The method generates frameworks starting with the specified number of arguments, and increasing this number by the specified increment as long as the number stays lower or equal than the specified maximum number of arguments (inclusive boundary). Creates for each framework generated one serialisation graph per specified semantics.
      Parameters:
      semanticsForSerializing - Semantics of the extensions created during the serializing process, which will be analyzed.
      numberOfArgumentsStart - Number of Arguments of the first framework, which will be generated as an example.
      maxNumberOfArguments - Maximum number of arguments of any framework generated by this method.
      numberOfExamplesPerIncrement - Number of examples created with the same number of arguments.
      incrementForNumberOfArguments - Increment by which the number of arguments is increased each time.
      abortFrameworkNotComply - If TRUE, an exception is thrown and the method aborted whenever no framework compliant to the conditions can be generated. If FALSE, skips settings for non compliant frameworks and returns less output.
      abortAnalysisNotComply - If TRUE, an exception is thrown and the method aborted whenever an analysis doesn't comply the conditions. If FALSE, skips non compliant analysis and returns less output.
      Returns:
      Frameworks mapped to the associated serialisation graphs using different semantics
      Throws:
      NoExampleFoundException - Throws an exception, if no framework compliant to the conditions could be created within the specified number of maximum attempts or if the serilisation graph of the generated framework does not comply the conditions