• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

LearnLib / learnlib / 31522550532

11 Aug 2026 06:24PM UTC coverage: 95.489% (+0.2%) from 95.334%
31522550532

push

github

web-flow
LearnLib CLI (#166)

* initial work on CLI application

* update build profiles

* github: add worflow for attaching cli artifacts

* cli: include OS classifiers in artifact name

* do not include cli module in releases for now

* update docs

* tidy:pom

* add support for SAF serialization

* cli: add ADT and LSHARP algorithm

* cli oracles still need some rework regarding error handling

* cleanup CLI oracles

* experiment: allow for logging intermediate hypotheses

* jacoco: also depend on cli module before aggregating reports

* cli: improve documentation

* fix code-analysis

* cli: add support for parallel oracles

* cli: add unit- and integration-tests

* add support for snapshotting

* use LocalDateTime

* simplify --eqo-* param names

* Revert "simplify --eqo-* param names"

This reverts commit d209e962d.

* add MalerPnueli + RivestSchapire learner and adjust learner names

* include license information in jlink artifact

* cleanup checkerframework config

* add rudimentary class validation during deserialization + cleanups

* add changelog

* add missing --add-opens + test

* cleanup

* wording

* handle python availability more gracefully

* conditionally set --add-opens option

* cli: invoke script via python interpreter

as on Windows the scripts alone are not detected as executable applications

* sett full (and platform-specific) path in jlink IT

* wording

* coveralls: s/Example/Experiment/

685 of 703 new or added lines in 31 files covered. (97.44%)

2 existing lines in 1 file now uncovered.

15536 of 16270 relevant lines covered (95.49%)

1.72 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

73.33
/cli/src/main/java/de/learnlib/cli/Application.java
1
/* Copyright (C) 2013-2026 TU Dortmund University
2
 * This file is part of LearnLib <https://learnlib.de>.
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *     http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
package de.learnlib.cli;
17

18
import ch.qos.logback.classic.Level;
19
import ch.qos.logback.classic.Logger;
20
import de.learnlib.cli.option.Options;
21
import de.learnlib.cli.util.VersionProvider;
22
import org.slf4j.LoggerFactory;
23
import picocli.CommandLine;
24
import picocli.CommandLine.Command;
25
import picocli.CommandLine.Mixin;
26

27
@Command(name = "learnlib",
28
         mixinStandardHelpOptions = true,
29
         versionProvider = VersionProvider.class,
30
         resourceBundle = Application.PROPERTIES,
31
         showDefaultValues = true,
32
         showAtFileInUsageHelp = true,
33
         descriptionHeading = "%nDescription:%n%n",
34
         parameterListHeading = "%nParameters:%n",
35
         optionListHeading = "%nOptions:%n",
36
         description = "Runs an active automata learning process by invoking the provided SUL(s) to answer membership queries. For learning acceptor-based formalisms, the tool will use the exitcode of the binary to determine acceptance where an exitcode of 0 equals 'accept' and an exitcode unequal to 0 equals 'reject'. For learning transduction-based formalisms, the tool expects the SUL to emit an output that is transformed into individual symbols using the provided 'delimiter'. For additional information on the involved components of LearnLib, you may use the documentation available at https://learnlib.de/learnlib/maven-site/.")
37
public class Application implements Runnable {
1✔
38

39
    public static final String PROPERTIES = "application";
40

41
    @Mixin
42
    private Options options;
43

44
    public static void main(String[] args) {
NEW
45
        CommandLine commandLine = new CommandLine(new Application());
×
NEW
46
        commandLine.setCaseInsensitiveEnumValuesAllowed(true);
×
NEW
47
        System.exit(commandLine.execute(args));
×
NEW
48
    }
×
49

50
    @Override
51
    public void run() {
52
        setLogLevel(options);
1✔
53
        options.type.runner(options).run(options);
1✔
54
    }
1✔
55

56
    private void setLogLevel(Options options) {
57
        if (options.verbosity != null) {
1✔
58
            final Logger root = (Logger) LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);
1✔
59

60
            Level level;
61
            if (options.verbosity.length == 1) {
1✔
62
                level = Level.DEBUG;
1✔
63
            } else {
64
                level = Level.TRACE;
1✔
65
            }
66

67
            root.setLevel(level);
1✔
68
        }
69
    }
1✔
70
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc