├── archetypes ├── basic │ └── src │ │ ├── test │ │ ├── resources │ │ │ └── projects │ │ │ │ └── basic │ │ │ │ └── goal.txt │ │ └── resources-template │ │ │ └── projects │ │ │ └── basic │ │ │ └── archetype.properties │ │ └── main │ │ └── resources │ │ └── archetype-resources │ │ └── src │ │ └── main │ │ └── resources │ │ ├── automatalib.properties │ │ └── logback.xml └── complete │ └── src │ ├── test │ ├── resources │ │ └── projects │ │ │ └── complete │ │ │ └── goal.txt │ └── resources-template │ │ └── projects │ │ └── complete │ │ └── archetype.properties │ └── main │ └── resources │ └── archetype-resources │ └── src │ └── main │ └── resources │ ├── automatalib.properties │ └── logback.xml ├── commons ├── settings │ ├── src │ │ ├── test │ │ │ └── resources │ │ │ │ └── automatalib.properties │ │ └── main │ │ │ └── java │ │ │ └── de │ │ │ └── learnlib │ │ │ └── setting │ │ │ ├── LearnLibSettingsSource.java │ │ │ └── sources │ │ │ ├── LearnLibSystemPropertiesSource.java │ │ │ ├── LearnLibLocalPropertiesSource.java │ │ │ ├── LearnLibPropertiesSource.java │ │ │ └── LearnLibSystemPropertiesAutomataLibSettingsSource.java │ └── learnlib.properties ├── datastructures │ └── src │ │ ├── test │ │ └── resources │ │ │ ├── dt.dot │ │ │ ├── merged.dot │ │ │ ├── OT_ASCII.txt │ │ │ ├── pta.dot │ │ │ ├── promoted.dot │ │ │ └── OT_HTML.html │ │ └── main │ │ └── java │ │ └── de │ │ └── learnlib │ │ └── datastructure │ │ ├── observationtable │ │ ├── ObservationTableFeature.java │ │ └── OTLearner.java │ │ ├── pta │ │ ├── BlueFringePTA.java │ │ ├── BlueFringePTAState.java │ │ ├── Color.java │ │ └── PTATransition.java │ │ └── list │ │ └── AbstractIntrusiveListEntryImpl.java ├── counterexamples │ └── src │ │ ├── main │ │ └── java │ │ │ └── de │ │ │ └── learnlib │ │ │ ├── counterexample │ │ │ └── package-info.java │ │ │ └── acex │ │ │ ├── AbstractCounterexample.java │ │ │ ├── package-info.java │ │ │ ├── MealyOutInconsPrefixTransformAcex.java │ │ │ └── MooreOutInconsPrefixTransformAcex.java │ │ └── test │ │ └── java │ │ └── de │ │ └── learnlib │ │ └── counterexample │ │ └── acex │ │ └── DummyAcex.java └── util │ └── src │ └── main │ └── java │ └── de │ └── learnlib │ └── util │ └── MQUtil.java ├── .github ├── issue_template.md ├── settings.xml ├── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md └── install-ltsmin.sh ├── oracles ├── parallelism │ └── src │ │ ├── test │ │ ├── resources │ │ │ └── learnlib.properties │ │ └── java │ │ │ └── de │ │ │ └── learnlib │ │ │ └── oracle │ │ │ └── parallelism │ │ │ ├── OmegaException.java │ │ │ ├── DynamicParallelSupplierTest.java │ │ │ ├── DynamicParallelOmegaSupplierTest.java │ │ │ ├── DynamicParallelAdaptiveSupplierTest.java │ │ │ ├── DynamicParallelTimedSupplierTest.java │ │ │ ├── DynamicParallelSULTest.java │ │ │ ├── DynamicParallelSLISULTest.java │ │ │ ├── DynamicParallelObservableSULTest.java │ │ │ ├── DynamicParallelTimedSULTest.java │ │ │ ├── SettingsTest.java │ │ │ ├── StaticParallelSupplierTest.java │ │ │ └── StaticParallelAdaptiveSupplierTest.java │ │ └── main │ │ └── java │ │ └── de │ │ └── learnlib │ │ └── oracle │ │ └── parallelism │ │ └── StaticQueriesJob.java └── membership-oracles │ └── src │ └── test │ └── resources │ ├── stateless_sul.py │ └── stateful_sul.py ├── test-support └── learning-examples │ └── src │ ├── main │ ├── resources │ │ ├── automata │ │ │ └── learnlibv2 │ │ │ │ ├── pots2.dfa.gz │ │ │ │ ├── pots3.dfa.gz │ │ │ │ ├── peterson2.dfa.gz │ │ │ │ └── peterson3.dfa.gz │ │ └── mmlt │ │ │ ├── sensor_collector.dot │ │ │ ├── WSN.dot │ │ │ └── Oven.dot │ └── java │ │ └── de │ │ └── learnlib │ │ └── testsupport │ │ └── example │ │ └── dfa │ │ └── ExampleRandomDFA.java │ └── test │ └── java │ └── de │ └── learnlib │ └── example │ └── dfa │ └── DFAExamplesTest.java ├── .gitignore ├── examples └── src │ └── main │ └── resources │ ├── automatalib.properties │ ├── logback.xml │ └── mmlt_example.dot ├── algorithms ├── active │ ├── aaar │ │ └── src │ │ │ ├── test │ │ │ ├── resources │ │ │ │ ├── tree_mealy.dot │ │ │ │ ├── tree_moore.dot │ │ │ │ └── tree_dfa.dot │ │ │ └── java │ │ │ │ └── de │ │ │ │ └── learnlib │ │ │ │ └── algorithm │ │ │ │ └── aaar │ │ │ │ ├── explicit │ │ │ │ ├── NoopIncrementor.java │ │ │ │ └── Incrementor.java │ │ │ │ └── ComboConstructor.java │ │ │ └── main │ │ │ └── java │ │ │ └── de │ │ │ └── learnlib │ │ │ └── algorithm │ │ │ └── aaar │ │ │ ├── ExplicitInitialAbstraction.java │ │ │ └── abstraction │ │ │ ├── GenericAbstractionTree.java │ │ │ └── ExplicitAbstractionTree.java │ ├── lstar │ │ └── src │ │ │ ├── test │ │ │ ├── resources │ │ │ │ └── mmlt │ │ │ │ │ ├── same_initial_value.dot │ │ │ │ │ ├── timeout_only.dot │ │ │ │ │ ├── duplicate_timer_outputs.dot │ │ │ │ │ ├── greedy_fail.dot │ │ │ │ │ ├── isolated_loc_permanent.dot │ │ │ │ │ ├── missing_oneshot_high_waiting.dot │ │ │ │ │ ├── over_approx_reset.dot │ │ │ │ │ ├── initial_value_one.dot │ │ │ │ │ ├── ambiguous_minimal.dot │ │ │ │ │ ├── isolated_loc_temp.dot │ │ │ │ │ ├── unique_minimal.dot │ │ │ │ │ ├── syntax_demo.dot │ │ │ │ │ └── recursive_decomp.dot │ │ │ └── java │ │ │ │ └── de │ │ │ │ └── learnlib │ │ │ │ └── algorithm │ │ │ │ ├── malerpnueli │ │ │ │ ├── MalerPnueliDFAGrowingAlphabetTest.java │ │ │ │ ├── MalerPnueliMealyGrowingAlphabetTest.java │ │ │ │ └── MalerPnueliMooreGrowingAlphabetTest.java │ │ │ │ └── rivestschapire │ │ │ │ ├── RivestSchapireDFAGrowingAlphabetTest.java │ │ │ │ ├── RivestSchapireMealyGrowingAlphabetTest.java │ │ │ │ └── RivestSchapireMooreGrowingAlphabetTest.java │ │ │ └── main │ │ │ └── java │ │ │ └── de │ │ │ └── learnlib │ │ │ └── algorithm │ │ │ └── lstar │ │ │ ├── mmlt │ │ │ └── cex │ │ │ │ └── results │ │ │ │ └── CexAnalysisResult.java │ │ │ ├── dfa │ │ │ └── LStarDFAUtil.java │ │ │ └── moore │ │ │ └── LStarMooreUtil.java │ ├── ttt │ │ └── src │ │ │ ├── test │ │ │ ├── resources │ │ │ │ ├── dt.dot │ │ │ │ └── hyp.dot │ │ │ └── java │ │ │ │ └── de │ │ │ │ └── learnlib │ │ │ │ └── algorithm │ │ │ │ └── ttt │ │ │ │ └── TTTDFAGrowingAlphabetTest.java │ │ │ └── main │ │ │ └── java │ │ │ └── de │ │ │ └── learnlib │ │ │ └── algorithm │ │ │ └── ttt │ │ │ ├── base │ │ │ ├── HypothesisChangedException.java │ │ │ └── OutputInconsistency.java │ │ │ ├── dfa │ │ │ └── TTTStateDFA.java │ │ │ └── mealy │ │ │ └── TTTTransitionMealy.java │ ├── observation-pack │ │ └── src │ │ │ └── test │ │ │ └── resources │ │ │ ├── dt.dot │ │ │ └── hyp.dot │ ├── lsharp │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── de │ │ │ └── learnlib │ │ │ └── algorithm │ │ │ └── lsharp │ │ │ ├── Rule3.java │ │ │ ├── Rule2.java │ │ │ ├── ads │ │ │ ├── ADS.java │ │ │ └── ArenaNode.java │ │ │ └── TransitionInformation.java │ ├── lambda │ │ └── src │ │ │ ├── main │ │ │ └── java │ │ │ │ └── de │ │ │ │ └── learnlib │ │ │ │ └── algorithm │ │ │ │ └── lambda │ │ │ │ └── ttt │ │ │ │ ├── st │ │ │ │ ├── STNode.java │ │ │ │ └── SuffixTrie.java │ │ │ │ ├── pt │ │ │ │ ├── PrefixTree.java │ │ │ │ └── PTNode.java │ │ │ │ ├── mealy │ │ │ │ └── MealyTransition.java │ │ │ │ └── dt │ │ │ │ └── Children.java │ │ │ └── test │ │ │ └── java │ │ │ └── de │ │ │ └── learnlib │ │ │ └── algorithm │ │ │ └── lambda │ │ │ ├── ttt │ │ │ ├── dfa │ │ │ │ ├── TTTLambdaDFAGrowingAlphabetTest.java │ │ │ │ └── TTTLambdaDFACounterexampleQueueTest.java │ │ │ └── mealy │ │ │ │ └── TTTLambdaMealyGrowingAlphabetTest.java │ │ │ └── lstar │ │ │ └── dfa │ │ │ ├── LLambdaDFAGrowingAlphabetTest.java │ │ │ └── LLambdaDFACounterexampleQueueTest.java │ ├── adt │ │ └── src │ │ │ ├── test │ │ │ └── resources │ │ │ │ └── adt.dot │ │ │ └── main │ │ │ └── java │ │ │ └── de │ │ │ └── learnlib │ │ │ └── algorithm │ │ │ └── adt │ │ │ └── config │ │ │ └── model │ │ │ └── ADSCalculator.java │ ├── observation-pack-vpa │ │ └── src │ │ │ ├── main │ │ │ └── java │ │ │ │ └── de │ │ │ │ └── learnlib │ │ │ │ └── algorithm │ │ │ │ └── observationpack │ │ │ │ └── vpa │ │ │ │ └── hypothesis │ │ │ │ ├── HypIntTrans.java │ │ │ │ └── HypRetTrans.java │ │ │ └── test │ │ │ └── resources │ │ │ └── dt.dot │ ├── dhc │ │ └── src │ │ │ └── test │ │ │ └── java │ │ │ └── de │ │ │ └── learnlib │ │ │ └── algorithm │ │ │ └── dhc │ │ │ └── mealy │ │ │ └── MealyDHCGrowingAlphabetTest.java │ ├── ttt-vpa │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── de │ │ │ └── learnlib │ │ │ └── algorithm │ │ │ └── ttt │ │ │ └── vpa │ │ │ ├── GlobalSplitter.java │ │ │ └── ExtractRecord.java │ └── kearns-vazirani │ │ └── src │ │ └── test │ │ └── java │ │ └── de │ │ └── learnlib │ │ └── algorithm │ │ └── kv │ │ └── dfa │ │ └── KearnsVaziraniDFAGrowingAlphabetTest.java └── passive │ └── ostia │ └── src │ ├── test │ ├── resources │ │ └── hyp.dot │ └── java │ │ └── de │ │ └── learnlib │ │ └── algorithm │ │ └── ostia │ │ └── OSTIAIT.java │ └── main │ └── java │ └── de │ └── learnlib │ └── algorithm │ └── ostia │ ├── StateParent.java │ ├── Out.java │ ├── Edge.java │ └── Blue.java ├── SECURITY.md ├── api └── src │ └── main │ └── java │ └── de │ └── learnlib │ ├── algorithm │ └── package-info.java │ ├── sul │ ├── package-info.java │ ├── ExecutableInput.java │ └── ContextHandler.java │ ├── oracle │ ├── package-info.java │ ├── ParallelAdaptiveOracle.java │ ├── ParallelTimedQueryOracle.java │ ├── ParallelOmegaOracle.java │ ├── OmegaQueryAnswerer.java │ ├── ParallelOracle.java │ ├── QueryAnswerer.java │ ├── SingleAdaptiveMembershipOracle.java │ └── BatchProcessor.java │ ├── filter │ └── FilterResponse.java │ ├── AccessSequenceProvider.java │ ├── exception │ └── BatchInterruptedException.java │ └── AccessSequenceTransformer.java ├── filters ├── statistics │ └── src │ │ ├── main │ │ └── java │ │ │ └── de │ │ │ └── learnlib │ │ │ └── filter │ │ │ └── statistic │ │ │ ├── container │ │ │ ├── StatisticContainer.java │ │ │ ├── TextContainer.java │ │ │ ├── FlagContainer.java │ │ │ └── CounterContainer.java │ │ │ └── MapStatisticsProvider.java │ │ └── test │ │ └── java │ │ └── de │ │ └── learnlib │ │ └── filter │ │ └── statistic │ │ ├── NoopQuery.java │ │ └── sul │ │ ├── AbstractResetCounterSULTest.java │ │ └── ResetCounterSULTest.java ├── cache │ └── src │ │ ├── test │ │ └── java │ │ │ └── de │ │ │ └── learnlib │ │ │ └── filter │ │ │ └── cache │ │ │ ├── sul │ │ │ ├── SULDAGCacheTest.java │ │ │ └── SULTreeCacheTest.java │ │ │ ├── dfa │ │ │ ├── DFADAGCacheTest.java │ │ │ └── DFATreeCacheTest.java │ │ │ ├── mealy │ │ │ ├── MealyDAGCacheTest.java │ │ │ ├── MealyTreeCacheTest.java │ │ │ ├── DynamicMealyTreeCacheTest.java │ │ │ ├── MealyDAGMapperCacheTest.java │ │ │ ├── MealyTreeMapperCacheTest.java │ │ │ └── DynamicMealyTreeMapperCacheTest.java │ │ │ └── moore │ │ │ ├── MooreDAGCacheTest.java │ │ │ ├── MooreTreeCacheTest.java │ │ │ ├── MooreDAGMapperCacheTest.java │ │ │ └── MooreTreeMapperCacheTest.java │ │ └── main │ │ └── java │ │ └── de │ │ └── learnlib │ │ └── filter │ │ └── cache │ │ ├── DynamicSymbolComparator.java │ │ └── ReverseLexCmp.java ├── reuse │ └── src │ │ └── main │ │ └── java │ │ └── de │ │ └── learnlib │ │ └── filter │ │ └── reuse │ │ └── ReuseException.java └── symbol-filters │ ├── src │ └── main │ │ └── java │ │ ├── module-info.java │ │ └── de │ │ └── learnlib │ │ └── filter │ │ └── symbol │ │ └── IgnoreAllSymbolFilter.java │ └── pom.xml ├── drivers ├── basic │ └── src │ │ └── main │ │ └── java │ │ └── de │ │ └── learnlib │ │ └── driver │ │ └── reflect │ │ ├── MethodOutput.java │ │ ├── VoidOutput.java │ │ └── Unobserved.java └── simulator │ └── src │ └── main │ └── java │ └── module-info.java └── .gitattributes /archetypes/basic/src/test/resources/projects/basic/goal.txt: -------------------------------------------------------------------------------- 1 | package 2 | 3 | -------------------------------------------------------------------------------- /archetypes/complete/src/test/resources/projects/complete/goal.txt: -------------------------------------------------------------------------------- 1 | package 2 | 3 | -------------------------------------------------------------------------------- /commons/settings/src/test/resources/automatalib.properties: -------------------------------------------------------------------------------- 1 | automatalib.word.delim.left=delim_left 2 | automatalib.word.empty=empty_rep 3 | -------------------------------------------------------------------------------- /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | If you chose a blank issue template to ask a general question about LearnLib, please consider using the [Discussions](https://github.com/LearnLib/learnlib/discussions) page instead. 2 | -------------------------------------------------------------------------------- /oracles/parallelism/src/test/resources/learnlib.properties: -------------------------------------------------------------------------------- 1 | learnlib.parallel.batch_size.dynamic=1 2 | learnlib.parallel.batch_size.static=4 3 | learnlib.parallel.pool_policy=FIXED 4 | learnlib.parallel.pool_size=5 5 | -------------------------------------------------------------------------------- /test-support/learning-examples/src/main/resources/automata/learnlibv2/pots2.dfa.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LearnLib/learnlib/HEAD/test-support/learning-examples/src/main/resources/automata/learnlibv2/pots2.dfa.gz -------------------------------------------------------------------------------- /test-support/learning-examples/src/main/resources/automata/learnlibv2/pots3.dfa.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LearnLib/learnlib/HEAD/test-support/learning-examples/src/main/resources/automata/learnlibv2/pots3.dfa.gz -------------------------------------------------------------------------------- /test-support/learning-examples/src/main/resources/automata/learnlibv2/peterson2.dfa.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LearnLib/learnlib/HEAD/test-support/learning-examples/src/main/resources/automata/learnlibv2/peterson2.dfa.gz -------------------------------------------------------------------------------- /test-support/learning-examples/src/main/resources/automata/learnlibv2/peterson3.dfa.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LearnLib/learnlib/HEAD/test-support/learning-examples/src/main/resources/automata/learnlibv2/peterson3.dfa.gz -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Maven output 2 | target/ 3 | 4 | # Eclipse output directory 5 | bin/ 6 | 7 | # Eclipse settings 8 | .settings/ 9 | .classpath 10 | .project 11 | .factorypath 12 | 13 | #Intellij settings 14 | *.iml 15 | .idea/ 16 | -------------------------------------------------------------------------------- /archetypes/basic/src/test/resources-template/projects/basic/archetype.properties: -------------------------------------------------------------------------------- 1 | artifactId=basic 2 | groupId=archetype.it 3 | learnlibVersion=${project.version} 4 | package=it.pkg 5 | version=0.1-SNAPSHOT 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /archetypes/complete/src/test/resources-template/projects/complete/archetype.properties: -------------------------------------------------------------------------------- 1 | artifactId=complete 2 | groupId=archetype.it 3 | learnlibVersion=${project.version} 4 | package=it.pkg 5 | version=0.1-SNAPSHOT 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /examples/src/main/resources/automatalib.properties: -------------------------------------------------------------------------------- 1 | # Sample AutomataLib properties file, controlling Word representation 2 | automatalib.word.delim.left=\u00ab 3 | automatalib.word.delim.right=\u00bb 4 | automatalib.word.symbol.delim.left=' 5 | automatalib.word.symbol.delim.right=' 6 | automatalib.word.symbol.separator=\u2423 7 | -------------------------------------------------------------------------------- /algorithms/active/aaar/src/test/resources/tree_mealy.dot: -------------------------------------------------------------------------------- 1 | digraph g { 2 | 3 | s0 [shape="circle" label="ε, y y x"]; 4 | s1 [shape="circle" label="Abs.: 'x' 5 | Rep.: 'x'"]; 6 | s2 [shape="circle" label="Abs.: 'y' 7 | Rep.: 'y'"]; 8 | s0 -> s1 [label="== 0 9 11 12"]; 9 | s0 -> s2 [style="dashed" label="!= 0 9 11 12"]; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /archetypes/basic/src/main/resources/archetype-resources/src/main/resources/automatalib.properties: -------------------------------------------------------------------------------- 1 | # Sample AutomataLib properties file, controlling Word representation 2 | automatalib.word.delim.left=\u00ab 3 | automatalib.word.delim.right=\u00bb 4 | automatalib.word.symbol.delim.left=' 5 | automatalib.word.symbol.delim.right=' 6 | automatalib.word.symbol.separator=\u2423 7 | -------------------------------------------------------------------------------- /archetypes/complete/src/main/resources/archetype-resources/src/main/resources/automatalib.properties: -------------------------------------------------------------------------------- 1 | # Sample AutomataLib properties file, controlling Word representation 2 | automatalib.word.delim.left=\u00ab 3 | automatalib.word.delim.right=\u00bb 4 | automatalib.word.symbol.delim.left=' 5 | automatalib.word.symbol.delim.right=' 6 | automatalib.word.symbol.separator=\u2423 7 | -------------------------------------------------------------------------------- /commons/datastructures/src/test/resources/dt.dot: -------------------------------------------------------------------------------- 1 | digraph g { 2 | 3 | s0 [shape="oval" label="1"]; 4 | s1 [shape="box" label="a"]; 5 | s2 [shape="oval" label="2"]; 6 | s3 [shape="box" label="b"]; 7 | s4 [shape="box" label="c"]; 8 | s0 -> s1 [label="false"]; 9 | s0 -> s2 [label="true"]; 10 | s2 -> s3 [label="false"]; 11 | s2 -> s4 [label="true"]; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /commons/datastructures/src/test/resources/merged.dot: -------------------------------------------------------------------------------- 1 | digraph g { 2 | 3 | s0 [shape="circle" label="true"]; 4 | s1 [shape="circle" label="false"]; 5 | s2 [shape="circle" label="true"]; 6 | s0 -> s1 [label="0 / a"]; 7 | s0 -> s0 [label="1 / b"]; 8 | s1 -> s2 [label="1 / c"]; 9 | 10 | __start0 [label="" shape="none" width="0" height="0"]; 11 | __start0 -> s0; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /commons/settings/learnlib.properties: -------------------------------------------------------------------------------- 1 | #This file is explicitly not part of test/resources to check whether the local file reader works correctly 2 | automatalib.word.delim.left=delim_left_override 3 | automatalib.word.delim.right=delim_right 4 | learnlib.parallel.batch_size.dynamic=1 5 | learnlib.parallel.batch_size.static=2 6 | learnlib.parallel.pool_policy=CACHED 7 | learnlib.parallel.pool_size=3 8 | -------------------------------------------------------------------------------- /examples/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} %-5level %25.25(%logger{25}) - %msg %n 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /algorithms/active/lstar/src/test/resources/mmlt/same_initial_value.dot: -------------------------------------------------------------------------------- 1 | // In this example, the learner will infer a timer with a combined output. 2 | digraph g { 3 | 4 | s0 [timers="a=3,b=3,c=6" shape="circle"]; 5 | 6 | s0 -> s0 [label="to[a] / A"]; 7 | s0 -> s0 [label="to[b] / C"]; 8 | s0 -> s0 [label="to[c] / B"]; 9 | 10 | __start0 [label="" shape="none" width="0" height="0"]; 11 | __start0 -> s0; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Reporting Security Issues 2 | 3 | To report a security issue, please use the GitHub ["Security Advisory"](https://github.com/learnlib/learnlib/security/advisories/new) function. 4 | 5 | The LearnLib team will send a response indicating the next steps in handling your report. After the initial reply to your report, we will keep you informed of the progress towards a fix and may ask for additional information or guidance. 6 | -------------------------------------------------------------------------------- /algorithms/active/lstar/src/test/resources/mmlt/timeout_only.dot: -------------------------------------------------------------------------------- 1 | // This example consists of timeouts only, triggering certain cases in counterexample handling 2 | digraph g { 3 | 4 | s0 [shape="circle" timers="a=2"]; 5 | s1 [shape="circle" timers="b=1"]; 6 | 7 | s0 -> s1 [label="to[a] / A"]; 8 | s1 -> s0 [label="to[b] / B"]; 9 | 10 | __start0 [label="" shape="none" width="0" height="0"]; 11 | __start0 -> s0; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /archetypes/basic/src/main/resources/archetype-resources/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %30.30(%logger{30}) - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /archetypes/complete/src/main/resources/archetype-resources/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %30.30(%logger{30}) - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /algorithms/active/lstar/src/test/resources/mmlt/duplicate_timer_outputs.dot: -------------------------------------------------------------------------------- 1 | // In this example, the same output is produced multiple times at the same timeouts: 2 | digraph g { 3 | 4 | s0 [timers="a=3,b=3,c=6,d=10" shape="circle"]; 5 | 6 | s0 -> s0 [label="to[a] / A"]; 7 | s0 -> s0 [label="to[b] / A"]; 8 | s0 -> s0 [label="to[c] / B"]; 9 | s0 -> s0 [label="to[d] / A|A"]; 10 | 11 | __start0 [label="" shape="none" width="0" height="0"]; 12 | __start0 -> s0; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /algorithms/active/lstar/src/test/resources/mmlt/greedy_fail.dot: -------------------------------------------------------------------------------- 1 | // This is an example of a model where the greedy timer inference leads to an unnecessarily large model. 2 | digraph g { 3 | 4 | s0 [timers="a=3" shape="circle"]; 5 | s1 [timers="a=2,b=5" shape="circle"]; 6 | 7 | s0 -> s1 [label="to[a] / a"]; 8 | s1 -> s1 [label="to[a] / b"]; 9 | s1 -> s1 [label="to[b] / c"]; 10 | 11 | __start0 [label="" shape="none" width="0" height="0"]; 12 | __start0 -> s0; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /algorithms/passive/ostia/src/test/resources/hyp.dot: -------------------------------------------------------------------------------- 1 | digraph g { 2 | 3 | s0 [shape="circle" label="null / ε"]; 4 | s1 [shape="circle" label="[0] / 1"]; 5 | s2 [shape="circle" label="null / ε"]; 6 | s0 -> s1 [label="0 / ε"]; 7 | s0 -> s0 [label="1 / 1"]; 8 | s1 -> s1 [label="0 / 0"]; 9 | s1 -> s2 [label="1 / 0 1 0 1"]; 10 | s2 -> s2 [label="0 / ε"]; 11 | s2 -> s0 [label="1 / ε"]; 12 | 13 | __start0 [label="" shape="none" width="0" height="0"]; 14 | __start0 -> s0; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /algorithms/active/aaar/src/test/resources/tree_moore.dot: -------------------------------------------------------------------------------- 1 | digraph g { 2 | 3 | s0 [shape="circle" label="a a, a"]; 4 | s1 [shape="circle" label="Abs.: 'a' 5 | Rep.: 'a'"]; 6 | s2 [shape="circle" label="ε, b"]; 7 | s3 [shape="circle" label="Abs.: 'b' 8 | Rep.: 'b'"]; 9 | s4 [shape="circle" label="Abs.: 'c' 10 | Rep.: 'c'"]; 11 | s0 -> s1 [label="== o1 o2 o1 o1 o1"]; 12 | s0 -> s2 [style="dashed" label="!= o1 o2 o1 o1 o1"]; 13 | s2 -> s3 [label="== o1 o1 o2"]; 14 | s2 -> s4 [style="dashed" label="!= o1 o1 o2"]; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /algorithms/active/aaar/src/test/resources/tree_dfa.dot: -------------------------------------------------------------------------------- 1 | digraph g { 2 | 3 | s0 [shape="circle" label="Paul, Mary"]; 4 | s1 [shape="circle" label="Paul loves, ε"]; 5 | s2 [shape="circle" label="Abs.: 'loves' 6 | Rep.: 'loves'"]; 7 | s3 [shape="circle" label="Abs.: 'Paul' 8 | Rep.: 'Paul'"]; 9 | s4 [shape="circle" label="Abs.: 'Mary' 10 | Rep.: 'Mary'"]; 11 | s0 -> s1 [label="== false"]; 12 | s0 -> s2 [style="dashed" label="!= false"]; 13 | s1 -> s3 [label="== false"]; 14 | s1 -> s4 [style="dashed" label="!= false"]; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /algorithms/active/lstar/src/test/resources/mmlt/isolated_loc_permanent.dot: -------------------------------------------------------------------------------- 1 | // Example of location that becomes permanently isolated 2 | digraph g { 3 | 4 | s0 [timers="x=3" shape="circle"]; 5 | s1 [timers="y=2, z=3" shape="circle"]; 6 | s2 [shape="circle"]; 7 | 8 | s0 -> s0 [label="a / A"]; 9 | s1 -> s1 [label="a / B"]; 10 | s2 -> s2 [label="a / C"]; 11 | 12 | s0 -> s1 [label="to[x] / X"]; 13 | s1 -> s1 [label="to[y] / Y"]; 14 | s1 -> s2 [label="to[z] / Z"]; 15 | 16 | __start0 [label="" shape="none" width="0" height="0"]; 17 | __start0 -> s0; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /.github/settings.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | false 6 | 7 | 8 | 9 | sonatype 10 | ${env.SONATYPE_TOKEN_USERNAME} 11 | ${env.SONATYPE_TOKEN_PASSWORD} 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /algorithms/active/lstar/src/test/resources/mmlt/missing_oneshot_high_waiting.dot: -------------------------------------------------------------------------------- 1 | // This is an example of a model where we infer a periodic timer b that cannot be periodic, even with a high maximum waiting time.l 2 | digraph g { 3 | 4 | s0 [timers="a=3" shape="circle"]; 5 | s1 [timers="b=1" shape="circle"]; 6 | s2 [timers="c=2" shape="circle"]; 7 | 8 | s0 -> s1 [label="to[a] / A"]; 9 | s1 -> s2 [label="to[b] / B"]; 10 | s2 -> s2 [label="to[c] / C"]; 11 | 12 | s1 -> s1 [label="x / X"]; 13 | 14 | __start0 [label="" shape="none" width="0" height="0"]; 15 | __start0 -> s0; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /commons/datastructures/src/test/resources/OT_ASCII.txt: -------------------------------------------------------------------------------- 1 | +=======+===========+===========+===========+===========+ 2 | | | | A | B | A B | 3 | +=======+===========+===========+===========+===========+ 4 | | A | out: 0 | out: 1 | out: 2 | out: 3 | 5 | +-------+-----------+-----------+-----------+-----------+ 6 | | A B | out: 3 | out: 2 | out: 1 | out: 0 | 7 | +=======+===========+===========+===========+===========+ 8 | | A B C | out: 0123 | out: 0123 | out: 0123 | out: 0123 | 9 | +=======+===========+===========+===========+===========+ 10 | -------------------------------------------------------------------------------- /algorithms/active/lstar/src/test/resources/mmlt/over_approx_reset.dot: -------------------------------------------------------------------------------- 1 | // Make sure to not initialize the suffixes with the input alphabet in this example 2 | // In this example, the learner will infer a missing local reset, although there is actually a missing discriminator. 3 | digraph g { 4 | 5 | s0 [timers="a=3" shape="circle"]; 6 | s1 [timers="b=3" shape="circle"]; 7 | 8 | s0 -> s0 [label="to[a] / A"]; 9 | s0 -> s1 [label="i / void"]; 10 | 11 | s1 -> s1 [label="to[b] / A"]; 12 | s1 -> s1 [label="x / X"]; 13 | 14 | __start0 [label="" shape="none" width="0" height="0"]; 15 | __start0 -> s0; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /algorithms/active/lstar/src/test/resources/mmlt/initial_value_one.dot: -------------------------------------------------------------------------------- 1 | // The location s0 of this MMLT has a timer with the initial value one and a local reset. 2 | // We allow local resets only in locations with at least two stable configurations. 3 | // Hence, the smallest accurate hypothesis MMLT for this model must have two locations. 4 | digraph g { 5 | 6 | s0 [timers="x=1,y=2" shape="circle"]; 7 | 8 | s0 -> s0 [label="a / void" resets="x,y"]; 9 | s0 -> s0 [label="to[x] / X"]; 10 | s0 -> s0 [label="to[y] / Y"]; 11 | 12 | __start0 [label="" shape="none" width="0" height="0"]; 13 | __start0 -> s0; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /oracles/membership-oracles/src/test/resources/stateless_sul.py: -------------------------------------------------------------------------------- 1 | #!/bin/python 2 | import sys 3 | 4 | def main(): 5 | argv = len(sys.argv) 6 | 7 | if argv > 1: # arg mode 8 | for arg in sys.argv[1:]: 9 | print(sum([ord(c) for c in arg])) 10 | print(arg, file=sys.stderr) 11 | else: # stdin mode 12 | for line in sys.stdin: 13 | for arg in line.split(): 14 | argv += 1 15 | print(sum([ord(c) for c in arg])) 16 | print(arg, file=sys.stderr) 17 | 18 | sys.exit(argv % 2) 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /algorithms/active/lstar/src/test/resources/mmlt/ambiguous_minimal.dot: -------------------------------------------------------------------------------- 1 | // In this example, the learner infers an equivalent MMLT 2 | // that uses more timers per location but still has the same number of locations. 3 | digraph g { 4 | 5 | s0 [shape="circle"]; 6 | s1 [shape="circle" timers="a=2"]; 7 | s2 [shape="circle" timers="b=1"]; 8 | s3 [shape="circle"]; 9 | s4 [shape="circle"]; 10 | 11 | s1 -> s2 [label="to[a] / A"]; 12 | s2 -> s3 [label="to[b] / B"]; 13 | 14 | s0 -> s1 [label="y / X"]; 15 | s0 -> s4 [label="x / Y"]; 16 | s4 -> s2 [label="x / Z"]; 17 | 18 | __start0 [label="" shape="none" width="0" height="0"]; 19 | __start0 -> s0; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /algorithms/active/lstar/src/test/resources/mmlt/isolated_loc_temp.dot: -------------------------------------------------------------------------------- 1 | // Example of location that becomes temporarily isolated 2 | // Tested with a whitebox oracle only. 3 | digraph g { 4 | 5 | s0 [timers="x=3" shape="circle"]; 6 | s1 [timers="y=2, z=3" shape="circle"]; 7 | s2 [shape="circle"]; 8 | 9 | s4 [shape="circle"]; 10 | s5 [timers="v=1" shape="circle"]; 11 | 12 | s0 -> s0 [label="a / A"]; 13 | s1 -> s1 [label="a / B"]; 14 | s2 -> s4 [label="a / C"]; 15 | s4 -> s5 [label="a / C"]; 16 | 17 | s0 -> s1 [label="to[x] / X"]; 18 | s1 -> s1 [label="to[y] / Y"]; 19 | s1 -> s2 [label="to[z] / Z"]; 20 | 21 | s5 -> s5 [label="a / B"] 22 | s5 -> s2 [label="to[v] / Z"] 23 | 24 | __start0 [label="" shape="none" width="0" height="0"]; 25 | __start0 -> s0; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /algorithms/active/ttt/src/test/resources/dt.dot: -------------------------------------------------------------------------------- 1 | digraph g { 2 | 3 | s0 [shape="oval" label="WATER"]; 4 | s1 [shape="oval" label="CLEAN"]; 5 | s2 [shape="box" label="s1"]; 6 | s3 [shape="box" label="s5"]; 7 | s4 [shape="oval" label="BUTTON"]; 8 | s5 [shape="oval" label="POD BUTTON"]; 9 | s6 [shape="oval" label="WATER BUTTON"]; 10 | s7 [shape="box" label="s0"]; 11 | s8 [shape="box" label="s4"]; 12 | s9 [shape="box" label="s2"]; 13 | s10 [shape="box" label="s3"]; 14 | s0 -> s1 [label="error"]; 15 | s0 -> s4 [label="ok"]; 16 | s1 -> s2 [label="error"]; 17 | s1 -> s3 [label="ok"]; 18 | s4 -> s5 [label="error"]; 19 | s4 -> s10 [label="coffee!"]; 20 | s5 -> s6 [label="ok error"]; 21 | s5 -> s9 [label="ok coffee!"]; 22 | s6 -> s7 [label="ok error"]; 23 | s6 -> s8 [label="ok coffee!"]; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /algorithms/active/observation-pack/src/test/resources/dt.dot: -------------------------------------------------------------------------------- 1 | digraph g { 2 | 3 | s0 [shape="oval" label="WATER"]; 4 | s1 [shape="oval" label="CLEAN"]; 5 | s2 [shape="box" label="q1"]; 6 | s3 [shape="box" label="q5"]; 7 | s4 [shape="oval" label="POD BUTTON"]; 8 | s5 [shape="oval" label="WATER BUTTON"]; 9 | s6 [shape="box" label="q0"]; 10 | s7 [shape="box" label="q4"]; 11 | s8 [shape="oval" label="BUTTON"]; 12 | s9 [shape="box" label="q2"]; 13 | s10 [shape="box" label="q3"]; 14 | s0 -> s1 [label="error"]; 15 | s0 -> s4 [label="ok"]; 16 | s1 -> s2 [label="error"]; 17 | s1 -> s3 [label="ok"]; 18 | s4 -> s5 [label="ok error"]; 19 | s4 -> s8 [label="ok coffee!"]; 20 | s5 -> s6 [label="ok error"]; 21 | s5 -> s7 [label="ok coffee!"]; 22 | s8 -> s9 [label="error"]; 23 | s8 -> s10 [label="coffee!"]; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /commons/datastructures/src/test/resources/pta.dot: -------------------------------------------------------------------------------- 1 | digraph g { 2 | 3 | s0 [shape="circle" label="b"]; 4 | s1 [shape="circle" label="c"]; 5 | s2 [shape="circle" label="c"]; 6 | s3 [shape="circle" label="a"]; 7 | s4 [shape="circle" label="c"]; 8 | s5 [shape="circle" label="a"]; 9 | s6 [shape="circle" label="c"]; 10 | s7 [shape="circle" label="a"]; 11 | s8 [shape="circle" label="c"]; 12 | s9 [shape="circle" label="c"]; 13 | s0 -> s1 [label="0 / null"]; 14 | s0 -> s2 [label="1 / null"]; 15 | s0 -> s3 [label="2 / null"]; 16 | s1 -> s4 [label="0 / null"]; 17 | s1 -> s5 [label="2 / null"]; 18 | s3 -> s6 [label="0 / null"]; 19 | s3 -> s7 [label="1 / null"]; 20 | s3 -> s8 [label="2 / null"]; 21 | s5 -> s9 [label="1 / null"]; 22 | 23 | __start0 [label="" shape="none" width="0" height="0"]; 24 | __start0 -> s0; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /algorithms/active/lstar/src/test/resources/mmlt/unique_minimal.dot: -------------------------------------------------------------------------------- 1 | // This example demonstrates that there is no unique minimal form for an MMLT. 2 | // Learning this model with maxQueryTime=5 yields a model where s1 has two timers and s0 has one. 3 | // Setting maxQueryTime to 10 instead yields a model where the initial location has two timers and the following has one. 4 | // The total number of locations, timers, maximum timers per location, and average timers per location are identical. 5 | digraph g { 6 | 7 | s0 [shape="circle" timers="a=5"]; 8 | s1 [shape="circle" timers="b=3"]; 9 | s2 [shape="circle" timers="c=2"]; 10 | 11 | s0 -> s1 [label="to[a] / A"]; 12 | s1 -> s2 [label="to[b] / B"]; 13 | s2 -> s3 [label="to[c] / C"]; 14 | 15 | __start0 [label="" shape="none" width="0" height="0"]; 16 | __start0 -> s0; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps (or code) to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. Windows, Linux] 28 | - Java version: [e.g. 8, 11, 17] 29 | - LearnLib version: [e.g. 0.17.0] 30 | 31 | **Additional context** 32 | Add any other context about the problem here. 33 | -------------------------------------------------------------------------------- /algorithms/active/lsharp/src/main/java/de/learnlib/algorithm/lsharp/Rule3.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.lsharp; 17 | 18 | public enum Rule3 { 19 | ADS, 20 | SEPSEQ 21 | } 22 | -------------------------------------------------------------------------------- /oracles/parallelism/src/test/java/de/learnlib/oracle/parallelism/OmegaException.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.oracle.parallelism; 17 | 18 | class OmegaException extends RuntimeException {} 19 | -------------------------------------------------------------------------------- /commons/datastructures/src/test/resources/promoted.dot: -------------------------------------------------------------------------------- 1 | digraph g { 2 | 3 | s0 [color="RED" shape="circle" label="b"]; 4 | s1 [color="RED" shape="circle" label="c"]; 5 | s2 [color="BLUE" shape="circle" label="c"]; 6 | s3 [color="BLUE" shape="circle" label="a"]; 7 | s4 [color="BLUE" shape="circle" label="c"]; 8 | s5 [color="BLUE" shape="circle" label="a"]; 9 | s6 [shape="circle" label="c"]; 10 | s7 [shape="circle" label="a"]; 11 | s8 [shape="circle" label="c"]; 12 | s9 [shape="circle" label="c"]; 13 | s0 -> s1 [label="0 / null"]; 14 | s0 -> s2 [label="1 / null"]; 15 | s0 -> s3 [label="2 / null"]; 16 | s1 -> s4 [label="0 / null"]; 17 | s1 -> s5 [label="2 / null"]; 18 | s3 -> s6 [label="0 / null"]; 19 | s3 -> s7 [label="1 / null"]; 20 | s3 -> s8 [label="2 / null"]; 21 | s5 -> s9 [label="1 / null"]; 22 | 23 | __start0 [label="" shape="none" width="0" height="0"]; 24 | __start0 -> s0; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /algorithms/active/lsharp/src/main/java/de/learnlib/algorithm/lsharp/Rule2.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.lsharp; 17 | 18 | public enum Rule2 { 19 | ADS, 20 | NOTHING, 21 | SEPSEQ 22 | } 23 | -------------------------------------------------------------------------------- /api/src/main/java/de/learnlib/algorithm/package-info.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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 | 17 | /** 18 | * This package contains the basic interfaces and classes of learning algorithms of LearnLib. 19 | */ 20 | package de.learnlib.algorithm; 21 | -------------------------------------------------------------------------------- /api/src/main/java/de/learnlib/sul/package-info.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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 | 17 | /** 18 | * This package (and related packages) contains interfaces and classes for formalizing access to systems under 19 | * learning (SULs). 20 | */ 21 | package de.learnlib.sul; 22 | -------------------------------------------------------------------------------- /commons/datastructures/src/test/resources/OT_HTML.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
PrefixSuffixes
ABA B
Aout: 0out: 1out: 2out: 3
A Bout: 3out: 2out: 1out: 0
A B Cout: 0123out: 0123out: 0123out: 0123
12 | -------------------------------------------------------------------------------- /commons/counterexamples/src/main/java/de/learnlib/counterexample/package-info.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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 | 17 | /** 18 | * This package contains a collection of standard algorithms for handling counterexamples in automata learning. 19 | */ 20 | package de.learnlib.counterexample; 21 | -------------------------------------------------------------------------------- /api/src/main/java/de/learnlib/oracle/package-info.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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 | 17 | /** 18 | * This package contains the basic interfaces and classes for describing and implementing various types of oracles used 19 | * throughout LearnLib. 20 | */ 21 | package de.learnlib.oracle; 22 | -------------------------------------------------------------------------------- /commons/settings/src/main/java/de/learnlib/setting/LearnLibSettingsSource.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.setting; 17 | 18 | import net.automatalib.common.util.setting.SettingsSource; 19 | 20 | @FunctionalInterface 21 | public interface LearnLibSettingsSource extends SettingsSource {} 22 | -------------------------------------------------------------------------------- /filters/statistics/src/main/java/de/learnlib/filter/statistic/container/StatisticContainer.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.statistic.container; 17 | 18 | /** 19 | * Umbrella type for storing statistical data in a {@link MapStatisticsService}. 20 | */ 21 | interface StatisticContainer {} 22 | -------------------------------------------------------------------------------- /algorithms/active/lambda/src/main/java/de/learnlib/algorithm/lambda/ttt/st/STNode.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.lambda.ttt.st; 17 | 18 | import net.automatalib.word.Word; 19 | 20 | public interface STNode { 21 | 22 | Word word(); 23 | 24 | STNode prepend(I a); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /drivers/basic/src/main/java/de/learnlib/driver/reflect/MethodOutput.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.driver.reflect; 17 | 18 | /** 19 | * Abstract output of a method. 20 | */ 21 | public class MethodOutput { 22 | 23 | protected MethodOutput() { 24 | // prevent public instantiation 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /commons/datastructures/src/main/java/de/learnlib/datastructure/observationtable/ObservationTableFeature.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.datastructure.observationtable; 17 | 18 | @FunctionalInterface 19 | public interface ObservationTableFeature { 20 | 21 | ObservationTable getObservationTable(); 22 | } 23 | -------------------------------------------------------------------------------- /algorithms/active/lambda/src/main/java/de/learnlib/algorithm/lambda/ttt/st/SuffixTrie.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.lambda.ttt.st; 17 | 18 | public class SuffixTrie { 19 | 20 | private final STNode epsilon = new STNodeImpl<>(null, null); 21 | 22 | public STNode root() { 23 | return epsilon; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /algorithms/active/lsharp/src/main/java/de/learnlib/algorithm/lsharp/ads/ADS.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.lsharp.ads; 17 | 18 | import org.checkerframework.checker.nullness.qual.Nullable; 19 | 20 | public interface ADS { 21 | 22 | @Nullable I nextInput(@Nullable O previousOutput); 23 | 24 | void resetToRoot(); 25 | } 26 | -------------------------------------------------------------------------------- /.github/install-ltsmin.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | LTSMIN_NAME="ltsmin-${LTSMIN_VERSION}-$RUNNER_OS.tgz" 4 | LTSMIN_URL="https://github.com/${LTSMIN_REPO:-utwente-fmt}/ltsmin/releases/download/$LTSMIN_VERSION/$LTSMIN_NAME" 5 | 6 | if [ "$RUNNER_OS" = "windows" ]; then 7 | FILE_SUFFIX=".exe" 8 | fi 9 | 10 | # test if we have a cached version 11 | test -f "$HOME/ltsmin/${LTSMIN_VERSION}/bin/ltsmin-convert${FILE_SUFFIX}" -a -f "$HOME/ltsmin/${LTSMIN_VERSION}/bin/etf2lts-mc${FILE_SUFFIX}" && exit 0 12 | 13 | # create the directory where the binaries and downloads end up. 14 | mkdir -p "$HOME/ltsmin" 15 | mkdir -p "$HOME/ltsmin-download" 16 | 17 | # download the LTSmin binaries 18 | wget "$LTSMIN_URL" -P "$HOME/ltsmin-download" 19 | 20 | # the files to extract 21 | echo ${LTSMIN_VERSION}/bin/ltsmin-convert${FILE_SUFFIX} > $HOME/ltsmin-download/files 22 | echo ${LTSMIN_VERSION}/bin/etf2lts-mc${FILE_SUFFIX} >> $HOME/ltsmin-download/files 23 | 24 | # extract the files 25 | tar -xf "$HOME/ltsmin-download/$LTSMIN_NAME" -C "$HOME/ltsmin" --files-from=$HOME/ltsmin-download/files 26 | -------------------------------------------------------------------------------- /test-support/learning-examples/src/main/resources/mmlt/sensor_collector.dot: -------------------------------------------------------------------------------- 1 | // An MMLT model of a sensor that measures particulate matter and ambient noise. 2 | // The measurement program automatically ends after some time. It may be restarted at any time. 3 | // Alternatively, a self-check program can be entered. This also ends after some time and may be aborted. 4 | // At the end of either program, the collected data may be retrieved. 5 | digraph g { 6 | s0 [label="L0" timers=""] 7 | s1 [label="L1" timers="a=3,b=6,c=40"] 8 | s2 [label="L2" timers="d=4"] 9 | s3 [label="L3" timers=""] 10 | 11 | s0 -> s1 [label="p1/go"] 12 | 13 | s1 -> s1 [label="abort / ok" resets="a,b,c"] 14 | s1 -> s1 [label="to[a] / part"] 15 | s1 -> s1 [label="to[b] / noise"] 16 | s1 -> s3 [label="to[c] / done"] 17 | 18 | s0 -> s2 [label="p2 / go"] 19 | s2 -> s3 [label="abort / void"] 20 | s2 -> s3 [label="to[d] / done"] 21 | 22 | s3 -> s0 [label="collect / void"] 23 | 24 | __start0 [label="" shape="none" width="0" height="0"]; 25 | __start0 -> s0; 26 | } -------------------------------------------------------------------------------- /algorithms/active/lambda/src/main/java/de/learnlib/algorithm/lambda/ttt/pt/PrefixTree.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.lambda.ttt.pt; 17 | 18 | public class PrefixTree { 19 | 20 | private final PTNodeImpl epsilon = new PTNodeImpl<>(null, null); 21 | 22 | public PTNode root() { 23 | return epsilon; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /commons/datastructures/src/main/java/de/learnlib/datastructure/pta/BlueFringePTA.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.datastructure.pta; 17 | 18 | public class BlueFringePTA extends AbstractBlueFringePTA, SP, TP> { 19 | 20 | public BlueFringePTA(int alphabetSize) { 21 | super(alphabetSize, new BlueFringePTAState<>()); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /test-support/learning-examples/src/main/resources/mmlt/WSN.dot: -------------------------------------------------------------------------------- 1 | // Model of a wireless sensor node that regularly collects and transmits data. 2 | // If the battery is low, no data is transmitted. Then, 3 | // a user may collect the data manually. 4 | // The node can be shut down at any time. If the battery is empty, it is shut down automatically. 5 | digraph g { 6 | 7 | s0 [timers="a=60000,b=3600000" shape="circle"]; 8 | s1 [timers="a=300000" shape="circle"]; 9 | s2 [shape="circle"]; 10 | s3 [shape="circle"]; 11 | s0 -> s1 [resets="a" label="Battery.Low / Tx.disable"]; 12 | s0 -> s3 [label="User.Power / void"]; 13 | s0 -> s0 [resets="a" label="to[a] / Sensor.sample"]; 14 | s0 -> s0 [resets="b" label="to[b] / Tx.send"]; 15 | s1 -> s2 [label="Battery.Empty / void"]; 16 | s1 -> s1 [resets="a" label="User.Collect / Buffer.get"]; 17 | s1 -> s3 [label="User.Power / void"]; 18 | s1 -> s1 [resets="a" label="to[a] / Sensor.sample"]; 19 | s3 -> s0 [resets="a,b" label="User.Power / void"]; 20 | 21 | __start0 [label="" shape="none" width="0" height="0"]; 22 | __start0 -> s3; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # config based on https://github.com/alexkaratarakis/gitattributes 2 | 3 | # Handle line endings automatically for files detected as text 4 | # and leave all files detected as binary untouched. 5 | * text=auto 6 | 7 | # 8 | # The above will handle all files NOT found below 9 | # 10 | # These files are text and should be normalized (Convert crlf => lf) 11 | *.css text 12 | *.dot text 13 | *.htm text 14 | *.html text 15 | *.java text 16 | *.properties text 17 | *.py text 18 | *.sh text 19 | *.txt text 20 | *.xml text 21 | *.yml text 22 | 23 | # These files are binary and should be left untouched 24 | # (binary is a macro for -text -diff) 25 | *.class binary 26 | *.dll binary 27 | *.dylib binary 28 | *.ear binary 29 | *.gif binary 30 | *.ico binary 31 | *.jar binary 32 | *.jpg binary 33 | *.jpeg binary 34 | *.png binary 35 | *.so binary 36 | *.war binary 37 | -------------------------------------------------------------------------------- /algorithms/active/aaar/src/test/java/de/learnlib/algorithm/aaar/explicit/NoopIncrementor.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.aaar.explicit; 17 | 18 | import java.util.function.Function; 19 | 20 | public class NoopIncrementor implements Function { 21 | 22 | @Override 23 | public I apply(I s) { 24 | throw new UnsupportedOperationException(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /algorithms/active/ttt/src/main/java/de/learnlib/algorithm/ttt/base/HypothesisChangedException.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.ttt.base; 17 | 18 | /** 19 | * Exception to indicate structural changes of the hypothesis during counterexample analysis, thus possibly invalidating 20 | * the counterexample. 21 | */ 22 | public class HypothesisChangedException extends RuntimeException {} 23 | -------------------------------------------------------------------------------- /algorithms/active/ttt/src/test/resources/hyp.dot: -------------------------------------------------------------------------------- 1 | digraph g { 2 | 3 | s0 [shape="circle" label="s0"]; 4 | s1 [shape="circle" label="s1"]; 5 | s2 [shape="circle" label="s2"]; 6 | s3 [shape="circle" label="s3"]; 7 | s4 [shape="circle" label="s4"]; 8 | s5 [shape="circle" label="s5"]; 9 | s0 -> s2 [style="bold" label="WATER"]; 10 | s0 -> s4 [style="bold" label="POD"]; 11 | s0 -> s1 [style="bold" label="BUTTON"]; 12 | s0 -> s0 [label="CLEAN"]; 13 | s1 -> s1 [label="WATER"]; 14 | s1 -> s1 [label="POD"]; 15 | s1 -> s1 [label="BUTTON"]; 16 | s1 -> s1 [label="CLEAN"]; 17 | s2 -> s2 [label="WATER"]; 18 | s2 -> s3 [style="bold" label="POD"]; 19 | s2 -> s1 [label="BUTTON"]; 20 | s2 -> s0 [label="CLEAN"]; 21 | s3 -> s3 [label="WATER"]; 22 | s3 -> s3 [label="POD"]; 23 | s3 -> s5 [style="bold" label="BUTTON"]; 24 | s3 -> s0 [label="CLEAN"]; 25 | s4 -> s3 [label="WATER"]; 26 | s4 -> s4 [label="POD"]; 27 | s4 -> s1 [label="BUTTON"]; 28 | s4 -> s0 [label="CLEAN"]; 29 | s5 -> s1 [label="WATER"]; 30 | s5 -> s1 [label="POD"]; 31 | s5 -> s1 [label="BUTTON"]; 32 | s5 -> s0 [label="CLEAN"]; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /examples/src/main/resources/mmlt_example.dot: -------------------------------------------------------------------------------- 1 | // This file demonstrates the syntax for defining a custom MMLT. 2 | digraph g { 3 | s0 [label="L0" timers="a=2"] 4 | s1 [label="L1" timers="b=4,c=6"] 5 | s2 [label="L2" timers="d=2,e=3"] 6 | 7 | // one-shot with location change: 8 | s0 -> s1 [label="to[a] / A"] 9 | 10 | // periodic with multiple outputs, 11 | // assuming a {net.automatalib.automaton.mmlt.impl.StringSymbolCombiner} to combine and separate outputs: 12 | s1 -> s1 [label="to[b] / B|Z"] 13 | 14 | // one-shot with loop: 15 | s1 -> s1 [label="to[c] / C" resets="b,c"] 16 | 17 | // periodic with explicit resets: 18 | s2 -> s2 [label="to[d] / D" resets="d"] 19 | 20 | // periodic: 21 | s2 -> s2 [label="to[e] / E"] 22 | 23 | // normal transition with silent output: 24 | s1 -> s2 [label="x / void"] 25 | 26 | // loop with reset: 27 | s1 -> s1 [label="y / Y" resets="b,c"] 28 | 29 | // loop without reset: 30 | s2 -> s2 [label="y / D"] 31 | 32 | __start0 [label="" shape="none" width="0" height="0"]; 33 | __start0 -> s0; 34 | } -------------------------------------------------------------------------------- /algorithms/active/aaar/src/test/java/de/learnlib/algorithm/aaar/explicit/Incrementor.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.aaar.explicit; 17 | 18 | import java.util.function.Function; 19 | 20 | public class Incrementor implements Function { 21 | 22 | private int cnt; 23 | 24 | @Override 25 | public String apply(String s) { 26 | return s + ++cnt; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /commons/datastructures/src/main/java/de/learnlib/datastructure/pta/BlueFringePTAState.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.datastructure.pta; 17 | 18 | public class BlueFringePTAState extends AbstractBlueFringePTAState, SP, TP> { 19 | 20 | @Override 21 | protected BlueFringePTAState createState() { 22 | return new BlueFringePTAState<>(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /algorithms/active/lstar/src/main/java/de/learnlib/algorithm/lstar/mmlt/cex/results/CexAnalysisResult.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.lstar.mmlt.cex.results; 17 | 18 | /** 19 | * Outcome of a counterexample analysis. 20 | * 21 | * @param 22 | * input symbol type (of non-delaying inputs) 23 | * @param 24 | * output symbol type 25 | */ 26 | public interface CexAnalysisResult {} 27 | -------------------------------------------------------------------------------- /algorithms/active/lstar/src/test/resources/mmlt/syntax_demo.dot: -------------------------------------------------------------------------------- 1 | // This file demonstrates the syntax for defining a custom MMLT. 2 | // It is identical to "mmlt_example.dot" in the "examples" module. 3 | digraph g { 4 | s0 [label="L0" timers="a=2"] 5 | s1 [label="L1" timers="b=4,c=6"] 6 | s2 [label="L2" timers="d=2,e=3"] 7 | 8 | // one-shot with location change: 9 | s0 -> s1 [label="to[a] / A"] 10 | 11 | // periodic with multiple outputs, 12 | // assuming a {net.automatalib.automaton.mmlt.impl.StringSymbolCombiner} to combine and separate outputs: 13 | s1 -> s1 [label="to[b] / B|Z"] 14 | 15 | // one-shot with loop: 16 | s1 -> s1 [label="to[c] / C" resets="b,c"] 17 | 18 | // periodic with explicit resets: 19 | s2 -> s2 [label="to[d] / D" resets="d"] 20 | 21 | // periodic: 22 | s2 -> s2 [label="to[e] / E"] 23 | 24 | // normal transition with silent output: 25 | s1 -> s2 [label="x / void"] 26 | 27 | // loop with reset: 28 | s1 -> s1 [label="y / Y" resets="b,c"] 29 | 30 | // loop without reset: 31 | s2 -> s2 [label="y / D"] 32 | 33 | __start0 [label="" shape="none" width="0" height="0"]; 34 | __start0 -> s0; 35 | } -------------------------------------------------------------------------------- /algorithms/passive/ostia/src/main/java/de/learnlib/algorithm/ostia/StateParent.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.ostia; 17 | 18 | import org.checkerframework.checker.nullness.qual.Nullable; 19 | 20 | class StateParent { 21 | 22 | @Nullable Out out; 23 | @Nullable Edge[] transitions; 24 | 25 | @Override 26 | public String toString() { 27 | return String.valueOf(out); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /api/src/main/java/de/learnlib/oracle/ParallelAdaptiveOracle.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.oracle; 17 | 18 | /** 19 | * {@link ParallelOracle} equivalent for {@link AdaptiveMembershipOracle}s. 20 | * 21 | * @param 22 | * input symbol type 23 | * @param 24 | * output symbol type 25 | */ 26 | public interface ParallelAdaptiveOracle extends ThreadPool, AdaptiveMembershipOracle {} 27 | -------------------------------------------------------------------------------- /commons/counterexamples/src/main/java/de/learnlib/acex/AbstractCounterexample.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.acex; 17 | 18 | public interface AbstractCounterexample { 19 | 20 | int getLength(); 21 | 22 | default boolean testEffects(int i, int j) { 23 | return checkEffects(effect(i), effect(j)); 24 | } 25 | 26 | boolean checkEffects(E eff1, E eff2); 27 | 28 | E effect(int index); 29 | } 30 | -------------------------------------------------------------------------------- /filters/cache/src/test/java/de/learnlib/filter/cache/sul/SULDAGCacheTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.cache.sul; 17 | 18 | import de.learnlib.sul.SUL; 19 | 20 | public class SULDAGCacheTest extends AbstractSULCacheTest { 21 | 22 | @Override 23 | protected SULCache getCache(SUL delegate) { 24 | return SULCaches.createCache(getAlphabet(), delegate); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /api/src/main/java/de/learnlib/oracle/ParallelTimedQueryOracle.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.oracle; 17 | 18 | /** 19 | * {@link ParallelOracle} equivalent for {@link TimedQueryOracle}s. 20 | * 21 | * @param 22 | * input symbol type (of non-delaying inputs) 23 | * @param 24 | * output symbol type 25 | */ 26 | public interface ParallelTimedQueryOracle extends ThreadPool, TimedQueryOracle {} 27 | -------------------------------------------------------------------------------- /algorithms/active/lsharp/src/main/java/de/learnlib/algorithm/lsharp/TransitionInformation.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.lsharp; 17 | 18 | import net.automatalib.common.util.Pair; 19 | import org.checkerframework.checker.nullness.qual.Nullable; 20 | 21 | public interface TransitionInformation { 22 | 23 | @Nullable Pair getOutSucc(I input); 24 | 25 | void addTrans(I input, O output, Integer d); 26 | } 27 | -------------------------------------------------------------------------------- /algorithms/active/lstar/src/test/resources/mmlt/recursive_decomp.dot: -------------------------------------------------------------------------------- 1 | // This is an example of a model where the post-processing discovers an incorrect output while processing an incorrect target. 2 | // You need to set maximum the query time to three. 3 | // Use "TestDissExample" to send counterexamples that trigger the expected behavior. 4 | digraph g { 5 | 6 | s0 [shape="circle"]; 7 | s1 [timers="a=2,b=3" shape="circle"]; 8 | s2 [shape="circle"]; 9 | s3 [timers="c=2" shape="circle"]; 10 | s4 [timers="d=1" shape="circle"]; 11 | s5 [timers="e=1" shape="circle"]; 12 | s6 [timers="f=2" shape="circle"]; 13 | 14 | s0 -> s0 [label="f / F"] 15 | 16 | s0 -> s1 [label="p / P"]; 17 | s1 -> s1 [label="to[a] / A"]; 18 | s1 -> s2 [label="to[b] / B"]; 19 | 20 | s1 -> s1 [label="f / G"] 21 | s2 -> s2 [label="f / H"] 22 | 23 | // ---- 24 | 25 | s0 -> s3 [label="u / U"]; 26 | s3 -> s4 [label="to[c] / A"]; 27 | s4 -> s5 [label="to[d] / B"]; 28 | s5 -> s6 [label="to[e] / A"]; 29 | s6 -> s7 [label="to[f] / A|B"]; 30 | 31 | s3 -> s3 [label="f / G"] 32 | 33 | __start0 [label="" shape="none" width="0" height="0"]; 34 | __start0 -> s0; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /filters/cache/src/test/java/de/learnlib/filter/cache/sul/SULTreeCacheTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.cache.sul; 17 | 18 | import de.learnlib.sul.SUL; 19 | 20 | public class SULTreeCacheTest extends AbstractSULCacheTest { 21 | 22 | @Override 23 | protected SULCache getCache(SUL delegate) { 24 | return SULCaches.createTreeCache(getAlphabet(), delegate); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /filters/reuse/src/main/java/de/learnlib/filter/reuse/ReuseException.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.reuse; 17 | 18 | /** 19 | * This exception will be thrown whenever some nondeterministic behavior in the reuse tree is detected when inserting 20 | * new queries. 21 | */ 22 | public class ReuseException extends IllegalArgumentException { 23 | 24 | public ReuseException(String string) { 25 | super(string); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /filters/statistics/src/test/java/de/learnlib/filter/statistic/NoopQuery.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.statistic; 17 | 18 | import de.learnlib.query.AbstractQuery; 19 | import net.automatalib.word.Word; 20 | 21 | public class NoopQuery extends AbstractQuery { 22 | 23 | NoopQuery(Word queryWord) { 24 | super(queryWord); 25 | } 26 | 27 | @Override 28 | public void answer(D output) {} 29 | 30 | } 31 | -------------------------------------------------------------------------------- /oracles/membership-oracles/src/test/resources/stateful_sul.py: -------------------------------------------------------------------------------- 1 | #!/bin/python 2 | from pathlib import Path 3 | 4 | import sys 5 | import pickle 6 | import os.path 7 | 8 | def main(): 9 | folder = Path(sys.argv[0]).parent 10 | path = os.path.join(folder, "state.p") 11 | argv = 1 12 | 13 | if os.path.isfile(path): 14 | argv = pickle.load(open(path, "rb")) 15 | 16 | if len(sys.argv) > 1: # arg mode 17 | for arg in sys.argv[1:]: 18 | if arg == "reset": 19 | argv = 1 20 | else: 21 | argv += 1 22 | print(sum([ord(c) for c in arg])) 23 | print(arg, file=sys.stderr) 24 | else: # stdin mode 25 | for line in sys.stdin: 26 | for arg in line.split(): 27 | if arg == "reset": 28 | argv = 1 29 | else: 30 | argv += 1 31 | print(sum([ord(c) for c in arg])) 32 | print(arg, file=sys.stderr) 33 | 34 | pickle.dump(argv, open(path, "wb")) 35 | sys.exit(argv % 2) 36 | 37 | if __name__ == "__main__": 38 | main() 39 | -------------------------------------------------------------------------------- /oracles/parallelism/src/test/java/de/learnlib/oracle/parallelism/DynamicParallelSupplierTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.oracle.parallelism; 17 | 18 | public class DynamicParallelSupplierTest extends AbstractDynamicParallelOracleTest { 19 | 20 | @Override 21 | protected DynamicParallelOracleBuilder getBuilder() { 22 | return ParallelOracleBuilders.newDynamicParallelOracle(NullOracle::new); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /algorithms/active/adt/src/test/resources/adt.dot: -------------------------------------------------------------------------------- 1 | digraph g { 2 | 3 | s0 [shape="oval" label="WATER"]; 4 | s1 [shape="octagon" label="reset"]; 5 | s2 [shape="octagon" label="reset"]; 6 | s3 [shape="oval" label="POD"]; 7 | s4 [shape="oval" label="CLEAN"]; 8 | s5 [shape="oval" label="BUTTON"]; 9 | s6 [shape="box" label="s1"]; 10 | s7 [shape="box" label="s5"]; 11 | s8 [shape="octagon" label="reset"]; 12 | s9 [shape="octagon" label="reset"]; 13 | s10 [shape="oval" label="BUTTON"]; 14 | s11 [shape="oval" label="WATER"]; 15 | s12 [shape="box" label="s3"]; 16 | s13 [shape="box" label="s2"]; 17 | s14 [shape="oval" label="BUTTON"]; 18 | s15 [shape="box" label="s4"]; 19 | s16 [shape="box" label="s0"]; 20 | s0 -> s1 [label="ok"]; 21 | s0 -> s2 [label="error"]; 22 | s1 -> s3; 23 | s2 -> s4; 24 | s3 -> s5 [label="ok"]; 25 | s4 -> s6 [label="error"]; 26 | s4 -> s7 [label="ok"]; 27 | s5 -> s8 [label="coffee!"]; 28 | s5 -> s9 [label="error"]; 29 | s8 -> s10; 30 | s9 -> s11; 31 | s10 -> s12 [label="coffee!"]; 32 | s10 -> s13 [label="error"]; 33 | s11 -> s14 [label="ok"]; 34 | s14 -> s15 [label="coffee!"]; 35 | s14 -> s16 [label="error"]; 36 | 37 | } 38 | -------------------------------------------------------------------------------- /commons/counterexamples/src/main/java/de/learnlib/acex/package-info.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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 | 17 | /** 18 | * This package provides interfaces and classes for the abstract counterexample analysis framework described in the 19 | * paper An Abstract Framework for Counterexample Analysis 20 | * in Active Automata Learning by Malte Isberner and Bernhard Steffen. 21 | */ 22 | package de.learnlib.acex; 23 | -------------------------------------------------------------------------------- /algorithms/passive/ostia/src/main/java/de/learnlib/algorithm/ostia/Out.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.ostia; 17 | 18 | import org.checkerframework.checker.nullness.qual.Nullable; 19 | 20 | class Out { 21 | 22 | @Nullable IntQueue str; 23 | 24 | Out(@Nullable IntQueue str) { 25 | this.str = str; 26 | } 27 | 28 | @Override 29 | public String toString() { 30 | return String.valueOf(str); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /api/src/main/java/de/learnlib/oracle/ParallelOmegaOracle.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.oracle; 17 | 18 | /** 19 | * {@link ParallelOracle} equivalent for {@link OmegaMembershipOracle}s. 20 | * 21 | * @param 22 | * oracle state type 23 | * @param 24 | * input symbol type 25 | * @param 26 | * output domain type 27 | */ 28 | public interface ParallelOmegaOracle extends ThreadPool, OmegaMembershipOracle {} 29 | -------------------------------------------------------------------------------- /filters/cache/src/test/java/de/learnlib/filter/cache/dfa/DFADAGCacheTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.cache.dfa; 17 | 18 | import de.learnlib.oracle.MembershipOracle.DFAMembershipOracle; 19 | 20 | public class DFADAGCacheTest extends AbstractDFACacheTest { 21 | 22 | @Override 23 | protected DFACacheOracle getCache(DFAMembershipOracle delegate) { 24 | return DFACaches.createCache(getAlphabet(), delegate); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /oracles/parallelism/src/test/java/de/learnlib/oracle/parallelism/DynamicParallelOmegaSupplierTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.oracle.parallelism; 17 | 18 | public class DynamicParallelOmegaSupplierTest extends AbstractDynamicParallelOmegaOracleTest { 19 | 20 | @Override 21 | protected DynamicParallelOmegaOracleBuilder getBuilder() { 22 | return ParallelOracleBuilders.newDynamicParallelOmegaOracle(NullOracle::new); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /filters/cache/src/test/java/de/learnlib/filter/cache/dfa/DFATreeCacheTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.cache.dfa; 17 | 18 | import de.learnlib.oracle.MembershipOracle.DFAMembershipOracle; 19 | 20 | public class DFATreeCacheTest extends AbstractDFACacheTest { 21 | 22 | @Override 23 | protected DFACacheOracle getCache(DFAMembershipOracle delegate) { 24 | return DFACaches.createTreeCache(getAlphabet(), delegate); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /oracles/parallelism/src/test/java/de/learnlib/oracle/parallelism/DynamicParallelAdaptiveSupplierTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.oracle.parallelism; 17 | 18 | public class DynamicParallelAdaptiveSupplierTest extends AbstractDynamicParallelAdaptiveOracleTest { 19 | 20 | @Override 21 | protected DynamicParallelAdaptiveOracleBuilder getBuilder() { 22 | return ParallelOracleBuilders.newDynamicParallelAdaptiveOracle(NullOracle::new); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /oracles/parallelism/src/test/java/de/learnlib/oracle/parallelism/DynamicParallelTimedSupplierTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.oracle.parallelism; 17 | 18 | public class DynamicParallelTimedSupplierTest extends AbstractDynamicParallelTimedQueryOracleTest { 19 | 20 | @Override 21 | protected DynamicParallelTimedQueryOracleBuilder getBuilder() { 22 | return ParallelOracleBuilders.newDynamicParallelTimedQueryOracle(NullOracle::new); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /commons/datastructures/src/main/java/de/learnlib/datastructure/pta/Color.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.datastructure.pta; 17 | 18 | /** 19 | * Indicates the coloring of states of the prefix-tree acceptor during merging. 20 | */ 21 | public enum Color { 22 | /** 23 | * Indicates a blue state. 24 | */ 25 | BLUE, 26 | /** 27 | * Indicates a red state. 28 | */ 29 | RED, 30 | /** 31 | * Indicates a white state. 32 | */ 33 | WHITE 34 | } 35 | -------------------------------------------------------------------------------- /oracles/parallelism/src/test/java/de/learnlib/oracle/parallelism/DynamicParallelSULTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.oracle.parallelism; 17 | 18 | import net.automatalib.word.Word; 19 | 20 | public class DynamicParallelSULTest extends AbstractDynamicParallelOracleTest> { 21 | 22 | @Override 23 | protected DynamicParallelOracleBuilder> getBuilder() { 24 | return ParallelOracleBuilders.newDynamicParallelOracle(new NullSUL()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /algorithms/active/observation-pack/src/test/resources/hyp.dot: -------------------------------------------------------------------------------- 1 | digraph g { 2 | 3 | s0 [shape="circle" label="q0"]; 4 | s1 [shape="circle" label="q1"]; 5 | s2 [shape="circle" label="q2"]; 6 | s3 [shape="circle" label="q3"]; 7 | s4 [shape="circle" label="q4"]; 8 | s5 [shape="circle" label="q5"]; 9 | s0 -> s2 [style="bold" label="WATER"]; 10 | s0 -> s4 [style="bold" label="POD"]; 11 | s0 -> s1 [style="bold" label="BUTTON"]; 12 | s0 -> s0 [label="CLEAN"]; 13 | s1 -> s1 [label="WATER"]; 14 | s1 -> s1 [label="POD"]; 15 | s1 -> s1 [label="BUTTON"]; 16 | s1 -> s1 [label="CLEAN"]; 17 | s2 -> s2 [label="WATER"]; 18 | s2 -> s3 [style="bold" label="POD"]; 19 | s2 -> s1 [label="BUTTON"]; 20 | s2 -> s0 [label="CLEAN"]; 21 | s3 -> s3 [label="WATER"]; 22 | s3 -> s3 [label="POD"]; 23 | s3 -> s5 [style="bold" label="BUTTON"]; 24 | s3 -> s0 [label="CLEAN"]; 25 | s4 -> s3 [label="WATER"]; 26 | s4 -> s4 [label="POD"]; 27 | s4 -> s1 [label="BUTTON"]; 28 | s4 -> s0 [label="CLEAN"]; 29 | s5 -> s1 [label="WATER"]; 30 | s5 -> s1 [label="POD"]; 31 | s5 -> s1 [label="BUTTON"]; 32 | s5 -> s0 [label="CLEAN"]; 33 | 34 | __start0 [label="" shape="none" width="0" height="0"]; 35 | __start0 -> s0; 36 | 37 | } 38 | -------------------------------------------------------------------------------- /commons/settings/src/main/java/de/learnlib/setting/sources/LearnLibSystemPropertiesSource.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.setting.sources; 17 | 18 | import de.learnlib.setting.LearnLibSettingsSource; 19 | import net.automatalib.common.util.setting.AbstractSystemPropertiesSource; 20 | import org.kohsuke.MetaInfServices; 21 | 22 | @MetaInfServices(LearnLibSettingsSource.class) 23 | public class LearnLibSystemPropertiesSource extends AbstractSystemPropertiesSource implements LearnLibSettingsSource {} 24 | -------------------------------------------------------------------------------- /api/src/main/java/de/learnlib/filter/FilterResponse.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter; 17 | 18 | /** 19 | * Describes the possible responses of a {@link SymbolFilter}. 20 | */ 21 | public enum FilterResponse { 22 | /** 23 | * Indicates that a transition is relevant and should be included in, e.g., hypothesis construction. 24 | */ 25 | ACCEPT, 26 | /** 27 | * Indicates that a transition can be ignored for, e.g., hypothesis construction. 28 | */ 29 | IGNORE 30 | } 31 | -------------------------------------------------------------------------------- /oracles/parallelism/src/test/java/de/learnlib/oracle/parallelism/DynamicParallelSLISULTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.oracle.parallelism; 17 | 18 | import net.automatalib.word.Word; 19 | 20 | public class DynamicParallelSLISULTest extends AbstractDynamicParallelOracleTest> { 21 | 22 | @Override 23 | protected DynamicParallelOracleBuilder> getBuilder() { 24 | return ParallelOracleBuilders.newDynamicParallelOracle(new NullSUL(), null); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /algorithms/active/observation-pack-vpa/src/main/java/de/learnlib/algorithm/observationpack/vpa/hypothesis/HypIntTrans.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.observationpack.vpa.hypothesis; 17 | 18 | /** 19 | * Internal transition. 20 | * 21 | * @param 22 | * input symbol type 23 | */ 24 | public class HypIntTrans extends AbstractHypTrans { 25 | 26 | public HypIntTrans(HypLoc src, I intSym) { 27 | super(src.getAccessSequence().append(intSym)); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /drivers/basic/src/main/java/de/learnlib/driver/reflect/VoidOutput.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.driver.reflect; 17 | 18 | /** 19 | * The (empty) output of a void method call. 20 | */ 21 | public final class VoidOutput extends MethodOutput { 22 | 23 | public static final VoidOutput INSTANCE = new VoidOutput(); 24 | 25 | private VoidOutput() { 26 | // prevent instantiation 27 | } 28 | 29 | @Override 30 | public String toString() { 31 | return "void"; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /filters/cache/src/test/java/de/learnlib/filter/cache/mealy/MealyDAGCacheTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.cache.mealy; 17 | 18 | import de.learnlib.oracle.MembershipOracle.MealyMembershipOracle; 19 | 20 | public class MealyDAGCacheTest extends AbstractMealyCacheTest { 21 | 22 | @Override 23 | protected MealyCacheOracle getCache(MealyMembershipOracle delegate) { 24 | return MealyCaches.createCache(getAlphabet(), delegate); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /filters/cache/src/test/java/de/learnlib/filter/cache/moore/MooreDAGCacheTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.cache.moore; 17 | 18 | import de.learnlib.oracle.MembershipOracle.MooreMembershipOracle; 19 | 20 | public class MooreDAGCacheTest extends AbstractMooreCacheTest { 21 | 22 | @Override 23 | protected MooreCacheOracle getCache(MooreMembershipOracle delegate) { 24 | return MooreCaches.createCache(getAlphabet(), delegate); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /filters/cache/src/test/java/de/learnlib/filter/cache/mealy/MealyTreeCacheTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.cache.mealy; 17 | 18 | import de.learnlib.oracle.MembershipOracle.MealyMembershipOracle; 19 | 20 | public class MealyTreeCacheTest extends AbstractMealyCacheTest { 21 | 22 | @Override 23 | protected MealyCacheOracle getCache(MealyMembershipOracle delegate) { 24 | return MealyCaches.createTreeCache(getAlphabet(), delegate); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /filters/cache/src/test/java/de/learnlib/filter/cache/moore/MooreTreeCacheTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.cache.moore; 17 | 18 | import de.learnlib.oracle.MembershipOracle.MooreMembershipOracle; 19 | 20 | public class MooreTreeCacheTest extends AbstractMooreCacheTest { 21 | 22 | @Override 23 | protected MooreCacheOracle getCache(MooreMembershipOracle delegate) { 24 | return MooreCaches.createTreeCache(getAlphabet(), delegate); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /algorithms/active/lambda/src/main/java/de/learnlib/algorithm/lambda/ttt/mealy/MealyTransition.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.lambda.ttt.mealy; 17 | 18 | import de.learnlib.algorithm.lambda.ttt.dt.DTLeaf; 19 | import net.automatalib.word.Word; 20 | 21 | class MealyTransition { 22 | 23 | final DTLeaf> source; 24 | final I input; 25 | 26 | MealyTransition(DTLeaf> source, I input) { 27 | this.source = source; 28 | this.input = input; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /filters/cache/src/test/java/de/learnlib/filter/cache/mealy/DynamicMealyTreeCacheTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.cache.mealy; 17 | 18 | import de.learnlib.oracle.MembershipOracle.MealyMembershipOracle; 19 | 20 | public class DynamicMealyTreeCacheTest extends AbstractMealyCacheTest { 21 | 22 | @Override 23 | protected MealyCacheOracle getCache(MealyMembershipOracle delegate) { 24 | return MealyCaches.createDynamicTreeCache(delegate); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /oracles/parallelism/src/test/java/de/learnlib/oracle/parallelism/DynamicParallelObservableSULTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.oracle.parallelism; 17 | 18 | import net.automatalib.word.Word; 19 | 20 | public class DynamicParallelObservableSULTest extends AbstractDynamicParallelOmegaOracleTest> { 21 | 22 | @Override 23 | protected DynamicParallelOmegaOracleBuilder> getBuilder() { 24 | return ParallelOracleBuilders.newDynamicParallelOmegaOracle(new NullSUL()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /algorithms/passive/ostia/src/main/java/de/learnlib/algorithm/ostia/Edge.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.ostia; 17 | 18 | import org.checkerframework.checker.nullness.qual.Nullable; 19 | 20 | class Edge { 21 | 22 | @Nullable IntQueue out; 23 | State target; 24 | 25 | Edge() {} 26 | 27 | Edge(Edge edge) { 28 | out = IntQueue.copyAndConcat(edge.out, null); 29 | target = edge.target; 30 | } 31 | 32 | @Override 33 | public String toString() { 34 | return String.valueOf(target); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /drivers/basic/src/main/java/de/learnlib/driver/reflect/Unobserved.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.driver.reflect; 17 | 18 | /** 19 | * An artificial output symbol for a (non-executed) input after an exception has occurred. 20 | */ 21 | public final class Unobserved extends MethodOutput { 22 | 23 | public static final Unobserved INSTANCE = new Unobserved(); 24 | 25 | private Unobserved() { 26 | // prevent instantiation 27 | } 28 | 29 | @Override 30 | public String toString() { 31 | return "unobserved"; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /test-support/learning-examples/src/main/resources/mmlt/Oven.dot: -------------------------------------------------------------------------------- 1 | // Model of an oven with a time-controlled baking program. 2 | // After powering the oven on, the oven remains idle until the program is started. 3 | // During the program, the oven regularly measures and adjusts the temperature. 4 | // At the end of the program, an alarm sounds. Then, the user may extend the program. 5 | // If not extended, the program ends either when the user opens the door, presses a button, or a timeout occurs. 6 | digraph g { 7 | 8 | s0 [shape="circle"]; 9 | s1 [timers="a=3500,b=300000" shape="circle"]; 10 | s2 [timers="a=5000" shape="circle"]; 11 | s3 [shape="circle"]; 12 | s0 -> s3 [label="User.Power / void"]; 13 | s0 -> s1 [resets="a,b" label="User.Start / Temp.on"]; 14 | s1 -> s0 [label="User.Stop / Temp.off"]; 15 | s1 -> s1 [resets="a" label="to[a] / Temp.adjust"]; 16 | s1 -> s2 [resets="a" label="to[b] / Alarm.start,Temp.off"]; 17 | s2 -> s1 [resets="a,b" label="User.Extend / Alarm.stop,Temp.on"]; 18 | s2 -> s0 [label="User.Open / Alarm.stop"]; 19 | s2 -> s0 [label="User.Stop / Alarm.stop"]; 20 | s2 -> s0 [label="to[a] / Alarm.stop"]; 21 | s3 -> s0 [label="User.Power / void"]; 22 | 23 | __start0 [label="" shape="none" width="0" height="0"]; 24 | __start0 -> s3; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /filters/statistics/src/main/java/de/learnlib/filter/statistic/container/TextContainer.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.statistic.container; 17 | 18 | class TextContainer implements StatisticContainer { 19 | 20 | private String text; 21 | 22 | TextContainer() { 23 | this.text = ""; 24 | } 25 | 26 | String getText() { 27 | return text; 28 | } 29 | 30 | void setText(String text) { 31 | this.text = text; 32 | } 33 | 34 | @Override 35 | public String toString() { 36 | return text; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /commons/settings/src/main/java/de/learnlib/setting/sources/LearnLibLocalPropertiesSource.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.setting.sources; 17 | 18 | import de.learnlib.setting.LearnLibSettingsSource; 19 | import net.automatalib.common.util.setting.LocalFileSource; 20 | import org.kohsuke.MetaInfServices; 21 | 22 | @MetaInfServices(LearnLibSettingsSource.class) 23 | public class LearnLibLocalPropertiesSource extends LocalFileSource implements LearnLibSettingsSource { 24 | 25 | public LearnLibLocalPropertiesSource() { 26 | super("./learnlib.properties"); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /algorithms/active/observation-pack-vpa/src/main/java/de/learnlib/algorithm/observationpack/vpa/hypothesis/HypRetTrans.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.observationpack.vpa.hypothesis; 17 | 18 | /** 19 | * Return transition. 20 | * 21 | * @param 22 | * input symbol type 23 | */ 24 | public class HypRetTrans extends AbstractHypTrans { 25 | 26 | public HypRetTrans(HypLoc src, I retSym, I callSym, HypLoc stackLoc) { 27 | super(stackLoc.getAccessSequence().append(callSym).concat(src.getAccessSequence().append(retSym))); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /algorithms/active/lambda/src/main/java/de/learnlib/algorithm/lambda/ttt/pt/PTNode.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.lambda.ttt.pt; 17 | 18 | import de.learnlib.algorithm.lambda.ttt.dt.DTLeaf; 19 | import net.automatalib.word.Word; 20 | import org.checkerframework.checker.nullness.qual.Nullable; 21 | 22 | public interface PTNode { 23 | 24 | Word word(); 25 | 26 | PTNode append(I a); 27 | 28 | void setState(DTLeaf node); 29 | 30 | DTLeaf state(); 31 | 32 | @Nullable PTNode succ(I a); 33 | 34 | void makeShortPrefix(); 35 | } 36 | -------------------------------------------------------------------------------- /commons/settings/src/main/java/de/learnlib/setting/sources/LearnLibPropertiesSource.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.setting.sources; 17 | 18 | import de.learnlib.setting.LearnLibSettingsSource; 19 | import net.automatalib.common.util.setting.AbstractClassPathFileSource; 20 | import org.kohsuke.MetaInfServices; 21 | 22 | @MetaInfServices(LearnLibSettingsSource.class) 23 | public class LearnLibPropertiesSource extends AbstractClassPathFileSource implements LearnLibSettingsSource { 24 | 25 | public LearnLibPropertiesSource() { 26 | super("learnlib.properties"); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /algorithms/active/lambda/src/main/java/de/learnlib/algorithm/lambda/ttt/dt/Children.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.lambda.ttt.dt; 17 | 18 | import java.util.Collection; 19 | 20 | import org.checkerframework.checker.nullness.qual.Nullable; 21 | 22 | public interface Children { 23 | 24 | @Nullable AbstractDTNode child(D out); 25 | 26 | D key(AbstractDTNode child); 27 | 28 | void addChild(D out, AbstractDTNode child); 29 | 30 | void replace(DTLeaf oldNode, DTInnerNode newNode); 31 | 32 | Collection> all(); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /algorithms/active/ttt/src/main/java/de/learnlib/algorithm/ttt/dfa/TTTStateDFA.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.ttt.dfa; 17 | 18 | import de.learnlib.algorithm.ttt.base.TTTState; 19 | import de.learnlib.algorithm.ttt.base.TTTTransition; 20 | 21 | public class TTTStateDFA extends TTTState { 22 | 23 | boolean accepting; 24 | 25 | public TTTStateDFA(int alphabetSize, TTTTransition parentTransition, int id) { 26 | super(alphabetSize, parentTransition, id); 27 | } 28 | 29 | public boolean isAccepting() { 30 | return accepting; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /api/src/main/java/de/learnlib/AccessSequenceProvider.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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; 17 | 18 | import net.automatalib.word.Word; 19 | 20 | /** 21 | * Common interface for objects that have an access sequence associated with them (e.g., states and transitions of a 22 | * hypotheses). 23 | * 24 | * @param 25 | * input symbol type 26 | */ 27 | @FunctionalInterface 28 | public interface AccessSequenceProvider { 29 | 30 | /** 31 | * Retrieves the access sequence of this object. 32 | * 33 | * @return the access sequence 34 | */ 35 | Word getAccessSequence(); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /algorithms/active/aaar/src/test/java/de/learnlib/algorithm/aaar/ComboConstructor.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.aaar; 17 | 18 | import de.learnlib.algorithm.LearnerConstructor; 19 | import de.learnlib.algorithm.LearningAlgorithm; 20 | import net.automatalib.alphabet.SupportsGrowingAlphabet; 21 | 22 | /** 23 | * Utility interface to establish the combined learner constraints on {@link LearningAlgorithm} and 24 | * {@link SupportsGrowingAlphabet}. 25 | */ 26 | public interface ComboConstructor & SupportsGrowingAlphabet, I, D> 27 | extends LearnerConstructor {} 28 | -------------------------------------------------------------------------------- /api/src/main/java/de/learnlib/oracle/OmegaQueryAnswerer.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.oracle; 17 | 18 | import de.learnlib.query.OmegaQuery; 19 | import net.automatalib.common.util.Pair; 20 | import net.automatalib.word.Word; 21 | import org.checkerframework.checker.nullness.qual.Nullable; 22 | 23 | /** 24 | * Answers {@link OmegaQuery}s. 25 | * 26 | * @see OmegaMembershipOracle 27 | * @see QueryAnswerer 28 | */ 29 | public interface OmegaQueryAnswerer { 30 | 31 | Pair<@Nullable D, Integer> answerQuery(Word prefix, Word loop, int repeat); 32 | 33 | OmegaMembershipOracle asOracle(); 34 | } 35 | -------------------------------------------------------------------------------- /algorithms/active/lsharp/src/main/java/de/learnlib/algorithm/lsharp/ads/ArenaNode.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.lsharp.ads; 17 | 18 | import net.automatalib.common.util.Pair; 19 | import org.checkerframework.checker.nullness.qual.Nullable; 20 | 21 | public class ArenaNode { 22 | 23 | public final @Nullable Pair parent; 24 | public final T value; 25 | 26 | public ArenaNode(@Nullable Pair parent, T value) { 27 | this.parent = parent; 28 | this.value = value; 29 | } 30 | 31 | public ArenaNode(T value) { 32 | this(null, value); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /filters/cache/src/test/java/de/learnlib/filter/cache/mealy/MealyDAGMapperCacheTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.cache.mealy; 17 | 18 | import de.learnlib.oracle.MembershipOracle.MealyMembershipOracle; 19 | 20 | public class MealyDAGMapperCacheTest extends AbstractMealyCacheTest { 21 | 22 | @Override 23 | protected MealyCacheOracle getCache(MealyMembershipOracle delegate) { 24 | return MealyCaches.createDAGCache(getAlphabet(), super.errorMapper, delegate); 25 | } 26 | 27 | @Override 28 | protected boolean usesMapping() { 29 | return true; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /filters/cache/src/test/java/de/learnlib/filter/cache/moore/MooreDAGMapperCacheTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.cache.moore; 17 | 18 | import de.learnlib.oracle.MembershipOracle.MooreMembershipOracle; 19 | 20 | public class MooreDAGMapperCacheTest extends AbstractMooreCacheTest { 21 | 22 | @Override 23 | protected MooreCacheOracle getCache(MooreMembershipOracle delegate) { 24 | return MooreCaches.createDAGCache(getAlphabet(), super.errorMapper, delegate); 25 | } 26 | 27 | @Override 28 | protected boolean usesMapping() { 29 | return true; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /oracles/parallelism/src/test/java/de/learnlib/oracle/parallelism/DynamicParallelTimedSULTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.oracle.parallelism; 17 | 18 | import de.learnlib.time.MMLTModelParams; 19 | 20 | public class DynamicParallelTimedSULTest extends AbstractDynamicParallelTimedQueryOracleTest { 21 | 22 | @Override 23 | protected DynamicParallelTimedQueryOracleBuilder getBuilder() { 24 | return ParallelOracleBuilders.newDynamicParallelTimedQueryOracle(new NullSUL(), 25 | new MMLTModelParams<>(null, null, 0, 0)); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /filters/cache/src/test/java/de/learnlib/filter/cache/mealy/MealyTreeMapperCacheTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.cache.mealy; 17 | 18 | import de.learnlib.oracle.MembershipOracle.MealyMembershipOracle; 19 | 20 | public class MealyTreeMapperCacheTest extends AbstractMealyCacheTest { 21 | 22 | @Override 23 | protected MealyCacheOracle getCache(MealyMembershipOracle delegate) { 24 | return MealyCaches.createTreeCache(getAlphabet(), super.errorMapper, delegate); 25 | } 26 | 27 | @Override 28 | protected boolean usesMapping() { 29 | return true; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /filters/cache/src/test/java/de/learnlib/filter/cache/moore/MooreTreeMapperCacheTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.cache.moore; 17 | 18 | import de.learnlib.oracle.MembershipOracle.MooreMembershipOracle; 19 | 20 | public class MooreTreeMapperCacheTest extends AbstractMooreCacheTest { 21 | 22 | @Override 23 | protected MooreCacheOracle getCache(MooreMembershipOracle delegate) { 24 | return MooreCaches.createTreeCache(getAlphabet(), super.errorMapper, delegate); 25 | } 26 | 27 | @Override 28 | protected boolean usesMapping() { 29 | return true; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /algorithms/active/observation-pack-vpa/src/test/resources/dt.dot: -------------------------------------------------------------------------------- 1 | digraph g { 2 | 3 | s0 [shape="oval" label="<ε, ε>"]; 4 | s1 [shape="oval" label="<ε, a>"]; 5 | s2 [shape="box" label="4"]; 6 | s3 [shape="oval" label="<ε, b>"]; 7 | s4 [shape="oval" label="<ε, 1 x>"]; 8 | s5 [shape="box" label="6"]; 9 | s6 [shape="box" label="7"]; 10 | s7 [shape="box" label="0"]; 11 | s8 [shape="oval" label="<ε, b>"]; 12 | s9 [shape="oval" label="<ε, 1 a x>"]; 13 | s10 [shape="box" label="5"]; 14 | s11 [shape="oval" label="<ε, c>"]; 15 | s12 [shape="box" label="9"]; 16 | s13 [shape="box" label="2"]; 17 | s14 [shape="oval" label="<ε, c>"]; 18 | s15 [shape="box" label="1"]; 19 | s16 [shape="oval" label="<ε, 1 x>"]; 20 | s17 [shape="box" label="8"]; 21 | s18 [shape="box" label="3"]; 22 | s0 -> s1 [label="false"]; 23 | s0 -> s8 [label="true"]; 24 | s1 -> s2 [label="false"]; 25 | s1 -> s3 [label="true"]; 26 | s3 -> s4 [label="false"]; 27 | s3 -> s7 [label="true"]; 28 | s4 -> s5 [label="false"]; 29 | s4 -> s6 [label="true"]; 30 | s8 -> s9 [label="false"]; 31 | s8 -> s14 [label="true"]; 32 | s9 -> s10 [label="false"]; 33 | s9 -> s11 [label="true"]; 34 | s11 -> s12 [label="false"]; 35 | s11 -> s13 [label="true"]; 36 | s14 -> s15 [label="false"]; 37 | s14 -> s16 [label="true"]; 38 | s16 -> s17 [label="false"]; 39 | s16 -> s18 [label="true"]; 40 | 41 | } 42 | -------------------------------------------------------------------------------- /filters/symbol-filters/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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 | 17 | /** 18 | * This module provides a collection of symbol filters. 19 | *

20 | * This module is provided by the following Maven dependency: 21 | *

22 |  * <dependency>
23 |  *   <groupId>de.learnlib</groupId>
24 |  *   <artifactId>learnlib-symbol-filters</artifactId>
25 |  *   <version>${version}</version>
26 |  * </dependency>
27 |  * 
28 | */ 29 | open module de.learnlib.filter.symbol { 30 | 31 | requires de.learnlib.api; 32 | requires net.automatalib.api; 33 | 34 | exports de.learnlib.filter.symbol; 35 | } 36 | -------------------------------------------------------------------------------- /filters/cache/src/test/java/de/learnlib/filter/cache/mealy/DynamicMealyTreeMapperCacheTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.cache.mealy; 17 | 18 | import de.learnlib.oracle.MembershipOracle.MealyMembershipOracle; 19 | 20 | public class DynamicMealyTreeMapperCacheTest extends AbstractMealyCacheTest { 21 | 22 | @Override 23 | protected MealyCacheOracle getCache(MealyMembershipOracle delegate) { 24 | return MealyCaches.createDynamicTreeCache(super.errorMapper, delegate); 25 | } 26 | 27 | @Override 28 | protected boolean usesMapping() { 29 | return true; 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /commons/util/src/main/java/de/learnlib/util/MQUtil.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.util; 17 | 18 | import java.util.Objects; 19 | 20 | import de.learnlib.query.DefaultQuery; 21 | import net.automatalib.automaton.concept.SuffixOutput; 22 | 23 | public final class MQUtil { 24 | 25 | private MQUtil() { 26 | // prevent instantiation 27 | } 28 | 29 | public static boolean isCounterexample(DefaultQuery query, SuffixOutput hyp) { 30 | D qryOut = query.getOutput(); 31 | D hypOut = hyp.computeSuffixOutput(query.getPrefix(), query.getSuffix()); 32 | return !Objects.equals(qryOut, hypOut); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /filters/symbol-filters/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | de.learnlib 7 | learnlib-filters-parent 8 | 0.19.0-SNAPSHOT 9 | ../pom.xml 10 | 11 | 12 | learnlib-symbol-filters 13 | 14 | LearnLib :: Filters :: Symbol Filters 15 | A collection of symbol filters 16 | 17 | 18 | 19 | 20 | de.learnlib 21 | learnlib-api 22 | 23 | 24 | 25 | 26 | net.automatalib 27 | automata-api 28 | 29 | 30 | 31 | 32 | org.testng 33 | testng 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /api/src/main/java/de/learnlib/exception/BatchInterruptedException.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.exception; 17 | 18 | import java.util.Collection; 19 | 20 | import de.learnlib.oracle.BatchProcessor; 21 | 22 | /** 23 | * Exception that is thrown if a parallel batch is interrupted during processing. Note that we cannot rethrow the {@link 24 | * InterruptedException} since the {@code throws} specification of {@link BatchProcessor#processBatch(Collection)} does 25 | * not allow doing so. 26 | */ 27 | public class BatchInterruptedException extends RuntimeException { 28 | 29 | public BatchInterruptedException(Throwable cause) { 30 | super(cause); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /api/src/main/java/de/learnlib/oracle/ParallelOracle.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.oracle; 17 | 18 | /** 19 | * Basic interface for {@link MembershipOracle}s that can process queries in parallel. 20 | *

21 | * Parallel oracles usually use one or more dedicated worker threads in which the processing of queries is performed. 22 | * Since these do not have a defined life span, they must be terminated explicitly using {@link #shutdown()} or {@link 23 | * #shutdownNow()}. 24 | * 25 | * @param 26 | * input symbol type 27 | * @param 28 | * output domain type 29 | */ 30 | public interface ParallelOracle extends ThreadPool, MembershipOracle {} 31 | -------------------------------------------------------------------------------- /api/src/main/java/de/learnlib/sul/ExecutableInput.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.sul; 17 | 18 | import de.learnlib.exception.SULException; 19 | 20 | /** 21 | * An executable input is an input that performs a specific action on a {@link SUL} itself. 22 | * 23 | * @param 24 | * output 25 | */ 26 | @FunctionalInterface 27 | public interface ExecutableInput { 28 | 29 | /** 30 | * Executes {@code this} input symbol. 31 | * 32 | * @return the output generated by the {@link SUL} 33 | * 34 | * @throws SULException 35 | * if {@code this} input cannot be executed on the {@link SUL} 36 | */ 37 | O execute(); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /filters/cache/src/main/java/de/learnlib/filter/cache/DynamicSymbolComparator.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.cache; 17 | 18 | import java.util.Comparator; 19 | 20 | import net.automatalib.alphabet.impl.GrowingMapAlphabet; 21 | 22 | public final class DynamicSymbolComparator implements Comparator { 23 | 24 | private final GrowingMapAlphabet alphabet; 25 | 26 | public DynamicSymbolComparator() { 27 | this.alphabet = new GrowingMapAlphabet<>(); 28 | } 29 | 30 | @Override 31 | public int compare(I i1, I i2) { 32 | alphabet.addSymbol(i1); 33 | alphabet.addSymbol(i2); 34 | return alphabet.compare(i1, i2); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /filters/cache/src/main/java/de/learnlib/filter/cache/ReverseLexCmp.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.cache; 17 | 18 | import java.util.Comparator; 19 | 20 | import de.learnlib.query.Query; 21 | import net.automatalib.common.util.comparison.CmpUtil; 22 | 23 | public final class ReverseLexCmp implements Comparator> { 24 | 25 | private final Comparator comparator; 26 | 27 | public ReverseLexCmp(Comparator comparator) { 28 | this.comparator = comparator; 29 | } 30 | 31 | @Override 32 | public int compare(Query o1, Query o2) { 33 | return -CmpUtil.lexCompare(o1.getInput(), o2.getInput(), comparator); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /filters/statistics/src/main/java/de/learnlib/filter/statistic/container/FlagContainer.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.statistic.container; 17 | 18 | /** 19 | * A boolean flag that is unset by default and can be set. 20 | */ 21 | class FlagContainer implements StatisticContainer { 22 | 23 | private boolean flagged; 24 | 25 | FlagContainer() { 26 | this.flagged = false; 27 | } 28 | 29 | void setFlag(boolean value) { 30 | this.flagged = value; 31 | } 32 | 33 | boolean isFlagged() { 34 | return flagged; 35 | } 36 | 37 | @Override 38 | public String toString() { 39 | return Boolean.toString(flagged); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /algorithms/active/adt/src/main/java/de/learnlib/algorithm/adt/config/model/ADSCalculator.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.adt.config.model; 17 | 18 | import java.util.Optional; 19 | import java.util.Set; 20 | 21 | import de.learnlib.algorithm.adt.adt.ADTNode; 22 | import net.automatalib.alphabet.Alphabet; 23 | import net.automatalib.automaton.transducer.MealyMachine; 24 | 25 | @FunctionalInterface 26 | public interface ADSCalculator { 27 | 28 | Optional> compute(MealyMachine hypothesis, 29 | Alphabet alphabet, 30 | Set targets); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /algorithms/active/lambda/src/test/java/de/learnlib/algorithm/lambda/ttt/dfa/TTTLambdaDFAGrowingAlphabetTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.lambda.ttt.dfa; 17 | 18 | import de.learnlib.oracle.MembershipOracle.DFAMembershipOracle; 19 | import de.learnlib.testsupport.AbstractGrowingAlphabetDFATest; 20 | import net.automatalib.alphabet.Alphabet; 21 | 22 | public class TTTLambdaDFAGrowingAlphabetTest extends AbstractGrowingAlphabetDFATest> { 23 | 24 | @Override 25 | protected TTTLambdaDFA getLearner(DFAMembershipOracle oracle, Alphabet alphabet) { 26 | return new TTTLambdaDFA<>(alphabet, oracle); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /algorithms/passive/ostia/src/main/java/de/learnlib/algorithm/ostia/Blue.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.ostia; 17 | 18 | import org.checkerframework.checker.nullness.qual.Nullable; 19 | 20 | class Blue { 21 | 22 | final State parent; 23 | final int symbol; 24 | 25 | Blue(State parent, int symbol) { 26 | this.symbol = symbol; 27 | this.parent = parent; 28 | } 29 | 30 | @Nullable State state() { 31 | final @Nullable Edge edge = parent.transitions[symbol]; 32 | assert edge != null; 33 | return edge.target; 34 | } 35 | 36 | @Override 37 | public String toString() { 38 | return String.valueOf(state()); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /algorithms/active/ttt/src/main/java/de/learnlib/algorithm/ttt/mealy/TTTTransitionMealy.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.ttt.mealy; 17 | 18 | import de.learnlib.algorithm.ttt.base.TTTState; 19 | import de.learnlib.algorithm.ttt.base.TTTTransition; 20 | import net.automatalib.word.Word; 21 | 22 | public class TTTTransitionMealy extends TTTTransition> { 23 | 24 | O output; 25 | 26 | public TTTTransitionMealy(TTTState> source, I input) { 27 | super(source, input); 28 | } 29 | 30 | public O getOutput() { 31 | return this.output; 32 | } 33 | 34 | @Override 35 | public Object getProperty() { 36 | return output; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /filters/symbol-filters/src/main/java/de/learnlib/filter/symbol/IgnoreAllSymbolFilter.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.symbol; 17 | 18 | import de.learnlib.filter.FilterResponse; 19 | import de.learnlib.filter.SymbolFilter; 20 | import net.automatalib.word.Word; 21 | 22 | /** 23 | * A pass-through filter that ignores all inputs. 24 | * 25 | * @param 26 | * input symbol type of the prefix 27 | * @param 28 | * input symbol type of the transition label 29 | */ 30 | public class IgnoreAllSymbolFilter implements SymbolFilter { 31 | 32 | @Override 33 | public FilterResponse query(Word prefix, V symbol) { 34 | return FilterResponse.IGNORE; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /algorithms/active/lambda/src/test/java/de/learnlib/algorithm/lambda/ttt/dfa/TTTLambdaDFACounterexampleQueueTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.lambda.ttt.dfa; 17 | 18 | import de.learnlib.algorithm.LearningAlgorithm.DFALearner; 19 | import de.learnlib.algorithm.lambda.AbstractCounterexampleQueueTest; 20 | import de.learnlib.oracle.MembershipOracle.DFAMembershipOracle; 21 | import net.automatalib.alphabet.Alphabet; 22 | 23 | public class TTTLambdaDFACounterexampleQueueTest extends AbstractCounterexampleQueueTest { 24 | 25 | @Override 26 | protected DFALearner getLearner(Alphabet alphabet, DFAMembershipOracle oracle) { 27 | return new TTTLambdaDFA<>(alphabet, oracle); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /commons/datastructures/src/main/java/de/learnlib/datastructure/list/AbstractIntrusiveListEntryImpl.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.datastructure.list; 17 | 18 | import net.automatalib.common.smartcollection.AbstractBasicLinkedListEntry; 19 | 20 | /** 21 | * A utility class to connect {@link AbstractBasicLinkedListEntry}s with {@link IntrusiveListEntry}s. 22 | * 23 | * @param 24 | * element type 25 | */ 26 | public abstract class AbstractIntrusiveListEntryImpl extends AbstractBasicLinkedListEntry> 27 | implements IntrusiveListEntry { 28 | 29 | protected AbstractIntrusiveListEntryImpl() { 30 | // indicate that no direct instantiation is intended 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /oracles/parallelism/src/test/java/de/learnlib/oracle/parallelism/SettingsTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.oracle.parallelism; 17 | 18 | import org.testng.Assert; 19 | import org.testng.annotations.Test; 20 | 21 | public class SettingsTest { 22 | 23 | @Test 24 | public void testDefaults() { 25 | // best-case would be to test a non-default value but that somehow slows down the tests a lot 26 | Assert.assertEquals(BatchProcessorDefaults.BATCH_SIZE, 1); 27 | Assert.assertEquals(BatchProcessorDefaults.MIN_BATCH_SIZE, 4); 28 | Assert.assertEquals(BatchProcessorDefaults.POOL_POLICY.name(), "FIXED"); 29 | Assert.assertEquals(BatchProcessorDefaults.POOL_SIZE, 5); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /algorithms/active/lambda/src/test/java/de/learnlib/algorithm/lambda/lstar/dfa/LLambdaDFAGrowingAlphabetTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.lambda.lstar.dfa; 17 | 18 | import de.learnlib.algorithm.lambda.lstar.LLambdaDFA; 19 | import de.learnlib.oracle.MembershipOracle.DFAMembershipOracle; 20 | import de.learnlib.testsupport.AbstractGrowingAlphabetDFATest; 21 | import net.automatalib.alphabet.Alphabet; 22 | 23 | public class LLambdaDFAGrowingAlphabetTest extends AbstractGrowingAlphabetDFATest> { 24 | 25 | @Override 26 | protected LLambdaDFA getLearner(DFAMembershipOracle oracle, Alphabet alphabet) { 27 | return new LLambdaDFA<>(alphabet, oracle); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /algorithms/active/lstar/src/test/java/de/learnlib/algorithm/malerpnueli/MalerPnueliDFAGrowingAlphabetTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.malerpnueli; 17 | 18 | import de.learnlib.oracle.MembershipOracle.DFAMembershipOracle; 19 | import de.learnlib.testsupport.AbstractGrowingAlphabetDFATest; 20 | import net.automatalib.alphabet.Alphabet; 21 | 22 | public class MalerPnueliDFAGrowingAlphabetTest extends AbstractGrowingAlphabetDFATest> { 23 | 24 | @Override 25 | protected MalerPnueliDFA getLearner(DFAMembershipOracle oracle, 26 | Alphabet alphabet) { 27 | return new MalerPnueliDFA<>(alphabet, oracle); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /algorithms/active/dhc/src/test/java/de/learnlib/algorithm/dhc/mealy/MealyDHCGrowingAlphabetTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.dhc.mealy; 17 | 18 | import de.learnlib.oracle.MembershipOracle.MealyMembershipOracle; 19 | import de.learnlib.testsupport.AbstractGrowingAlphabetMealyTest; 20 | import net.automatalib.alphabet.Alphabet; 21 | 22 | public class MealyDHCGrowingAlphabetTest extends AbstractGrowingAlphabetMealyTest> { 23 | 24 | @Override 25 | protected MealyDHC getLearner(MealyMembershipOracle oracle, 26 | Alphabet alphabet) { 27 | return new MealyDHC<>(alphabet, oracle); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /api/src/main/java/de/learnlib/sul/ContextHandler.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.sul; 17 | 18 | /** 19 | * Facility for creating and disposing of contexts on which {@link ContextExecutableInput}s operate. 20 | *

21 | * If used in a multi-threaded environment (e.g., {@link SUL#fork()}), an implementation of this interface must be 22 | * thread-safe, i.e., both the {@link #createContext()} and {@link #disposeContext(Object)} methods must be reentrant. 23 | * Furthermore, it must not make any assumptions as to the particular sequence in which these methods are called. 24 | * 25 | * @param 26 | * context type 27 | */ 28 | public interface ContextHandler { 29 | 30 | C createContext(); 31 | 32 | void disposeContext(C context); 33 | } 34 | -------------------------------------------------------------------------------- /api/src/main/java/de/learnlib/oracle/QueryAnswerer.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.oracle; 17 | 18 | import net.automatalib.word.Word; 19 | 20 | /** 21 | * A simple interface for answering {@link Word}-based queries. 22 | * 23 | * @param 24 | * input symbol type 25 | * @param 26 | * output domain type 27 | */ 28 | @FunctionalInterface 29 | public interface QueryAnswerer { 30 | 31 | default D answerQuery(Word input) { 32 | return answerQuery(Word.epsilon(), input); 33 | } 34 | 35 | D answerQuery(Word prefix, Word suffix); 36 | 37 | default MembershipOracle asOracle() { 38 | return queries -> queries.forEach(q -> q.answer(answerQuery(q.getPrefix(), q.getSuffix()))); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /algorithms/active/lstar/src/test/java/de/learnlib/algorithm/rivestschapire/RivestSchapireDFAGrowingAlphabetTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.rivestschapire; 17 | 18 | import de.learnlib.oracle.MembershipOracle.DFAMembershipOracle; 19 | import de.learnlib.testsupport.AbstractGrowingAlphabetDFATest; 20 | import net.automatalib.alphabet.Alphabet; 21 | 22 | public class RivestSchapireDFAGrowingAlphabetTest extends AbstractGrowingAlphabetDFATest> { 23 | 24 | @Override 25 | protected RivestSchapireDFA getLearner(DFAMembershipOracle oracle, 26 | Alphabet alphabet) { 27 | return new RivestSchapireDFA<>(alphabet, oracle); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /filters/statistics/src/test/java/de/learnlib/filter/statistic/sul/AbstractResetCounterSULTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.statistic.sul; 17 | 18 | import java.util.Collection; 19 | 20 | import de.learnlib.filter.statistic.TestQueries; 21 | import de.learnlib.query.Query; 22 | import de.learnlib.sul.SUL; 23 | import net.automatalib.word.Word; 24 | 25 | public abstract class AbstractResetCounterSULTest, I, O> 26 | extends AbstractCounterSULTest { 27 | 28 | @Override 29 | protected int getCountIncreasePerQuery() { 30 | return 1; 31 | } 32 | 33 | @Override 34 | protected Collection>> createQueries(int num) { 35 | return TestQueries.createNoopQueries(num); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /algorithms/active/aaar/src/main/java/de/learnlib/algorithm/aaar/ExplicitInitialAbstraction.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.aaar; 17 | 18 | import java.util.Collection; 19 | 20 | /** 21 | * This interface denotes an {@link Abstraction} that additionally provides an initial classification of abstract input 22 | * symbols. 23 | * 24 | * @param 25 | * abstract input symbol type 26 | * @param 27 | * concrete input symbol type 28 | */ 29 | public interface ExplicitInitialAbstraction extends Abstraction { 30 | 31 | /** 32 | * Return the initial collection of abstract symbols. 33 | * 34 | * @return the initial collection of abstract symbols 35 | */ 36 | Collection getInitialAbstracts(); 37 | } 38 | -------------------------------------------------------------------------------- /algorithms/active/aaar/src/main/java/de/learnlib/algorithm/aaar/abstraction/GenericAbstractionTree.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.aaar.abstraction; 17 | 18 | import java.util.function.Function; 19 | 20 | import de.learnlib.oracle.MembershipOracle; 21 | 22 | public class GenericAbstractionTree extends AbstractAbstractionTree { 23 | 24 | private final Function abstractor; 25 | 26 | public GenericAbstractionTree(AI rootA, CI rootC, MembershipOracle o, Function abstractor) { 27 | super(rootA, rootC, o); 28 | this.abstractor = abstractor; 29 | } 30 | 31 | @Override 32 | protected AI createAbstractionForRepresentative(CI ci) { 33 | return this.abstractor.apply(ci); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /commons/counterexamples/src/test/java/de/learnlib/counterexample/acex/DummyAcex.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.counterexample.acex; 17 | 18 | import de.learnlib.acex.AbstractCounterexample; 19 | 20 | public class DummyAcex implements AbstractCounterexample { 21 | 22 | private final int[] values; 23 | 24 | public DummyAcex(int[] values) { 25 | this.values = values.clone(); 26 | } 27 | 28 | @Override 29 | public int getLength() { 30 | return values.length; 31 | } 32 | 33 | @Override 34 | public boolean checkEffects(Integer eff1, Integer eff2) { 35 | return eff1.equals(eff2); 36 | } 37 | 38 | @Override 39 | public Integer effect(int index) { 40 | return values[index]; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /algorithms/active/lambda/src/test/java/de/learnlib/algorithm/lambda/lstar/dfa/LLambdaDFACounterexampleQueueTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.lambda.lstar.dfa; 17 | 18 | import de.learnlib.algorithm.LearningAlgorithm.DFALearner; 19 | import de.learnlib.algorithm.lambda.AbstractCounterexampleQueueTest; 20 | import de.learnlib.algorithm.lambda.lstar.LLambdaDFA; 21 | import de.learnlib.oracle.MembershipOracle.DFAMembershipOracle; 22 | import net.automatalib.alphabet.Alphabet; 23 | 24 | public class LLambdaDFACounterexampleQueueTest extends AbstractCounterexampleQueueTest { 25 | 26 | @Override 27 | protected DFALearner getLearner(Alphabet alphabet, DFAMembershipOracle oracle) { 28 | return new LLambdaDFA<>(alphabet, oracle); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /algorithms/active/ttt-vpa/src/main/java/de/learnlib/algorithm/ttt/vpa/GlobalSplitter.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.ttt.vpa; 17 | 18 | import de.learnlib.algorithm.observationpack.vpa.hypothesis.DTNode; 19 | 20 | /** 21 | * A global splitter. In addition to the information stored in a (local) {@link Splitter}, this class also stores the 22 | * block the local splitter applies to. 23 | * 24 | * @param 25 | * input symbol type 26 | */ 27 | final class GlobalSplitter { 28 | 29 | public final Splitter localSplitter; 30 | 31 | public final DTNode blockRoot; 32 | 33 | GlobalSplitter(DTNode blockRoot, Splitter localSplitter) { 34 | this.blockRoot = blockRoot; 35 | this.localSplitter = localSplitter; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /filters/statistics/src/main/java/de/learnlib/filter/statistic/container/CounterContainer.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.statistic.container; 17 | 18 | /** 19 | * A counter that can be increased and set to a particular positive number. 20 | */ 21 | class CounterContainer implements StatisticContainer { 22 | 23 | private long count; 24 | 25 | CounterContainer() { 26 | this.count = 0; 27 | } 28 | 29 | void setCount(long count) { 30 | this.count = count; 31 | } 32 | 33 | void increase(long increment) { 34 | this.count += increment; 35 | } 36 | 37 | long getCount() { 38 | return count; 39 | } 40 | 41 | @Override 42 | public String toString() { 43 | return Long.toString(count); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /commons/settings/src/main/java/de/learnlib/setting/sources/LearnLibSystemPropertiesAutomataLibSettingsSource.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.setting.sources; 17 | 18 | import net.automatalib.common.setting.AutomataLibSettingsSource; 19 | import net.automatalib.common.util.setting.AbstractSystemPropertiesSource; 20 | import org.kohsuke.MetaInfServices; 21 | 22 | @MetaInfServices(AutomataLibSettingsSource.class) 23 | public class LearnLibSystemPropertiesAutomataLibSettingsSource extends AbstractSystemPropertiesSource 24 | implements AutomataLibSettingsSource { 25 | 26 | private static final int PRIORITY_DECREASE = 10; 27 | 28 | @Override 29 | public int getPriority() { 30 | return super.getPriority() - PRIORITY_DECREASE; // bump prio down a bit 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /algorithms/active/lstar/src/main/java/de/learnlib/algorithm/lstar/dfa/LStarDFAUtil.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.lstar.dfa; 17 | 18 | import java.util.ArrayList; 19 | import java.util.List; 20 | 21 | import net.automatalib.word.Word; 22 | 23 | public final class LStarDFAUtil { 24 | 25 | private LStarDFAUtil() { 26 | // prevent instantiation 27 | } 28 | 29 | public static List> ensureSuffixCompliancy(List> suffixes) { 30 | List> compSuffixes = new ArrayList<>(); 31 | compSuffixes.add(Word.epsilon()); 32 | for (Word suff : suffixes) { 33 | if (!suff.isEmpty()) { 34 | compSuffixes.add(suff); 35 | } 36 | } 37 | 38 | return compSuffixes; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /algorithms/active/ttt/src/main/java/de/learnlib/algorithm/ttt/base/OutputInconsistency.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.ttt.base; 17 | 18 | import net.automatalib.word.Word; 19 | 20 | /** 21 | * Class for representing output inconsistencies within the TTT algorithm. 22 | * 23 | * @param 24 | * input symbol type 25 | * @param 26 | * output domain type 27 | */ 28 | public class OutputInconsistency { 29 | 30 | public final TTTState srcState; 31 | public final Word suffix; 32 | public final D targetOut; 33 | 34 | public OutputInconsistency(TTTState srcState, Word suffix, D targetOut) { 35 | this.srcState = srcState; 36 | this.suffix = suffix; 37 | this.targetOut = targetOut; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /oracles/parallelism/src/test/java/de/learnlib/oracle/parallelism/StaticParallelSupplierTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.oracle.parallelism; 17 | 18 | import de.learnlib.oracle.parallelism.AbstractDynamicBatchProcessorBuilder.StaticOracleProvider; 19 | import de.learnlib.oracle.parallelism.AbstractStaticParallelOracleTest.TestOutput; 20 | 21 | public class StaticParallelSupplierTest extends AbstractStaticParallelOracleTest { 22 | 23 | @Override 24 | protected StaticParallelOracleBuilder getBuilder() { 25 | return ParallelOracleBuilders.newStaticParallelOracle(new StaticOracleProvider<>(getOracles())); 26 | } 27 | 28 | @Override 29 | protected TestOutput extractTestOutput(TestOutput output) { 30 | return output; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /api/src/main/java/de/learnlib/oracle/SingleAdaptiveMembershipOracle.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.oracle; 17 | 18 | import java.util.Collection; 19 | 20 | import de.learnlib.query.AdaptiveQuery; 21 | 22 | /** 23 | * An {@link AdaptiveMembershipOracle} that answers single queries. 24 | * 25 | * @see AdaptiveMembershipOracle 26 | * @see SingleQueryOracle 27 | */ 28 | @FunctionalInterface 29 | public interface SingleAdaptiveMembershipOracle extends AdaptiveMembershipOracle { 30 | 31 | @Override 32 | default void processQueries(Collection> queries) { 33 | for (AdaptiveQuery query : queries) { 34 | processQuery(query); 35 | } 36 | } 37 | 38 | @Override 39 | void processQuery(AdaptiveQuery query); 40 | } 41 | -------------------------------------------------------------------------------- /algorithms/active/lstar/src/main/java/de/learnlib/algorithm/lstar/moore/LStarMooreUtil.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.lstar.moore; 17 | 18 | import java.util.ArrayList; 19 | import java.util.List; 20 | 21 | import net.automatalib.word.Word; 22 | 23 | public final class LStarMooreUtil { 24 | 25 | private LStarMooreUtil() { 26 | // prevent instantiation 27 | } 28 | 29 | public static List> ensureSuffixCompliancy(List> suffixes) { 30 | List> compSuffixes = new ArrayList<>(); 31 | compSuffixes.add(Word.epsilon()); 32 | for (Word suff : suffixes) { 33 | if (!suff.isEmpty()) { 34 | compSuffixes.add(suff); 35 | } 36 | } 37 | 38 | return compSuffixes; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /algorithms/passive/ostia/src/test/java/de/learnlib/algorithm/ostia/OSTIAIT.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.ostia; 17 | 18 | import de.learnlib.testsupport.it.AbstractSSTPassiveLearnerIT; 19 | import de.learnlib.testsupport.it.variant.PassiveLearnerVariantList; 20 | import net.automatalib.alphabet.Alphabet; 21 | import net.automatalib.automaton.transducer.SubsequentialTransducer; 22 | import net.automatalib.word.Word; 23 | 24 | public class OSTIAIT extends AbstractSSTPassiveLearnerIT { 25 | 26 | @Override 27 | protected void addLearnerVariants(Alphabet alphabet, 28 | PassiveLearnerVariantList, I, Word> variants) { 29 | variants.addLearnerVariant("OSTIA", new OSTIA<>(alphabet)); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /filters/statistics/src/main/java/de/learnlib/filter/statistic/MapStatisticsProvider.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.statistic; 17 | 18 | import de.learnlib.filter.statistic.container.MapStatisticsService; 19 | import de.learnlib.statistic.StatisticsProvider; 20 | import de.learnlib.statistic.StatisticsService; 21 | import org.kohsuke.MetaInfServices; 22 | 23 | @MetaInfServices(StatisticsProvider.class) 24 | public class MapStatisticsProvider implements StatisticsProvider { 25 | 26 | final ThreadLocal threadLocal = ThreadLocal.withInitial(MapStatisticsService::new); 27 | 28 | @Override 29 | public int getPriority() { 30 | return 0; 31 | } 32 | 33 | @Override 34 | public StatisticsService getService() { 35 | return threadLocal.get(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /algorithms/active/lstar/src/test/java/de/learnlib/algorithm/malerpnueli/MalerPnueliMealyGrowingAlphabetTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.malerpnueli; 17 | 18 | import de.learnlib.oracle.MembershipOracle.MealyMembershipOracle; 19 | import de.learnlib.testsupport.AbstractGrowingAlphabetMealyTest; 20 | import net.automatalib.alphabet.Alphabet; 21 | 22 | public class MalerPnueliMealyGrowingAlphabetTest 23 | extends AbstractGrowingAlphabetMealyTest> { 24 | 25 | @Override 26 | protected MalerPnueliMealy getLearner(MealyMembershipOracle oracle, 27 | Alphabet alphabet) { 28 | return new MalerPnueliMealy<>(alphabet, oracle); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /algorithms/active/lstar/src/test/java/de/learnlib/algorithm/malerpnueli/MalerPnueliMooreGrowingAlphabetTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.malerpnueli; 17 | 18 | import de.learnlib.oracle.MembershipOracle.MooreMembershipOracle; 19 | import de.learnlib.testsupport.AbstractGrowingAlphabetMooreTest; 20 | import net.automatalib.alphabet.Alphabet; 21 | 22 | public class MalerPnueliMooreGrowingAlphabetTest 23 | extends AbstractGrowingAlphabetMooreTest> { 24 | 25 | @Override 26 | protected MalerPnueliMoore getLearner(MooreMembershipOracle oracle, 27 | Alphabet alphabet) { 28 | return new MalerPnueliMoore<>(alphabet, oracle); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /algorithms/active/lambda/src/test/java/de/learnlib/algorithm/lambda/ttt/mealy/TTTLambdaMealyGrowingAlphabetTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.lambda.ttt.mealy; 17 | 18 | import de.learnlib.oracle.MembershipOracle.MealyMembershipOracle; 19 | import de.learnlib.testsupport.AbstractGrowingAlphabetMealyTest; 20 | import net.automatalib.alphabet.Alphabet; 21 | 22 | public class TTTLambdaMealyGrowingAlphabetTest 23 | extends AbstractGrowingAlphabetMealyTest> { 24 | 25 | @Override 26 | protected TTTLambdaMealy getLearner(MealyMembershipOracle oracle, 27 | Alphabet alphabet) { 28 | return new TTTLambdaMealy<>(alphabet, oracle); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /test-support/learning-examples/src/test/java/de/learnlib/example/dfa/DFAExamplesTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.example.dfa; 17 | 18 | import de.learnlib.testsupport.example.dfa.DFABenchmarks; 19 | import org.testng.Assert; 20 | import org.testng.annotations.Test; 21 | 22 | public class DFAExamplesTest { 23 | 24 | @Test 25 | public void testPots2() { 26 | Assert.assertNotNull(DFABenchmarks.loadPots2()); 27 | } 28 | 29 | @Test 30 | public void testPots3() { 31 | Assert.assertNotNull(DFABenchmarks.loadPots3()); 32 | } 33 | 34 | @Test 35 | public void testPeterson2() { 36 | Assert.assertNotNull(DFABenchmarks.loadPeterson2()); 37 | } 38 | 39 | @Test 40 | public void testPeterson3() { 41 | Assert.assertNotNull(DFABenchmarks.loadPeterson3()); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /algorithms/active/kearns-vazirani/src/test/java/de/learnlib/algorithm/kv/dfa/KearnsVaziraniDFAGrowingAlphabetTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.kv.dfa; 17 | 18 | import de.learnlib.acex.AcexAnalyzers; 19 | import de.learnlib.oracle.MembershipOracle.DFAMembershipOracle; 20 | import de.learnlib.testsupport.AbstractGrowingAlphabetDFATest; 21 | import net.automatalib.alphabet.Alphabet; 22 | 23 | public class KearnsVaziraniDFAGrowingAlphabetTest extends AbstractGrowingAlphabetDFATest> { 24 | 25 | @Override 26 | protected KearnsVaziraniDFA getLearner(DFAMembershipOracle oracle, 27 | Alphabet alphabet) { 28 | return new KearnsVaziraniDFA<>(alphabet, oracle, true, AcexAnalyzers.LINEAR_FWD); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /algorithms/active/ttt-vpa/src/main/java/de/learnlib/algorithm/ttt/vpa/ExtractRecord.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.ttt.vpa; 17 | 18 | import de.learnlib.algorithm.observationpack.vpa.hypothesis.DTNode; 19 | 20 | /** 21 | * Data structure required during an extract operation. The latter basically works by copying nodes that are required in 22 | * the extracted subtree, and this data structure is required to associate original nodes with their extracted copies. 23 | * 24 | * @param 25 | * input symbol type 26 | */ 27 | final class ExtractRecord { 28 | 29 | public final DTNode original; 30 | 31 | public final DTNode extracted; 32 | 33 | ExtractRecord(DTNode original, DTNode extracted) { 34 | this.original = original; 35 | this.extracted = extracted; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /algorithms/active/ttt/src/test/java/de/learnlib/algorithm/ttt/TTTDFAGrowingAlphabetTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.ttt; 17 | 18 | import de.learnlib.acex.AcexAnalyzers; 19 | import de.learnlib.algorithm.ttt.dfa.TTTLearnerDFA; 20 | import de.learnlib.oracle.MembershipOracle.DFAMembershipOracle; 21 | import de.learnlib.testsupport.AbstractGrowingAlphabetDFATest; 22 | import net.automatalib.alphabet.Alphabet; 23 | 24 | public class TTTDFAGrowingAlphabetTest extends AbstractGrowingAlphabetDFATest> { 25 | 26 | @Override 27 | protected TTTLearnerDFA getLearner(DFAMembershipOracle oracle, 28 | Alphabet alphabet) { 29 | return new TTTLearnerDFA<>(alphabet, oracle, AcexAnalyzers.LINEAR_FWD); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /commons/datastructures/src/main/java/de/learnlib/datastructure/pta/PTATransition.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.datastructure.pta; 17 | 18 | import org.checkerframework.checker.index.qual.NonNegative; 19 | import org.checkerframework.checker.nullness.qual.Nullable; 20 | 21 | public class PTATransition> { 22 | 23 | private final S source; 24 | private final int index; 25 | 26 | PTATransition(S source, @NonNegative int index) { 27 | this.source = source; 28 | this.index = index; 29 | } 30 | 31 | public S getSource() { 32 | return source; 33 | } 34 | 35 | 36 | public @NonNegative int getIndex() { 37 | return index; 38 | } 39 | 40 | public @Nullable S getTarget() { 41 | return source.getSuccessor(index); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /oracles/parallelism/src/test/java/de/learnlib/oracle/parallelism/StaticParallelAdaptiveSupplierTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.oracle.parallelism; 17 | 18 | import de.learnlib.oracle.parallelism.AbstractDynamicBatchProcessorBuilder.StaticOracleProvider; 19 | import de.learnlib.oracle.parallelism.AbstractStaticParallelAdaptiveOracleTest.TestOutput; 20 | 21 | public class StaticParallelAdaptiveSupplierTest extends AbstractStaticParallelAdaptiveOracleTest { 22 | 23 | @Override 24 | protected StaticParallelAdaptiveOracleBuilder getBuilder() { 25 | return ParallelOracleBuilders.newStaticParallelAdaptiveOracle(new StaticOracleProvider<>(getOracles())); 26 | } 27 | 28 | @Override 29 | protected TestOutput extractTestOutput(TestOutput output) { 30 | return output; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /algorithms/active/lstar/src/test/java/de/learnlib/algorithm/rivestschapire/RivestSchapireMealyGrowingAlphabetTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.rivestschapire; 17 | 18 | import de.learnlib.oracle.MembershipOracle.MealyMembershipOracle; 19 | import de.learnlib.testsupport.AbstractGrowingAlphabetMealyTest; 20 | import net.automatalib.alphabet.Alphabet; 21 | 22 | public class RivestSchapireMealyGrowingAlphabetTest 23 | extends AbstractGrowingAlphabetMealyTest> { 24 | 25 | @Override 26 | protected RivestSchapireMealy getLearner(MealyMembershipOracle oracle, 27 | Alphabet alphabet) { 28 | return new RivestSchapireMealy<>(alphabet, oracle); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /algorithms/active/lstar/src/test/java/de/learnlib/algorithm/rivestschapire/RivestSchapireMooreGrowingAlphabetTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.rivestschapire; 17 | 18 | import de.learnlib.oracle.MembershipOracle.MooreMembershipOracle; 19 | import de.learnlib.testsupport.AbstractGrowingAlphabetMooreTest; 20 | import net.automatalib.alphabet.Alphabet; 21 | 22 | public class RivestSchapireMooreGrowingAlphabetTest 23 | extends AbstractGrowingAlphabetMooreTest> { 24 | 25 | @Override 26 | protected RivestSchapireMoore getLearner(MooreMembershipOracle oracle, 27 | Alphabet alphabet) { 28 | return new RivestSchapireMoore<>(alphabet, oracle); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /drivers/simulator/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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 | 17 | import de.learnlib.sul.SUL; 18 | 19 | /** 20 | * This module provides utilities for simulating {@link SUL}s. 21 | *

22 | * This module is provided by the following Maven dependency: 23 | *

24 |  * <dependency>
25 |  *   <groupId>de.learnlib</groupId>
26 |  *   <artifactId>learnlib-drivers-simulator</artifactId>
27 |  *   <version>${version}</version>
28 |  * </dependency>
29 |  * 
30 | */ 31 | open module de.learnlib.driver.simulator { 32 | 33 | requires de.learnlib.api; 34 | requires net.automatalib.api; 35 | 36 | // annotations are 'provided'-scoped and do not need to be loaded at runtime 37 | requires static org.checkerframework.checker.qual; 38 | 39 | exports de.learnlib.driver.simulator; 40 | } 41 | -------------------------------------------------------------------------------- /commons/counterexamples/src/main/java/de/learnlib/acex/MealyOutInconsPrefixTransformAcex.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.acex; 17 | 18 | import java.util.function.Function; 19 | 20 | import de.learnlib.oracle.MembershipOracle; 21 | import net.automatalib.word.Word; 22 | 23 | public class MealyOutInconsPrefixTransformAcex extends OutInconsPrefixTransformAcex> { 24 | 25 | public MealyOutInconsPrefixTransformAcex(Word suffix, 26 | MembershipOracle> oracle, 27 | Function, Word> asTransform) { 28 | super(suffix, suffix.length(), oracle, asTransform); 29 | } 30 | 31 | @Override 32 | public boolean checkEffects(Word eff1, Word eff2) { 33 | return eff2.isSuffixOf(eff1); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /test-support/learning-examples/src/main/java/de/learnlib/testsupport/example/dfa/ExampleRandomDFA.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.testsupport.example.dfa; 17 | 18 | import java.util.Random; 19 | 20 | import de.learnlib.testsupport.example.DefaultLearningExample.DefaultDFALearningExample; 21 | import net.automatalib.alphabet.impl.Alphabets; 22 | import net.automatalib.util.automaton.random.RandomAutomata; 23 | 24 | public class ExampleRandomDFA extends DefaultDFALearningExample { 25 | 26 | public ExampleRandomDFA(Random rand, int numInputs, int size) { 27 | super(RandomAutomata.randomDFA(rand, size, Alphabets.integers(0, numInputs - 1))); 28 | } 29 | 30 | public static ExampleRandomDFA createExample(Random rand, int numInputs, int size) { 31 | return new ExampleRandomDFA(rand, numInputs, size); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /api/src/main/java/de/learnlib/AccessSequenceTransformer.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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; 17 | 18 | import net.automatalib.word.Word; 19 | 20 | @FunctionalInterface 21 | public interface AccessSequenceTransformer { 22 | 23 | Word transformAccessSequence(Word word); 24 | 25 | default Word longestASPrefix(Word word) { 26 | int len = word.length(); 27 | Word lastPrefix = Word.epsilon(); 28 | for (int i = 1; i <= len; i++) { 29 | Word prefix = word.prefix(i); 30 | if (!isAccessSequence(prefix)) { 31 | return lastPrefix; 32 | } 33 | lastPrefix = prefix; 34 | } 35 | return word; 36 | } 37 | 38 | default boolean isAccessSequence(Word word) { 39 | return word.equals(transformAccessSequence(word)); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /api/src/main/java/de/learnlib/oracle/BatchProcessor.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.oracle; 17 | 18 | import java.util.Collection; 19 | 20 | import de.learnlib.exception.BatchInterruptedException; 21 | 22 | /** 23 | * A markup interface for classes that can process a batch of work in a parallel environment (e.g. a {@link 24 | * MembershipOracle} when used by a {@link ParallelOracle}). 25 | * 26 | * @param 27 | * batch type 28 | */ 29 | @FunctionalInterface 30 | public interface BatchProcessor { 31 | 32 | /** 33 | * Process the batch. 34 | * 35 | * @param batch 36 | * the batch to process 37 | * 38 | * @throws BatchInterruptedException 39 | * if the processing thread was interrupted by an exception. 40 | */ 41 | void processBatch(Collection batch); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /commons/counterexamples/src/main/java/de/learnlib/acex/MooreOutInconsPrefixTransformAcex.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.acex; 17 | 18 | import java.util.function.Function; 19 | 20 | import de.learnlib.oracle.MembershipOracle; 21 | import net.automatalib.word.Word; 22 | 23 | public class MooreOutInconsPrefixTransformAcex extends OutInconsPrefixTransformAcex> { 24 | 25 | public MooreOutInconsPrefixTransformAcex(Word suffix, 26 | MembershipOracle> oracle, 27 | Function, Word> asTransform) { 28 | super(suffix, suffix.length() + 1, oracle, asTransform); 29 | } 30 | 31 | @Override 32 | public boolean checkEffects(Word eff1, Word eff2) { 33 | return eff2.isSuffixOf(eff1); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /algorithms/active/aaar/src/main/java/de/learnlib/algorithm/aaar/abstraction/ExplicitAbstractionTree.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.algorithm.aaar.abstraction; 17 | 18 | import java.util.function.Function; 19 | 20 | import de.learnlib.oracle.MembershipOracle; 21 | 22 | public class ExplicitAbstractionTree extends AbstractAbstractionTree { 23 | 24 | private final AI rootA; 25 | private final Function incrementor; 26 | 27 | public ExplicitAbstractionTree(AI rootA, CI rootC, MembershipOracle o, Function incrementor) { 28 | super(rootA, rootC, o); 29 | 30 | this.rootA = rootA; 31 | this.incrementor = incrementor; 32 | } 33 | 34 | @Override 35 | protected AI createAbstractionForRepresentative(CI ci) { 36 | return this.incrementor.apply(this.rootA); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /filters/statistics/src/test/java/de/learnlib/filter/statistic/sul/ResetCounterSULTest.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.filter.statistic.sul; 17 | 18 | import java.util.Optional; 19 | 20 | import de.learnlib.driver.simulator.MealySimulatorSUL; 21 | import de.learnlib.filter.statistic.TestQueries; 22 | import de.learnlib.statistic.Statistics; 23 | 24 | public class ResetCounterSULTest 25 | extends AbstractResetCounterSULTest, Integer, Character> { 26 | 27 | @Override 28 | protected CounterSUL getStatisticSUL() { 29 | return new CounterSUL<>(new MealySimulatorSUL<>(TestQueries.DELEGATE)); 30 | } 31 | 32 | @Override 33 | protected Optional getCount(CounterSUL sul) { 34 | return Statistics.getService().getCount(CounterSUL.KEY_QUERY); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /oracles/parallelism/src/main/java/de/learnlib/oracle/parallelism/StaticQueriesJob.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.oracle.parallelism; 17 | 18 | import java.util.Collection; 19 | 20 | import de.learnlib.oracle.BatchProcessor; 21 | 22 | /** 23 | * A queries job that maintains a fixed reference to a {@link BatchProcessor}, executes queries using this oracle 24 | * regardless of the executing thread. 25 | * 26 | * @param 27 | * query type 28 | */ 29 | final class StaticQueriesJob extends AbstractQueriesJob { 30 | 31 | private final BatchProcessor oracle; 32 | 33 | StaticQueriesJob(Collection queries, BatchProcessor oracle) { 34 | super(queries); 35 | this.oracle = oracle; 36 | } 37 | 38 | @Override 39 | protected BatchProcessor getOracle() { 40 | return oracle; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /commons/datastructures/src/main/java/de/learnlib/datastructure/observationtable/OTLearner.java: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013-2025 TU Dortmund University 2 | * This file is part of LearnLib . 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.datastructure.observationtable; 17 | 18 | import de.learnlib.algorithm.LearningAlgorithm; 19 | import net.automatalib.automaton.fsa.DFA; 20 | import net.automatalib.automaton.transducer.MealyMachine; 21 | import net.automatalib.automaton.transducer.MooreMachine; 22 | import net.automatalib.word.Word; 23 | 24 | public interface OTLearner extends LearningAlgorithm, ObservationTableFeature { 25 | 26 | interface OTLearnerDFA extends DFALearner, OTLearner, I, Boolean> {} 27 | 28 | interface OTLearnerMealy extends MealyLearner, OTLearner, I, Word> {} 29 | 30 | interface OTLearnerMoore extends MooreLearner, OTLearner, I, Word> {} 31 | } 32 | --------------------------------------------------------------------------------