Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for JPMS modules #118

Merged
merged 10 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,28 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

[Full changelog](https://github.com/LearnLib/learnlib/compare/learnlib-0.17.0...HEAD)

### Added

* LearnLib now supports JPMS modules. All artifacts now provide a `module-info` descriptor except of the distribution artifacts (for Maven-less environments) which only provide an `Automatic-Module-Name` due to non-modular dependencies. Note that while this is a Java 9+ feature, LearnLib still supports Java 8 byte code for the remaining class files.

### Changed

* The JPMS support introduces several changes:
* You now require at least a JDK 11 to build LearnLib.
* We use modules to better structure the aggregated JavaDoc. Since there exist breaking changes between Java 8 and Java 9 regarding documentation (see package-list vs. element-list), you can no longer link against the LearnLib documentation on JDK 8 builds.
* Split packages had to be refactored.
* The `de.learnlib.oracle.parallelism` interfaces in the `learnlib-api` artifact have been moved to the `de.learnlib.oracle` package.
* The `ThreadSafe` caches have been moved from the `learnlib-parallelism` artifact to the `learnlib-cache` artifact.
* The `GrowingAlphabet` and `Resumable` tests from the `learnlib-learner-it-support` artifact been moved to the `learnlib-test-support` artifact.
* The `OTUtils` class no longer provides the `displayHTMLInBrowser` methods in order to not depend on `java.desktop`. If you relied on this functionality, use the `writeHTMLToFile` methods instead and call `Desktop.getDesktop().open(file.toURI())` yourself.
* The classes in the `learnlib-learning-examples` artifact have their package renamed to `de.learnlib.testsupport.example`.
* With the removal of the `learnlib-annotation-processor` artifact (see below), the `learnlib-build-config` artifact is now part of the `de.learnlib` group again.
* The `ReuseOracleBuilder` and `ReuseTreeBuilder` classes are now auto-generated and therefore reside in the respective packages of their previously enclosing classes.

### Removed

* The `de.learnlib.tooling:learnlib-annotation-processor` artifact has been dropped. The functionality has been moved to a [standalone project](https://github.com/LearnLib/build-tools).
* The the `de.learnlib:learnlib-rpni-edsm` and `de.learnlib:learnlib-rpni-mdl` artifacts have been dropped. The code has been merged with the `de.learnlib:learnlib-rpni` artifact.
* The `de.learnlib:learnlib-rpni-edsm` and `de.learnlib:learnlib-rpni-mdl` artifacts have been dropped. The code has been merged with the `de.learnlib:learnlib-rpni` artifact.


## [0.17.0] - 2023-11-15
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
import de.learnlib.query.DefaultQuery;
import net.automatalib.alphabet.Alphabet;
import net.automatalib.alphabet.GrowingAlphabet;
import net.automatalib.alphabet.GrowingMapAlphabet;
import net.automatalib.alphabet.SupportsGrowingAlphabet;
import net.automatalib.alphabet.impl.GrowingMapAlphabet;
import net.automatalib.automaton.MutableDeterministic;
import net.automatalib.automaton.UniversalDeterministicAutomaton;
import net.automatalib.word.Word;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
import de.learnlib.algorithm.aaar.generic.AbstractGenericAAARLearner;
import de.learnlib.oracle.MembershipOracle;
import net.automatalib.alphabet.Alphabet;
import net.automatalib.alphabet.Alphabets;
import net.automatalib.alphabet.SupportsGrowingAlphabet;
import net.automatalib.alphabet.impl.Alphabets;

/**
* An "explicit" refinement of the {@link AbstractAAARLearner}. This implementation requires a prior partition of (all)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import de.learnlib.algorithm.aaar.TranslatingDFA;
import de.learnlib.oracle.MembershipOracle;
import net.automatalib.alphabet.SupportsGrowingAlphabet;
import net.automatalib.automaton.fsa.CompactDFA;
import net.automatalib.automaton.fsa.DFA;
import net.automatalib.automaton.fsa.impl.CompactDFA;

/**
* A {@link DFA}-specific refinement of {@link AbstractExplicitAAARLearner}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import de.learnlib.algorithm.aaar.TranslatingMealyMachine;
import de.learnlib.oracle.MembershipOracle;
import net.automatalib.alphabet.SupportsGrowingAlphabet;
import net.automatalib.automaton.transducer.CompactMealy;
import net.automatalib.automaton.transducer.MealyMachine;
import net.automatalib.automaton.transducer.impl.CompactMealy;
import net.automatalib.word.Word;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import de.learnlib.algorithm.aaar.TranslatingMooreMachine;
import de.learnlib.oracle.MembershipOracle;
import net.automatalib.alphabet.SupportsGrowingAlphabet;
import net.automatalib.automaton.transducer.CompactMoore;
import net.automatalib.automaton.transducer.MooreMachine;
import net.automatalib.automaton.transducer.impl.CompactMoore;
import net.automatalib.word.Word;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
import de.learnlib.algorithm.aaar.explicit.AbstractExplicitAAARLearner;
import de.learnlib.oracle.MembershipOracle;
import net.automatalib.alphabet.Alphabet;
import net.automatalib.alphabet.Alphabets;
import net.automatalib.alphabet.SupportsGrowingAlphabet;
import net.automatalib.alphabet.impl.Alphabets;

/**
* A "generic" refinement of the {@link AbstractAAARLearner}. This implementation uses a single
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import de.learnlib.algorithm.aaar.TranslatingDFA;
import de.learnlib.oracle.MembershipOracle;
import net.automatalib.alphabet.SupportsGrowingAlphabet;
import net.automatalib.automaton.fsa.CompactDFA;
import net.automatalib.automaton.fsa.DFA;
import net.automatalib.automaton.fsa.impl.CompactDFA;

/**
* A {@link DFA}-specific refinement of {@link AbstractGenericAAARLearner}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import de.learnlib.algorithm.aaar.TranslatingMealyMachine;
import de.learnlib.oracle.MembershipOracle;
import net.automatalib.alphabet.SupportsGrowingAlphabet;
import net.automatalib.automaton.transducer.CompactMealy;
import net.automatalib.automaton.transducer.MealyMachine;
import net.automatalib.automaton.transducer.impl.CompactMealy;
import net.automatalib.word.Word;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import de.learnlib.algorithm.aaar.TranslatingMooreMachine;
import de.learnlib.oracle.MembershipOracle;
import net.automatalib.alphabet.SupportsGrowingAlphabet;
import net.automatalib.automaton.transducer.CompactMoore;
import net.automatalib.automaton.transducer.MooreMachine;
import net.automatalib.automaton.transducer.impl.CompactMoore;
import net.automatalib.word.Word;

/**
Expand Down
44 changes: 44 additions & 0 deletions algorithms/active/aaar/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/* Copyright (C) 2013-2024 TU Dortmund University
* This file is part of LearnLib, http://www.learnlib.de/.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* This module provides the implementation of the AAAR learning algorithm as described in the paper
* <a href="https://dx.doi.org/10.1007/978-3-642-18275-4_19">Automata Learning with Automated Alphabet Abstraction
* Refinement</a> by Falk Howar, Bernhard Steffen, and Maik Merten.
* <p>
* This module is provided by the following Maven dependency:
* <pre>
* &lt;dependency&gt;
* &lt;groupId&gt;de.learnlib&lt;/groupId&gt;
* &lt;artifactId&gt;learnlib-aaar&lt;/artifactId&gt;
* &lt;version&gt;${version}&lt;/version&gt;
* &lt;/dependency&gt;
* </pre>
*/
open module de.learnlib.algorithm.aaar {

requires com.google.common;
requires de.learnlib.api;
requires net.automatalib.api;
requires net.automatalib.common.util;
requires net.automatalib.core;
requires org.checkerframework.checker.qual;

exports de.learnlib.algorithm.aaar;
exports de.learnlib.algorithm.aaar.abstraction;
exports de.learnlib.algorithm.aaar.explicit;
exports de.learnlib.algorithm.aaar.generic;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@

import com.google.common.collect.Lists;
import de.learnlib.algorithm.LearningAlgorithm;
import de.learnlib.example.LearningExample;
import de.learnlib.oracle.MembershipOracle;
import de.learnlib.oracle.equivalence.SampleSetEQOracle;
import de.learnlib.oracle.membership.SimulatorOracle;
import de.learnlib.testsupport.example.LearningExample;
import de.learnlib.util.Experiment;
import net.automatalib.alphabet.Alphabet;
import net.automatalib.automaton.UniversalDeterministicAutomaton;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

import de.learnlib.algorithm.aaar.AAARTestUtil;
import de.learnlib.algorithm.aaar.AbstractAAARTest;
import de.learnlib.example.dfa.ExamplePaulAndMary;
import de.learnlib.oracle.MembershipOracle;
import de.learnlib.testsupport.example.dfa.ExamplePaulAndMary;
import net.automatalib.alphabet.Alphabet;
import net.automatalib.automaton.fsa.DFA;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

import de.learnlib.algorithm.aaar.AAARTestUtil;
import de.learnlib.algorithm.aaar.AbstractAAARTest;
import de.learnlib.example.mealy.ExampleCoffeeMachine;
import de.learnlib.example.mealy.ExampleCoffeeMachine.Input;
import de.learnlib.oracle.MembershipOracle;
import de.learnlib.testsupport.example.mealy.ExampleCoffeeMachine;
import de.learnlib.testsupport.example.mealy.ExampleCoffeeMachine.Input;
import net.automatalib.alphabet.Alphabet;
import net.automatalib.automaton.transducer.MealyMachine;
import net.automatalib.word.Word;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
import de.learnlib.algorithm.aaar.AAARTestUtil;
import de.learnlib.algorithm.aaar.AbstractAAARTest;
import de.learnlib.algorithm.aaar.ComboConstructor;
import de.learnlib.example.moore.ExampleRandomMoore;
import de.learnlib.oracle.MembershipOracle;
import de.learnlib.testsupport.example.moore.ExampleRandomMoore;
import net.automatalib.alphabet.Alphabet;
import net.automatalib.alphabet.Alphabets;
import net.automatalib.alphabet.impl.Alphabets;
import net.automatalib.automaton.transducer.MooreMachine;
import net.automatalib.common.util.Pair;
import net.automatalib.word.Word;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import de.learnlib.algorithm.aaar.AAARTestUtil;
import de.learnlib.algorithm.aaar.AbstractAAARTest;
import de.learnlib.algorithm.aaar.abstraction.AbstractAbstractionTree;
import de.learnlib.example.dfa.ExamplePaulAndMary;
import de.learnlib.oracle.MembershipOracle;
import de.learnlib.testsupport.example.dfa.ExamplePaulAndMary;
import net.automatalib.alphabet.Alphabet;
import net.automatalib.automaton.fsa.DFA;
import net.automatalib.common.util.IOUtil;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import de.learnlib.algorithm.aaar.AAARTestUtil;
import de.learnlib.algorithm.aaar.AbstractAAARTest;
import de.learnlib.algorithm.aaar.abstraction.AbstractAbstractionTree;
import de.learnlib.example.mealy.ExampleGrid;
import de.learnlib.oracle.MembershipOracle;
import de.learnlib.testsupport.example.mealy.ExampleGrid;
import net.automatalib.alphabet.Alphabet;
import net.automatalib.automaton.transducer.MealyMachine;
import net.automatalib.common.util.IOUtil;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
import de.learnlib.algorithm.aaar.AbstractAAARTest;
import de.learnlib.algorithm.aaar.ComboConstructor;
import de.learnlib.algorithm.aaar.abstraction.AbstractAbstractionTree;
import de.learnlib.example.moore.ExampleRandomMoore;
import de.learnlib.oracle.MembershipOracle;
import de.learnlib.testsupport.example.moore.ExampleRandomMoore;
import net.automatalib.alphabet.Alphabet;
import net.automatalib.alphabet.Alphabets;
import net.automatalib.alphabet.impl.Alphabets;
import net.automatalib.automaton.transducer.MooreMachine;
import net.automatalib.common.util.IOUtil;
import net.automatalib.common.util.Pair;
Expand Down
4 changes: 4 additions & 0 deletions algorithms/active/adt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ limitations under the License.
<artifactId>learnlib-membership-oracles</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>de.learnlib.testsupport</groupId>
<artifactId>learnlib-test-support</artifactId>
</dependency>

<dependency>
<groupId>net.automatalib</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package de.learnlib.algorithm.adt.adt;

import de.learnlib.oracle.SymbolQueryOracle;
import net.automatalib.graph.ads.AbstractRecursiveADSLeafNode;
import net.automatalib.graph.ads.impl.AbstractRecursiveADSLeafNode;
import net.automatalib.word.Word;
import org.checkerframework.checker.nullness.qual.Nullable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package de.learnlib.algorithm.adt.adt;

import de.learnlib.oracle.SymbolQueryOracle;
import net.automatalib.graph.ads.AbstractRecursiveADSSymbolNode;
import net.automatalib.graph.ads.impl.AbstractRecursiveADSSymbolNode;
import net.automatalib.word.Word;
import org.checkerframework.checker.nullness.qual.Nullable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
import de.learnlib.tooling.annotation.builder.GenerateBuilder;
import de.learnlib.util.MQUtil;
import net.automatalib.alphabet.Alphabet;
import net.automatalib.alphabet.Alphabets;
import net.automatalib.alphabet.SupportsGrowingAlphabet;
import net.automatalib.alphabet.impl.Alphabets;
import net.automatalib.automaton.transducer.MealyMachine;
import net.automatalib.common.util.Pair;
import net.automatalib.word.Word;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
import de.learnlib.algorithm.adt.adt.ADTNode;
import de.learnlib.algorithm.adt.util.ADTUtil;
import net.automatalib.alphabet.Alphabet;
import net.automatalib.automaton.transducer.FastMealy;
import net.automatalib.automaton.transducer.FastMealyState;
import net.automatalib.automaton.transducer.impl.FastMealy;
import net.automatalib.automaton.transducer.impl.FastMealyState;
import net.automatalib.common.util.Pair;
import net.automatalib.util.automaton.equivalence.NearLinearEquivalenceTest;
import net.automatalib.word.Word;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

import de.learnlib.algorithm.adt.model.ObservationTree;
import de.learnlib.oracle.SymbolQueryOracle;
import net.automatalib.automaton.transducer.FastMealy;
import net.automatalib.automaton.transducer.FastMealyState;
import net.automatalib.automaton.transducer.impl.FastMealy;
import net.automatalib.automaton.transducer.impl.FastMealyState;

/**
* A utility class that links an observation tree with a symbol query oracle, meaning that all queries to the symbol
Expand Down
55 changes: 55 additions & 0 deletions algorithms/active/adt/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/* Copyright (C) 2013-2024 TU Dortmund University
* This file is part of LearnLib, http://www.learnlib.de/.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* This module provides the implementation of the ADT learning algorithm as described in the Master thesis <a
* href="http://arxiv.org/abs/1902.01139">Active Automata Learning with Adaptive Distinguishing Sequences</a> by Markus
* Frohme.
* <p>
* This module is provided by the following Maven dependency:
* <pre>
* &lt;dependency&gt;
* &lt;groupId&gt;de.learnlib&lt;/groupId&gt;
* &lt;artifactId&gt;learnlib-adt&lt;/artifactId&gt;
* &lt;version&gt;${version}&lt;/version&gt;
* &lt;/dependency&gt;
* </pre>
*/
open module de.learnlib.algorithm.adt {

requires com.google.common;
requires de.learnlib.api;
requires de.learnlib.common.counterexample;
requires de.learnlib.common.util;
requires net.automatalib.api;
requires net.automatalib.common.smartcollection;
requires net.automatalib.common.util;
requires net.automatalib.core;
requires net.automatalib.util;
requires org.checkerframework.checker.qual;
requires org.slf4j;

requires static de.learnlib.tooling.annotation;

exports de.learnlib.algorithm.adt.ads;
exports de.learnlib.algorithm.adt.adt;
exports de.learnlib.algorithm.adt.api;
exports de.learnlib.algorithm.adt.automaton;
exports de.learnlib.algorithm.adt.config;
exports de.learnlib.algorithm.adt.learner;
exports de.learnlib.algorithm.adt.model;
exports de.learnlib.algorithm.adt.util;
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package de.learnlib.algorithm.adt.automaton;

import net.automatalib.alphabet.Alphabet;
import net.automatalib.alphabet.Alphabets;
import net.automatalib.alphabet.impl.Alphabets;
import net.automatalib.automaton.concept.StateIDs;
import org.testng.Assert;
import org.testng.annotations.Test;
Expand Down
Loading