back
Example code and resources
Most libraries have an examples package that contains various example code snippets that show the functionality of the library. In addition, the resources folder contains examplary instance files that can be parsed by the corresponding parser into the classes of the library.
Below is an up-to-date list of available examples and instance files.
General Libraries
Command Line Interface (org.tweetyproject.cli)
Example code:
no example code available
Resources:
no resources available
Commons (org.tweetyproject.commons)
Example code:
Resources:
no resources available
Comparator Library (org.tweetyproject.comparator)
Example code:
no example code available
Resources:
no resources available
Graph Library (org.tweetyproject.graphs)
Example code:
Resources:
no resources available
Math (org.tweetyproject.math)
Example code:
Resources:
no resources available
Plugin Project (org.tweetyproject.plugin)
Example code:
no example code available
Resources:
no resources available
Logic Libraries
Business Process Modelling (org.tweetyproject.logics.bpm)
Example code:
Resources:
Conditional Logic (org.tweetyproject.logics.cl)
Example code:
Resources:
Commons Logic (org.tweetyproject.logics.commons)
Example code:
no example code available
Resources:
no resources available
Description Logics (org.tweetyproject.logics.dl)
Example code:
Resources:
First-Order-Logic (org.tweetyproject.logics.fol)
Example code:
Resources:
Modal Logic Library (org.tweetyproject.logics.ml)
Example code:
- examples.MlExample.java: Some examples for testing ModalParser and NaiveModalReasoner. Shows how to construct a modal logic knowledge base programmatically and how to query it using the naive reasoner.
- examples.MlExample2.java: More examples for testing ModalParser and ModalReasoner. Shows how to construct a modal logic knowledge base programmatically and how to query it using the SPASS reasoner.
- examples.MlExample.java: Some examples for testing ModalParser and NaiveModalReasoner. Shows how to construct a modal logic knowledge base programmatically and how to query it using the naive reasoner.
- examples.MlExample2.java: More examples for testing ModalParser and ModalReasoner. Shows how to construct a modal logic knowledge base programmatically and how to query it using the SPASS reasoner.
Resources:
Markov Logic Networks Library (org.tweetyproject.logics.mln)
Example code:
Resources:
no resources available
Probabilistic Conditional Logic Library (org.tweetyproject.logics.pcl)
Example code:
Resources:
no resources available
Petri Nets Library (org.tweetyproject.logics.petri)
Example code:
no example code available
Resources:
no resources available
Propositional Logic (org.tweetyproject.logics.pl)
Example code:
Resources:
Quantified Boolean Formulas (org.tweetyproject.logics.qbf)
Example code:
Resources:
Relational Conditional Logic Library (org.tweetyproject.logics.rcl)
Example code:
- examples.RclExample.java: Example code illustrating the use of working with relational conditionals and using c reasoning.
- examples.RclExample.java: Example code illustrating the use of working with relational conditionals and using c reasoning.
Resources:
no resources available
Reiter's Default Logic Library (org.tweetyproject.logics.rdl)
Example code:
Resources:
Relational Probabilistic Conditional Logic Library (org.tweetyproject.logics.rpcl)
Example code:
Resources:
Translators Library (org.tweetyproject.logics.translators)
Example code:
no example code available
Resources:
Logic Programming Libraries
ASP Library (org.tweetyproject.lp.asp)
Example code:
Resources:
ASP Belief Dynamics (org.tweetyproject.lp.asp.beliefdynamics)
Example code:
no example code available
Resources:
no resources available
Nested Logic Programs (org.tweetyproject.lp.nlp)
Example code:
no example code available
Resources:
no resources available
Argumentation Libraries
ABA Library (org.tweetyproject.arg.aba)
Example code:
- examples.AbaExample.java: Shows some simple code for working with ABA, including how to parse an ABA file and how to ask queries.
- examples.AbaExample.java: Shows some simple code for working with ABA, including how to parse an ABA file and how to ask queries.
Resources:
ADF Library (org.tweetyproject.arg.adf)
Example code:
Resources:
ASPIC Library (org.tweetyproject.arg.aspic)
Example code:
- examples.AspicExample.java: ASPIC example code that shows how to construct an ASPIC theory programmatically.
- examples.AspicExample2.java: ASPIC example code that shows how to parse an ASPIC file and ask queries.
- examples.AspicExampleFol.java: Example code for using ASPIC with first-order-logic formulas.
- examples.AspicGeneratorExample.java: Exemplary code illustrating the use of the ASPIC theory generator. Furthermore, this code show a small performance comparison between the naive ASPIC reasoner, the module based reasoner, directional reasoner, and the random reasoner.
- examples.AspicGeneratorExample2.java: This code shows the use of the ASPIC theory generator. It generates some random ASPIC theories, constructs the corresponding AF graphs, and writes them to a specific folder.
- examples.AspicGeneratorExample3.java: This code shows the use of the ASPIC theory generator. It generates some random ASPIC theories with some parameter combinations and writes them to disk.
- examples.DirectionalReasonerTest.java: Test runtime of module-based vs. directional reasoners. Also checks if they give the same answers
- examples.AspicExample.java: ASPIC example code that shows how to construct an ASPIC theory programmatically.
- examples.AspicExample2.java: ASPIC example code that shows how to parse an ASPIC file and ask queries.
- examples.AspicExampleFol.java: Example code for using ASPIC with first-order-logic formulas.
- examples.AspicGeneratorExample.java: Exemplary code illustrating the use of the ASPIC theory generator. Furthermore, this code show a small performance comparison between the naive ASPIC reasoner, the module based reasoner, directional reasoner, and the random reasoner.
- examples.AspicGeneratorExample2.java: This code shows the use of the ASPIC theory generator. It generates some random ASPIC theories, constructs the corresponding AF graphs, and writes them to a specific folder.
- examples.AspicGeneratorExample3.java: This code shows the use of the ASPIC theory generator. It generates some random ASPIC theories with some parameter combinations and writes them to disk.
- examples.DirectionalReasonerTest.java: Test runtime of module-based vs. directional reasoners. Also checks if they give the same answers
Resources:
Bipolar Argumentation Library (org.tweetyproject.arg.bipolar)
Example code:
Resources:
no resources available
Deductive Argumentation Library (org.tweetyproject.arg.deductive)
Example code:
Resources:
no resources available
Defeasible Logic Programming Library (org.tweetyproject.arg.delp)
Example code:
Resources:
Dung Argumentation Library (org.tweetyproject.arg.dung)
Example code:
Resources:
Logic Programming Argumentation Library (org.tweetyproject.arg.lp)
Example code:
no example code available
Resources:
no resources available
Probabilistic Argumentation Library (org.tweetyproject.arg.prob)
Example code:
Resources:
no resources available
Ranking Semantics for Argumentation Library (org.tweetyproject.arg.rankings)
Example code:
- examples.CounterTransitivityReasonerExample.java
- examples.IteratedGradedDefenseReasonerExample.java: Example code for using the iterated graded semantics from [Grossi, Modgil. On the Graded Acceptability of Arguments. IJCAI 2015].
- examples.ProbabilisticRankingReasonerExample.java: Example code for using the probabilistic ranking reasoner based on the ideas from [Thimm, Cerutti, Rienstra. Probabilistic Graded Semantics. COMMA 2018].
- examples.RankingPostulatesExample.java: Example code for evaluating ranking semantics in regard to postulates. Each postulate represents a single property that characterizes how the semantics ranks arguments.
- examples.RankingSemanticsExample.java: Example code for the following ranking semantics:
- Categorizer [Besnard, Hunter. A logic-based theory of deductive arguments. 2001]
- Burden-Based [Amgoud, Ben-Naim. Ranking-based semantics for argumentation frameworks. 2013]
- Discussion-Based [Amgoud, Ben-Naim. Ranking-based semantics for argumentation frameworks. 2013]
- Tuples [Cayrol, Lagasquie-Schiex. Graduality in argumentation. 2005]
- Strategy-Based [Matt, Toni. A game-theoretic measure of argument strength for abstract argumentation. JELIA 2008]
- Social Abstract Argumentation with simple product semantics [Bonzon, Delobelle, Konieczny, Maudet. A Comparative Study of Ranking-Based Semantics for Abstract Argumentation. AAAI 2016]
- Iterated Graded Defense [Grossi, Modgil. On the Graded Acceptability of Arguments. IJCAI 2015]
- Probabilistic Graded Semantics [Thimm, Cerutti, Rienstra. Probabilistic Graded Semantics. COMMA 2018].
- examples.RankingSemanticsExample2.java: Example code for even more ranking semantics:
- Counting Semantics [Pu, Zhang, G.Luo, J.Luo. Attacker and Defender Counting Approach for Abstract Argumentation. CoRR 2015].
- The three variations of the Propagation Semantics [Delobelle. Ranking-based Semantics for Abstract Argumentation. Thesis, 2017])
- examples.SerialisableRankingReasonerExample.java
- examples.CounterTransitivityReasonerExample.java
- examples.IteratedGradedDefenseReasonerExample.java: Example code for using the iterated graded semantics from [Grossi, Modgil. On the Graded Acceptability of Arguments. IJCAI 2015].
- examples.ProbabilisticRankingReasonerExample.java: Example code for using the probabilistic ranking reasoner based on the ideas from [Thimm, Cerutti, Rienstra. Probabilistic Graded Semantics. COMMA 2018].
- examples.RankingPostulatesExample.java: Example code for evaluating ranking semantics in regard to postulates. Each postulate represents a single property that characterizes how the semantics ranks arguments.
- examples.RankingSemanticsExample.java: Example code for the following ranking semantics:
- Categorizer [Besnard, Hunter. A logic-based theory of deductive arguments. 2001]
- Burden-Based [Amgoud, Ben-Naim. Ranking-based semantics for argumentation frameworks. 2013]
- Discussion-Based [Amgoud, Ben-Naim. Ranking-based semantics for argumentation frameworks. 2013]
- Tuples [Cayrol, Lagasquie-Schiex. Graduality in argumentation. 2005]
- Strategy-Based [Matt, Toni. A game-theoretic measure of argument strength for abstract argumentation. JELIA 2008]
- Social Abstract Argumentation with simple product semantics [Bonzon, Delobelle, Konieczny, Maudet. A Comparative Study of Ranking-Based Semantics for Abstract Argumentation. AAAI 2016]
- Iterated Graded Defense [Grossi, Modgil. On the Graded Acceptability of Arguments. IJCAI 2015]
- Probabilistic Graded Semantics [Thimm, Cerutti, Rienstra. Probabilistic Graded Semantics. COMMA 2018].
- examples.RankingSemanticsExample2.java: Example code for even more ranking semantics:
- Counting Semantics [Pu, Zhang, G.Luo, J.Luo. Attacker and Defender Counting Approach for Abstract Argumentation. CoRR 2015].
- The three variations of the Propagation Semantics [Delobelle. Ranking-based Semantics for Abstract Argumentation. Thesis, 2017])
- examples.SerialisableRankingReasonerExample.java
Resources:
Structured Argumentation Frameworks Library (org.tweetyproject.arg.saf)
Example code:
no example code available
Resources:
no resources available
SetAFs (org.tweetyproject.arg.setaf)
Example code:
Resources:
Social Abstract Argumentation Library (org.tweetyproject.arg.social)
Example code:
Resources:
no resources available
Agent Libraries
Agents Library (org.tweetyproject.agents)
Example code:
no example code available
Resources:
no resources available
Dialogue Systems Library (org.tweetyproject.agents.dialogues)
Example code:
- examples.GroundedTest.java: Shows how a simulation of a multi-agent system can be set up. It defines a dialogue game between different agents with varying complexity of their opponent models.
- examples.GroundedTest2.java: Shows how a simulation of a multi-agent system can be set up. It defines a dialogue game between different agents with varying complexity of their opponent models.
- examples.LotteryDialogueTest.java: Shows how a simulation of a multi-agent system can be set up. It defines a dialogue game between different agents, in particular one based on an action selection strategy using lotteries.
- examples.LotteryDialogueTest2.java: Main class for empirical evaluation in [Hunter, Thimm. 2015, to appear]. Shows how a simulation of a multi-agent system can be set up. It defines a dialogue game between different agents, in particular one based on an action selection strategy using lotteries.
- examples.GroundedTest.java: Shows how a simulation of a multi-agent system can be set up. It defines a dialogue game between different agents with varying complexity of their opponent models.
- examples.GroundedTest2.java: Shows how a simulation of a multi-agent system can be set up. It defines a dialogue game between different agents with varying complexity of their opponent models.
- examples.LotteryDialogueTest.java: Shows how a simulation of a multi-agent system can be set up. It defines a dialogue game between different agents, in particular one based on an action selection strategy using lotteries.
- examples.LotteryDialogueTest2.java: Main class for empirical evaluation in [Hunter, Thimm. 2015, to appear]. Shows how a simulation of a multi-agent system can be set up. It defines a dialogue game between different agents, in particular one based on an action selection strategy using lotteries.
Resources:
no resources available
Other Libraries
Action and Change (org.tweetyproject.action)
Example code:
no example code available
Resources:
Belief Dynamics Library (org.tweetyproject.beliefdynamics)
Example code:
Resources:
no resources available
Machine Learning Library (org.tweetyproject.machinelearning)
Example code:
Resources:
no resources available
Preferences Library (org.tweetyproject.preferences)
Example code:
no example code available
Resources:
SAT Library (org.tweetyproject.sat)
Example code:
no example code available
Resources:
Web Services (org.tweetyproject.web)
Example code:
no example code available
Resources:
no resources available
back