This page gives an overview on the different libraries of the Tweety collection, together with their Maven dependencies. Technical documentation and the JavaDoc API can be found in the Documentation section. If you are not a Maven user you can also download JARs in the Downloads section.Maven dependency for the complete collection:
The Tweety collection is organized into several libraries that are grouped into sections. You can directly jump to a specific section or library with the following overview:
The Commons library contains abstract classes and interfaces for various knowledge representation concepts. Among the most important ones are
Most other Tweety libraries provide specific implementations of the above abstract classes and interfaces for their specific representation formalisms. For example, the library Propositional Logic implements Formula by PropositionalFormula (which is recursively defined using conjunction, disjunction, and negation) and Interpretation by PossibleWorld. In this way, the classical approach to formally define a logical language via syntax and semantics has a one-to-one correspondence with its implementation in Tweety.
Besides the above mentioned abstract classes and interfaces, Tweety Commons provides abstract implementations of several other knowledge representation concepts and several utility classes for working with sets, subsets, vectors, and general rules.Maven dependency for the Commons library:
The Plugin library provides classes for implementing Tweety plugins that can be used by, e.g., the Command Line Interface. This library makes use of the Java Simple Plugin Framework (JSPF). Using these classes one can encapsulate the functionalities of a specific knowledge representation formalism and expose them in the same way to user interfaces. The most important class is the abstract class AbstractTweetyPlugin which is the basis for developing plugins.Maven dependency for the Plugin library:
All Tweety libraries can be accessed programmatically in Java through their API. However, for non-programmers this way of utilizing the libraries is not very convenient. Using the Plugin library the Command Line Interface library provides a general command line interface for many Tweety libraries. Every library can expose its functionality through a Tweety plugin that can be plugged into the command line interface and accessed in a uniform way.Maven dependency for the Command Line Interface library:
Many algorithms for knowledge representation and reasoning are based on mathematical methods such as optimization techniques. The Math library encapsulates those mathematical methods and exposes them through simple interfaces to other libraries for realizing these algorithms. At the core, the Math library contains classes for representing mathematical terms (such as Constant, Variable, Product, Logarithm) and statements (such as Equation). Using these constructs one can represent, e.g., constraint satisfaction problems (ConstraintSatisfactionProblem) and optimization problems (OptimizationProblem). Through the Solver interface the Math library provides bridges to several third-party solvers such as the Apache Commons Simplex-algorithm, the OpenOpt solvers, or lpsolve.Maven dependency for the Math library:
The Graphs library contains a simple graph implementation with utility functions as it can be used, e.g., to represent abstract argumentation frameworks (see Abstract Argumentation library).Maven dependency for the Graphs library:
The Logic libraries (located under the package net.sf.tweety.logics) provide implementations for various knowledge representation formalisms based on classical logics (propositional logic and first-order logic) and non-classical logics such as conditional logic, probabilistic logics, epistemic logics, or description logic. Each library follows a strict approach in defining the formalism by implementing the abstract classes and interfaces Formula, BeliefBase, Interpretation, ... from the Commons library. Each library contains a sub-package syntax which contains the elements to construct formulas of the formalism and a sub-package semantics which contains elements for realizing the semantics of the formalism. Besides these two common sub-packages many libraries also contain parsers for reading formulas from file and reasoner that implement a specific reasoning approach.
The Logic Commons library contains abstract classes and interfaces which further refine the general Formula interface from the Commons library. Among these refinements are several concepts that are shared among a great number of knowledge representation formalism such as Predicate, Variable or Atom.Maven dependency for the Logic Commons library:
The Propositional Logic library provides an implementation of classical propositional logic. Propositional formulas can be constructed using, e.g., classes Conjunction or Disjunction and propositional formulas can be put into a knowledge base of type PlBeliefSet. The Propositional Logic library supports the use of SAT solvers to perform reasoning. More information on this can be found in Integration of SAT solvers.Maven dependency for the Propositional Logic library:
This library contains an implementation of first-order logic as a knowledge representation formalism. Both the Propositional Logic library and the First-Order Logic library are used by many other libraries of knowledge representation formalisms. The First-Order Logic library supports the use of theorem provers to perform reasoning. More information on this can be found in Integration of first-order theorem provers.Maven dependency for the First-Order Logic library:
The Conditional Logic library extends the Propositional Logic library by conditionals, i.e., non-classical rules of the form (B|A) ("A usually implies B"), cf. [Nute:2002]. In the literature, several different semantics and reasoning approaches for conditional logics have been proposed and this library can be used to easily compare their reasoning behavior. Currently, the Conditional Logic library implements interpretations in the form of ranking functions [Spohn:1988] and conditional structures [Kern-Isberner:2001b], and provides reasoner based on z-ranking [Goldszmidt:1996] and c-representations [Kern-Isberner:2001b].Maven dependency for the Conditional Logic library:
Similar to the Conditional Logic library the Relational Conditional Logic extends the First-Order Logic library with relational conditionals (i.e. conditionals that may contain first-order formulas), cf. [Delgrande:1998], [Kern-Isberner:2012]. Currently, this library contains an implementation of the relational c-representation reasoning approach of [Kern-Isberner:2012].Maven dependency for the Relational Conditional Commons library:
This library further extends the Conditional Logic library by extending conditionals to probabilistic conditionals of the form (B|A)[p] ("A usually implies B with probability p"), cf. [Rodder:2000]. Besides a naive implementation of probabilistic reasoning based on the principle of maximum entropy [Paris:1994] this library also contains several classes for analyzing and repairing inconsistent sets of probabilistic conditionals, cf. [Thimm:2011e], [Thimm:2013].Maven dependency for the Probabilistic Conditional Logic library:
By combining both the Relational Conditional Logic and Probabilistic Conditional Logic libraries the Relational Probabilistic Conditional Logic library introduces relational conditionals with probabilities, cf. [Kern-Isberner:2010]. It implements both the averaging and aggregating semantics from [Kern-Isberner:2010] and also allows for lifted inference as proposed in [Thimm:2011e].Maven dependency for the Relational Probabilistic Conditional Logic library:
The Reiter's Default Logic library provides a general implementation of Reiter's Default Logic [Reiter:1980] based on the First-Order Logic library.Maven dependency for the Reiter's Default Logic library:
This library builds on the First-Order Logic library to implement Markov Logic, an extension of first-order logic with weights to allow for probabilistic reasoning, cf. [Richardson:2006]. It provides several propriety sampling-based reasoner and a bridge to the Alchemy reasoner.Maven dependency for the Markov Logic library:
This library extends the Propositional Logic library with modal operators for epistemic logic and its semantics with accessibility relations and Kripke models. Please note that the Epistemic Logic library is currently in an experimental phase.Maven dependency for the Epistemic Logic library:
The Description Logic library provides a general description logic implementation [Baader:2003] based on the First-Order Logic library. Please note that the Description Logic library is currently in an experimental phase.Maven dependency for the Description Logic library:
This library provides the abstract class Translator that provides basic functionalities to implement translators between different knowledge representation formalisms. Currently, the Logic Translators library contains translators between first-order logic and answer set programming, between nested logic programming and answer set programming, and between propositional logic and first-order logic.Maven dependency for the Logic Translators library:
The Logic Programming libraries (located under the package net.sf.tweety.lp) provide implementations of knowledge representation formalisms based on logic programming.
The Answer Set Programming library provides classes for representing extended logic programs [Gelfond:2002]. Answer set programs are logic programs of the form A←B1,...,Bm with first-order literals A, B1,..., Bm where the body literals B1,...,Bm may also have a default negation not. This library provides bridges to several established solvers such as DLV, DLV Complex, and Clingo.Maven dependency for the Answer Set Programming library:
This library extends theAnswer Set Programming library by introducing revision and update approaches. The library contains implementations of the approaches introduced in [Kruempelmann:2012], [Delgrande:2007] and also revision approaches based on argumentation.Maven dependency for the Dynamics in Answer Set Programming library:
This library contains an implementation of nested logic programs which allow for complex first-order formulas to appear in logic programming rules [Lifschitz:1999].Maven dependency for the Nested Logic Programs library:
The argumentation libraries (located under the package net.sf.tweety.arg) are one of the most mature libraries of Tweety and contain a wide variety of implementations of different approaches to computational argumentation.
This library implements abstract argumentation as proposed in [Dung1995]. An abstract argumentation framework is a directed graph (A,Att) where A is interpreted as a set of arguments and an edge (A,A')∈ Att is an attack of A on A'. The library provides implementations of the mostly used semantics and their corresponding reasoner, both in terms of extensions (an extension is a set of arguments that is regarded as accepted by a semantics) and labelings (a labeling is a function with a three-valued truth assignment to each argument). Several utility classes for generating random argumentation frameworks complement this library.Maven dependency for the Abstract Argumentation library:
The ABA library provides an implementation of the approach proposed in [Toni:2014]. An ABA theory instantiates an abstract argumentation framework by adding structure to arguments in the form of assumptions and rules.Maven dependency for the ABA library:
The Abstract Dialectical Frameworks library provides an implementation of the approach proposed in [Brewka:2013]. An abstract dialectical framework is an extension of an abstract argumentation framework that allows specific acceptance conditions for arguments to be formalized. Please note that the Abstract Dialectical Frameworks library is currently in an experimental phase.Maven dependency for the Abstract Dialectical Frameworks library:
The ASPIC+ library provides an implementation of the approach proposed in [Modgil:2014]. An ASPIC+ theory instantiates an abstract argumentation framework by adding structure to arguments in the form of defeasible and strict rules.Maven dependency for the ASPIC+ library:
The Deductive Argumentation library provides an implementation of the approach proposed in [Besnard:2001]. In deductive argumentation, an argument is composed of a set of propositional formulas that derive the claim of the argument. Attack between arguments is derived from classical unsatisfiability.Maven dependency for the Deductive Argumentation library:
This library implements the approach of social abstract argumentation frameworks as proposed in [Leite:2011]. In social abstract argumentation framework extends an abstract argumentation framework by introducing positive and negative votes to arguments and a quantitative semantics to evaluate those.Maven dependency for the Social Abstract Argumentation library:
This library implements the approach of structured argumentation frameworks as proposed in [Thimm:2010]. In structured argumentation frameworks arguments are composed of subarguments and a conclusion.Maven dependency for the Structured Argumentation library:
This library uses simple logic, i.e. a syntactic restriction of propositional logic similar to the Horn fragment, for structured argumentation.Maven dependency for the Simple Logic Argumentation library:
This library provides an implementation of Defeasible Logic Programming (DeLP) [Garcia:2004a]. In DeLP knowledge bases contain strict and defeasible rules and facts, similar to knowledge representation formalisms for logic programming. Defeasible rules can be collected in arguments and compared by generalized specificity [Stolzenburg:2003].Maven dependency for the Defeasible Logic Programming library:
This library provides an implementation of the argumentation approach of [Schweimeier:2003] which is also based on logic programming techniques.Maven dependency for the Logic Programming Argumentation library:
The Probabilistic Argumentation library extends the Abstract Argumentation library with non-classical semantics based on probabilistic assessments [Thimm:2012].Maven dependency for the Probabilistic Argumentation library:
The agent libraries (located under the package net.sf.tweety.agents) provide a framework for analyzing and simulating interactions between agents.
This general library contains an abstract formalization of agents and multi-agent systems. Classes such as Agent, Environment, MultiAgentSystem, and Protocol can be used to set up and simulate a system of agents within an environment. This library has a specific focus on the simulation aspect and provides classes such as MultiAgentSystemGenerator and GameSimulator that allow the automatic generation of test scenarios and their evaluation.Maven dependency for the Agents library:
The library Dialogues extends the Agents library with the capability of simulating dialogues between agents, as they are investigated in the context of argumentation in multi-agent systems [Karunatillake:2009]. It also provides an implementation of agents with an opponent model as proposed in [Rienstra:2013].Maven dependency for the Dialogues library:
The above discussed libraries constitute the core of Tweety by providing implementations of several knowledge representation formalisms. This collection is complemented by some further libraries that relate either to topics that do not strictly belong to the field of knowledge representation (such as the Machine Learning library) or can be applied across several different knowledge representation formalisms (such as the Belief Dynamics library).
The Action and Change library implements several action languages and their dynamics from [Gelfond:1999].Maven dependency for the Action and Change library:
This library provides a general implementation for various approaches to belief (base) revision and update [Hansson:2001]. It provides interfaces and several implementations of many concepts used in belief dynamics such as BaseRevisionOperator, BaseContractionOperator, IncisionFunction, and LeviBaseRevisionOperator. Those classes are defined in such a general way that they can be used not only to implement belief dynamics for propositional logic but also for other knowledge representation formalisms implementing the corresponding Tweety interfaces. This library contains also specific revision approaches such as selective revision [Ferme:1999] and argumentative selective revision [Krumpelmann:2011].Maven dependency for the Belief Dynamics library:
The Machine Learning library provides several abstract concepts that can be used in a machine learning context such as Observation, Classifier, and CrossValidator. It contains also an implementation of support vector machines utilizing LIBSVM.Maven dependency for the Machine Learning library:
This library contains classes for representing preference orders and approaches for aggregating them [Walsh:2007]. It also contains an implementation of the dynamic preference aggregation approach proposed in [Thimm:2013a].Maven dependency for the Preferences library:
This library contains classes for exposing Tweety functionalities through web services.Maven dependency for the Web library: