MCPcopy Index your code
hub / github.com/LearnLib/learnlib

github.com/LearnLib/learnlib @learnlib-0.18.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release learnlib-0.18.0 ↗ · + Follow
5,168 symbols 15,937 edges 892 files 937 documented · 18% updated 3d agolearnlib-0.18.0 · 2025-02-06★ 2296 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

LearnLib

CI Coverage Maven Central

LearnLib is a free, open-source (Apache License, v2.0) Java library for automata learning algorithms.

About

LearnLib is mainly developed at TU Dortmund University, Germany. Its original purpose is to provide a framework for research on automata learning algorithms as well as for their application in practice.

The public version is a re-implemented version of the former closed-source version of LearnLib. While certain features have been stripped for improved modularity, development has since then extended the features offered. Currently, the following learning algorithms with respective target models are supported:

Algorithm (active) Target models Algorithm (passive) Models
AAAR DFA Mealy Moore OSTIA SST
ADT Mealy RPNI (incl. variants) DFA Mealy Moore
DHC Mealy
Kearns & Vazirani DFA Mealy
Lambda DFA Mealy
L# Mealy
L* (incl. variants) DFA Mealy Moore
NL* NFA
Observation Pack DFA Mealy Moore VPA
Procedural SPA SBA SPMM
TTT DFA Mealy Moore VPA

Additionally, LearnLib offers a variety of tools to ease the practical application of automata learning on real-world systems. This includes drivers and mappers for interfacing software systems with the LearnLib API as well as caches and parallelization for improving the overall performance of the learning setup. Also, more nuanced setups such as Black-Box-Checking (via LTSmin) or inferring partial machines are possible.

While we strive to deliver code at a high quality, please note that there exist parts of the library that still need thorough testing. Contributions -- whether it is in the form of new features, better documentation or tests -- are welcome.

Build Instructions

For simply using LearnLib you may use the Maven artifacts which are available in the Maven Central repository. It is also possible to download a bundled distribution artifact if you want to use LearnLib without Maven support. Note that LearnLib requires Java 11 (or newer) to build but still supports Java 8 at runtime.

Building development versions

If you intend to use development versions of LearnLib, you can either use the deployed SNAPSHOT artifacts from the continuous integration server (see Using Development Versions), or build them yourself. Simply clone the development branch of the repository

git clone -b develop --single-branch https://github.com/LearnLib/learnlib.git

and run a single mvn clean install. This will build all the required maven artifacts and will install them in your local Maven repository so that you can reference them in other projects.

If you plan to use a development version of LearnLib in an environment where no Maven support is available, simply run mvn clean package -Pbundles. The respective JARs are then available under distribution/target/bundles.

Note: Development versions of LearnLib usually depend on development versions of AutomataLib. For building development versions of AutomataLib, see the corresponding documentation on the project's README.

Developing LearnLib

For developing the code base of LearnLib it is suggested to use one of the major Java IDEs which come with out-of-the-box Maven support.

  • For IntelliJ IDEA:
  • Select File -> New -> Project from existing sources and select the folder containing the development checkout.
  • Choose "Import Project from external model", select "Maven" and click Create.
  • In order to have both development versions of AutomataLib and LearnLib available at once, continue to import AutomataLib as documented in the project's README, but choose File -> New -> Module from existing sources as the first step.

  • For Eclipse:

  • Note: LearnLib uses annotation processing on several occasions throughout the build process. This is usually handled correctly by Maven. However, for Eclipse, you may need to manually enable annotation processing under Preferences -> Maven -> Annotation Processing.
  • Select File -> Import... and select "Existing Maven Projects".
  • Select the folder containing the development checkout as the root directory and click Finish.
  • In order to have both development versions of AutomataLib and LearnLib available at once, continue to import AutomataLib as documented in the project's README.

Documentation

Questions?

If you have any questions regarding the usage of LearnLib or if you want to discuss new and exciting ideas for future contributions, feel free to use the Discussions page to get in touch with the LearnLib community.

Maintainers

Extension points exported contracts — how you extend this code

LearnerVariantList (Interface)
A write-only list to store multiple variants of a learning algorithm. Usually, there should be one integration test [7 …
test-support/learner-it-support/src/main/java/de/learnlib/testsupport/it/learner/LearnerVariantList.java
LearningCache (Interface)
Interface for a cache used in automata learning. The idea of a cache is to save (potentially expensive) queries to t [14 …
filters/cache/src/main/java/de/learnlib/filter/cache/LearningCache.java
AccessSequenceProvider (Interface)
Common interface for objects that have an access sequence associated with them (e.g., states and transitions of a hypoth [14 …
api/src/main/java/de/learnlib/AccessSequenceProvider.java
ExplicitInitialAbstraction (Interface)
This interface denotes an Abstraction that additionally provides an initial classification of abstract input sym [6 implementers]
algorithms/active/aaar/src/main/java/de/learnlib/algorithm/aaar/ExplicitInitialAbstraction.java
LearningExample (Interface)
(no doc) [6 implementers]
test-support/learning-examples/src/main/java/de/learnlib/testsupport/example/LearningExample.java
ReuseCapableOracle (Interface)
Required interface for the ReuseOracle. An implementation needs to provide the ability to answer queries with re [4 implementers]
filters/reuse/src/main/java/de/learnlib/filter/reuse/ReuseCapableOracle.java
GlobalSuffixFinder (Interface)
Interface for a global suffix finder. A global suffix finder takes a counterexample (plus other supplemental information [1 …
commons/counterexamples/src/main/java/de/learnlib/counterexample/GlobalSuffixFinder.java
LearnLibSettingsSource (Interface)
(no doc) [3 implementers]
commons/settings/src/main/java/de/learnlib/setting/LearnLibSettingsSource.java

Core symbols most depended-on inside this repo

Shape

Method 4,050
Class 929
Interface 171
Enum 15
Function 3

Languages

Java100%
Python1%

Modules by API surface

algorithms/active/ttt/src/main/java/de/learnlib/algorithm/ttt/base/AbstractTTTLearner.java61 symbols
filters/cache/src/test/java/de/learnlib/filter/cache/CacheConfig.java35 symbols
algorithms/active/ttt/src/main/java/de/learnlib/algorithm/ttt/base/AbstractTTTHypothesis.java30 symbols
algorithms/active/kearns-vazirani/src/main/java/de/learnlib/algorithm/kv/mealy/KearnsVaziraniMealy.java30 symbols
algorithms/active/adt/src/main/java/de/learnlib/algorithm/adt/learner/ADTLearner.java30 symbols
oracles/parallelism/src/test/java/de/learnlib/oracle/parallelism/AbstractStaticParallelOmegaOracleTest.java29 symbols
commons/datastructures/src/main/java/de/learnlib/datastructure/observationtable/GenericObservationTable.java29 symbols
algorithms/active/kearns-vazirani/src/main/java/de/learnlib/algorithm/kv/dfa/KearnsVaziraniDFA.java29 symbols
test-support/learning-examples/src/main/java/de/learnlib/testsupport/example/DefaultLearningExample.java28 symbols
drivers/mapper/src/test/java/de/learnlib/mapper/SULMapperCompositionTest.java28 symbols
oracles/parallelism/src/test/java/de/learnlib/oracle/parallelism/AbstractStaticParallelOracleTest.java27 symbols
algorithms/active/observation-pack/src/main/java/de/learnlib/algorithm/observationpack/hypothesis/OPLearnerHypothesis.java27 symbols

For agents

$ claude mcp add learnlib \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page