Skip to content

Commit

Permalink
Switch to in-house annotation processing (#63)
Browse files Browse the repository at this point in the history
* switch to in-house annotation processor

* rename build-tools to build-config to prevent confusion with new tooling project

* fix naming

* fix semantics of FSABuilder

* add ci compatibility

* add necessary jacoco exclusions

* adjust to latest changes

* adjust to latest changes

* cleanup visibility

* cleanups

* cleanups

* switch to stable release
  • Loading branch information
mtf90 authored Jan 4, 2024
1 parent 8cb3837 commit 34d54cc
Show file tree
Hide file tree
Showing 29 changed files with 354 additions and 179 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

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

### Changed

* The `net:automatalib.tooling:automata-build-tools` module has been renamed to `net.automatalib:automata-build-config`.

## [0.11.0](https://github.com/LearnLib/automatalib/releases/tag/automatalib-0.11.0) - 2023-11-06

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@
import dk.brics.automaton.Transition;
import net.automatalib.alphabet.Alphabet;
import net.automatalib.alphabet.Alphabets;
import net.automatalib.automaton.fsa.CompactDFA;
import net.automatalib.automaton.fsa.DFA;
import net.automatalib.util.automaton.Automata;
import net.automatalib.util.automaton.builder.DFABuilder;
import net.automatalib.util.automaton.builder.AutomatonBuilders;
import net.automatalib.word.Word;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
Expand Down Expand Up @@ -106,11 +105,8 @@ public void testStructuralEquality() {
@Test
public void testEquivalence() {
final Alphabet<Character> alphabet = Alphabets.characters('a', 'c');
final DFA<?, Character> target = new DFABuilder<>(new CompactDFA<>(alphabet)).withInitial("s0")
.from("s0")
.on('a', 'b', 'c')
.loop()
.create();
final DFA<?, Character> target =
AutomatonBuilders.newDFA(alphabet).withInitial("s0").from("s0").on('a', 'b', 'c').loop().create();

final Automaton automaton1 = new RegExp("[a-b]{2}").toAutomaton();
final Automaton automaton2 = new RegExp("[a-b]{2}").toAutomaton();
Expand Down
File renamed without changes.
File renamed without changes.
7 changes: 3 additions & 4 deletions build-tools/pom.xml → build-config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ limitations under the License.
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>net.automatalib.tooling</groupId>
<artifactId>automata-build-tools</artifactId>
<artifactId>automata-build-config</artifactId>

<name>AutomataLib :: Build Tools</name>
<description>Tools and resources required for building AutomataLib</description>
<name>AutomataLib :: Build Config</name>
<description>Configs and resources required for building AutomataLib</description>
</project>
17 changes: 11 additions & 6 deletions build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ limitations under the License.
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<configuration>
<!-- Since jacoco's agent instrumentation is a separate step from its report generation, we need
to explicitly exclude generated classes here and cannot rely on things such as a @Generated
annotation. Otherwise, tools such as the coveralls-plugin (which scans the agent's output)
fail on "unknown" classes.
-->
<excludes>
<!-- generated builders for automata types -->
<exclude>net/automatalib/util/automaton/builder/AutomatonBuilder.class</exclude>
Expand Down Expand Up @@ -113,8 +118,8 @@ limitations under the License.
</configuration>
<dependencies>
<dependency>
<groupId>net.automatalib.tooling</groupId>
<artifactId>automata-build-tools</artifactId>
<groupId>net.automatalib</groupId>
<artifactId>automata-build-config</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
Expand All @@ -129,8 +134,8 @@ limitations under the License.
</configuration>
<dependencies>
<dependency>
<groupId>net.automatalib.tooling</groupId>
<artifactId>automata-build-tools</artifactId>
<groupId>net.automatalib</groupId>
<artifactId>automata-build-config</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
Expand All @@ -152,8 +157,8 @@ limitations under the License.
<version>${checkstyle.version}</version>
</dependency>
<dependency>
<groupId>net.automatalib.tooling</groupId>
<artifactId>automata-build-tools</artifactId>
<groupId>net.automatalib</groupId>
<artifactId>automata-build-config</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
Expand Down
17 changes: 3 additions & 14 deletions distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -393,14 +393,9 @@ limitations under the License.
</dependencySourceIncludes>
<additionalDependencies>
<additionalDependency>
<groupId>com.github.misberner.buildergen</groupId>
<artifactId>buildergen</artifactId>
<version>${buildergen.version}</version>
</additionalDependency>
<additionalDependency>
<groupId>com.github.misberner.duzzt</groupId>
<artifactId>duzzt-annotations</artifactId>
<version>${duzzt.version}</version>
<groupId>de.learnlib.tooling</groupId>
<artifactId>annotations</artifactId>
<version>${build-tools.version}</version>
</additionalDependency>
<additionalDependency>
<groupId>dk.brics</groupId>
Expand All @@ -412,12 +407,6 @@ limitations under the License.
<artifactId>metainf-services</artifactId>
<version>${metainf-services.version}</version>
</additionalDependency>
<!-- Java 11 compat -->
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>${javax-annotations.version}</version>
</dependency>
</additionalDependencies>
</configuration>
<executions>
Expand Down
4 changes: 2 additions & 2 deletions modelchecking/ltsmin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ limitations under the License.

<!-- build -->
<dependency>
<groupId>com.github.misberner.buildergen</groupId>
<artifactId>buildergen</artifactId>
<groupId>de.learnlib.tooling</groupId>
<artifactId>annotations</artifactId>
</dependency>
<dependency>
<groupId>org.checkerframework</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import java.util.Collection;
import java.util.function.Function;

import com.github.misberner.buildergen.annotations.GenerateBuilder;
import de.learnlib.tooling.annotation.builder.GenerateBuilder;
import net.automatalib.modelchecker.ltsmin.LTSminAlternating;
import net.automatalib.modelchecker.ltsmin.LTSminLTLParser;
import net.automatalib.modelchecking.Lasso.MealyLasso;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import java.util.Collection;
import java.util.function.Function;

import com.github.misberner.buildergen.annotations.GenerateBuilder;
import de.learnlib.tooling.annotation.builder.GenerateBuilder;
import net.automatalib.automaton.fsa.CompactDFA;
import net.automatalib.automaton.fsa.DFA;
import net.automatalib.exception.ModelCheckingException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import java.util.Collection;
import java.util.function.Function;

import com.github.misberner.buildergen.annotations.GenerateBuilder;
import de.learnlib.tooling.annotation.builder.GenerateBuilder;
import net.automatalib.modelchecker.ltsmin.LTSminIO;
import net.automatalib.modelchecking.Lasso.MealyLasso;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import java.util.Collection;
import java.util.function.Function;

import com.github.misberner.buildergen.annotations.GenerateBuilder;
import de.learnlib.tooling.annotation.builder.GenerateBuilder;
import net.automatalib.automaton.transducer.MealyMachine;
import net.automatalib.modelchecker.ltsmin.LTSminAlternating;
import net.automatalib.modelchecker.ltsmin.LTSminLTLParser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import java.util.Collection;
import java.util.function.Function;

import com.github.misberner.buildergen.annotations.GenerateBuilder;
import de.learnlib.tooling.annotation.builder.GenerateBuilder;
import net.automatalib.automaton.fsa.CompactDFA;
import net.automatalib.automaton.fsa.DFA;
import net.automatalib.exception.ModelCheckingException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import java.util.Collection;
import java.util.function.Function;

import com.github.misberner.buildergen.annotations.GenerateBuilder;
import de.learnlib.tooling.annotation.builder.GenerateBuilder;
import net.automatalib.automaton.transducer.MealyMachine;
import net.automatalib.modelchecker.ltsmin.LTSminIO;

Expand Down
54 changes: 25 additions & 29 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ limitations under the License.
<module>adapters</module>
<module>api</module>
<module>archetypes</module>
<module>build-config</module>
<module>build-parent</module>
<module>build-tools</module>
<module>commons</module>
<module>core</module>
<module>distribution</module>
Expand Down Expand Up @@ -218,16 +218,14 @@ limitations under the License.
<!-- dependency versions -->
<addlib.version>3.0.1</addlib.version>
<assertj.version>3.17.1</assertj.version>
<buildergen.version>0.1</buildergen.version>
<brics-automaton.version>1.12-4</brics-automaton.version>
<build-tools.version>0.1</build-tools.version>
<cacio.version>1.11.1</cacio.version>
<checkerframework.version>3.40.0</checkerframework.version>
<checkstyle.version>9.3</checkstyle.version>
<duzzt.version>0.1.0</duzzt.version>
<extra-enforcer-rules.version>1.7.0</extra-enforcer-rules.version>
<guava.version>32.1.3-jre</guava.version>
<graphviz-awt-shapes.version>0.0.1</graphviz-awt-shapes.version>
<javax-annotations.version>1.3.2</javax-annotations.version>
<jaxb-api.version>2.3.1</jaxb-api.version>
<jung.version>2.1.1</jung.version>
<logback.version>1.3.11</logback.version>
Expand Down Expand Up @@ -292,19 +290,19 @@ limitations under the License.
<version>${project.version}</version>
</dependency>

<!-- build-parent -->
<!-- build-config -->
<dependency>
<groupId>net.automatalib</groupId>
<artifactId>automata-build-parent</artifactId>
<artifactId>automata-build-config</artifactId>
<version>${project.version}</version>
<type>pom</type>
</dependency>

<!-- build-tools -->
<!-- build-parent -->
<dependency>
<groupId>net.automatalib.tooling</groupId>
<artifactId>automata-build-tools</artifactId>
<groupId>net.automatalib</groupId>
<artifactId>automata-build-parent</artifactId>
<version>${project.version}</version>
<type>pom</type>
</dependency>

<!-- commons -->
Expand Down Expand Up @@ -470,13 +468,6 @@ limitations under the License.
<version>${checkerframework.version}</version>
</dependency>

<!-- Java 11 compat -->
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>${javax-annotations.version}</version>
</dependency>

<!-- JUNG dependencies -->
<dependency>
<groupId>net.sf.jung</groupId>
Expand Down Expand Up @@ -506,18 +497,9 @@ limitations under the License.
</dependency>

<dependency>
<groupId>com.github.misberner.buildergen</groupId>
<artifactId>buildergen</artifactId>
<version>${buildergen.version}</version>
<!-- Compile-time only -->
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.github.misberner.duzzt</groupId>
<artifactId>duzzt-processor</artifactId>
<version>${duzzt.version}</version>
<!-- Compile-time only -->
<groupId>de.learnlib.tooling</groupId>
<artifactId>annotations</artifactId>
<version>${build-tools.version}</version>
<scope>provided</scope>
</dependency>

Expand Down Expand Up @@ -790,6 +772,20 @@ limitations under the License.
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>de.learnlib.tooling</groupId>
<artifactId>processors</artifactId>
<version>${build-tools.version}</version>
</path>
<path>
<groupId>org.kohsuke.metainf-services</groupId>
<artifactId>metainf-services</artifactId>
<version>${metainf-services.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down
37 changes: 2 additions & 35 deletions util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,11 @@ limitations under the License.
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<!-- Java 11 compat -->
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<scope>provided</scope>
<optional>true</optional>
</dependency>

<!-- build -->
<dependency>
<groupId>com.github.misberner.duzzt</groupId>
<artifactId>duzzt-processor</artifactId>
<groupId>de.learnlib.tooling</groupId>
<artifactId>annotations</artifactId>
</dependency>
<dependency>
<groupId>org.checkerframework</groupId>
Expand All @@ -92,30 +85,4 @@ limitations under the License.
<artifactId>testng</artifactId>
</dependency>
</dependencies>

<profiles>
<profile>
<id>fix-ST4</id>
<activation>
<jdk>[16,)</jdk>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
<configuration>
<fork>true</fork>
<compilerArgs>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>
</project>
Loading

0 comments on commit 34d54cc

Please sign in to comment.