├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── install-ltsmin.sh ├── issue_template.md ├── settings.xml └── workflows │ └── ci.yml ├── .gitignore ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.txt ├── README.md ├── SECURITY.md ├── algorithms ├── active │ ├── aaar │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ └── java │ │ │ │ ├── de │ │ │ │ └── learnlib │ │ │ │ │ └── algorithm │ │ │ │ │ └── aaar │ │ │ │ │ ├── AbstractAAARLearner.java │ │ │ │ │ ├── Abstraction.java │ │ │ │ │ ├── ExplicitInitialAbstraction.java │ │ │ │ │ ├── TranslatingDFA.java │ │ │ │ │ ├── TranslatingMealyMachine.java │ │ │ │ │ ├── TranslatingMooreMachine.java │ │ │ │ │ ├── abstraction │ │ │ │ │ ├── AbstractAbstractionTree.java │ │ │ │ │ ├── ExplicitAbstractionTree.java │ │ │ │ │ ├── GenericAbstractionTree.java │ │ │ │ │ └── Node.java │ │ │ │ │ ├── explicit │ │ │ │ │ ├── AbstractExplicitAAARLearner.java │ │ │ │ │ ├── ExplicitAAARLearnerDFA.java │ │ │ │ │ ├── ExplicitAAARLearnerMealy.java │ │ │ │ │ └── ExplicitAAARLearnerMoore.java │ │ │ │ │ └── generic │ │ │ │ │ ├── AbstractGenericAAARLearner.java │ │ │ │ │ ├── GenericAAARLearnerDFA.java │ │ │ │ │ ├── GenericAAARLearnerMealy.java │ │ │ │ │ └── GenericAAARLearnerMoore.java │ │ │ │ └── module-info.java │ │ │ └── test │ │ │ ├── java │ │ │ └── de │ │ │ │ └── learnlib │ │ │ │ └── algorithm │ │ │ │ └── aaar │ │ │ │ ├── AAARTestUtil.java │ │ │ │ ├── AbstractAAARTest.java │ │ │ │ ├── ComboConstructor.java │ │ │ │ ├── TranslatingLearnerWrapper.java │ │ │ │ ├── explicit │ │ │ │ ├── ExplicitAAARLearnerDFATest.java │ │ │ │ ├── ExplicitAAARLearnerMealyTest.java │ │ │ │ ├── ExplicitAAARLearnerMooreTest.java │ │ │ │ ├── IdentityInitialAbstraction.java │ │ │ │ ├── Incrementor.java │ │ │ │ ├── ModuloInitialAbstraction.java │ │ │ │ ├── NoopIncrementor.java │ │ │ │ └── it │ │ │ │ │ ├── ExplicitAAARLearnerIdentityDFAIT.java │ │ │ │ │ ├── ExplicitAAARLearnerIdentityMealyIT.java │ │ │ │ │ ├── ExplicitAAARLearnerIdentityMooreIT.java │ │ │ │ │ ├── ExplicitAAARLearnerModuloDFAIT.java │ │ │ │ │ ├── ExplicitAAARLearnerModuloMealyIT.java │ │ │ │ │ └── ExplicitAAARLearnerModuloMooreIT.java │ │ │ │ └── generic │ │ │ │ ├── GenericAAARLearnerDFATest.java │ │ │ │ ├── GenericAAARLearnerMealyTest.java │ │ │ │ ├── GenericAAARLearnerMooreTest.java │ │ │ │ └── it │ │ │ │ ├── GenericAAARLearnerDFAIT.java │ │ │ │ ├── GenericAAARLearnerMealyIT.java │ │ │ │ └── GenericAAARLearnerMooreIT.java │ │ │ └── resources │ │ │ ├── tree_dfa.dot │ │ │ ├── tree_mealy.dot │ │ │ └── tree_moore.dot │ ├── adt │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ └── java │ │ │ │ ├── de │ │ │ │ └── learnlib │ │ │ │ │ └── algorithm │ │ │ │ │ └── adt │ │ │ │ │ ├── ads │ │ │ │ │ └── DefensiveADS.java │ │ │ │ │ ├── adt │ │ │ │ │ ├── ADT.java │ │ │ │ │ ├── ADTLeafNode.java │ │ │ │ │ ├── ADTNode.java │ │ │ │ │ ├── ADTResetNode.java │ │ │ │ │ └── ADTSymbolNode.java │ │ │ │ │ ├── api │ │ │ │ │ ├── ADTExtender.java │ │ │ │ │ ├── LeafSplitter.java │ │ │ │ │ ├── PartialTransitionAnalyzer.java │ │ │ │ │ └── SubtreeReplacer.java │ │ │ │ │ ├── automaton │ │ │ │ │ ├── ADTHypothesis.java │ │ │ │ │ ├── ADTState.java │ │ │ │ │ └── ADTTransition.java │ │ │ │ │ ├── config │ │ │ │ │ ├── ADTExtenders.java │ │ │ │ │ ├── LeafSplitters.java │ │ │ │ │ ├── SubtreeReplacers.java │ │ │ │ │ └── model │ │ │ │ │ │ ├── ADSCalculator.java │ │ │ │ │ │ ├── DefensiveADSCalculator.java │ │ │ │ │ │ ├── calculator │ │ │ │ │ │ ├── AbstractCalculator.java │ │ │ │ │ │ ├── BestEffortCalculator.java │ │ │ │ │ │ ├── BestEffortDefensiveCalculator.java │ │ │ │ │ │ ├── MinLengthCalculator.java │ │ │ │ │ │ └── MinSizeCalculator.java │ │ │ │ │ │ ├── extender │ │ │ │ │ │ └── DefaultExtender.java │ │ │ │ │ │ └── replacer │ │ │ │ │ │ ├── ExhaustiveReplacer.java │ │ │ │ │ │ ├── LevelOrderReplacer.java │ │ │ │ │ │ └── SingleReplacer.java │ │ │ │ │ ├── learner │ │ │ │ │ ├── ADSAmbiguityQuery.java │ │ │ │ │ ├── ADSVerificationQuery.java │ │ │ │ │ ├── ADTAdaptiveQuery.java │ │ │ │ │ ├── ADTLearner.java │ │ │ │ │ ├── ADTLearnerState.java │ │ │ │ │ ├── AbstractAdaptiveQuery.java │ │ │ │ │ └── Adaptive2MembershipWrapper.java │ │ │ │ │ ├── model │ │ │ │ │ ├── ExtensionResult.java │ │ │ │ │ ├── ObservationTree.java │ │ │ │ │ └── ReplacementResult.java │ │ │ │ │ └── util │ │ │ │ │ └── ADTUtil.java │ │ │ │ └── module-info.java │ │ │ └── test │ │ │ ├── java │ │ │ └── de │ │ │ │ └── learnlib │ │ │ │ └── algorithm │ │ │ │ └── adt │ │ │ │ ├── automaton │ │ │ │ └── ADTHypothesisTest.java │ │ │ │ ├── it │ │ │ │ └── ADTIT.java │ │ │ │ └── learner │ │ │ │ ├── ADTGrowingAlphabetTest.java │ │ │ │ ├── ADTResumableLearnerTest.java │ │ │ │ └── ADTVisualizationTest.java │ │ │ └── resources │ │ │ ├── adt.dot │ │ │ └── tcp_client_ubuntu.dot │ ├── dhc │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ └── java │ │ │ │ ├── de │ │ │ │ └── learnlib │ │ │ │ │ └── algorithm │ │ │ │ │ └── dhc │ │ │ │ │ └── mealy │ │ │ │ │ ├── MealyDHC.java │ │ │ │ │ └── MealyDHCState.java │ │ │ │ └── module-info.java │ │ │ └── test │ │ │ └── java │ │ │ └── de │ │ │ └── learnlib │ │ │ └── algorithm │ │ │ └── dhc │ │ │ └── mealy │ │ │ ├── MealyDHCGrowingAlphabetTest.java │ │ │ ├── MealyDHCResumableLearnerTest.java │ │ │ ├── MealyDHCTest.java │ │ │ └── it │ │ │ └── MealyDHCIT.java │ ├── kearns-vazirani │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ └── java │ │ │ │ ├── de │ │ │ │ └── learnlib │ │ │ │ │ └── algorithm │ │ │ │ │ └── kv │ │ │ │ │ ├── StateInfo.java │ │ │ │ │ ├── dfa │ │ │ │ │ ├── KearnsVaziraniDFA.java │ │ │ │ │ └── KearnsVaziraniDFAState.java │ │ │ │ │ └── mealy │ │ │ │ │ ├── KearnsVaziraniMealy.java │ │ │ │ │ └── KearnsVaziraniMealyState.java │ │ │ │ └── module-info.java │ │ │ └── test │ │ │ └── java │ │ │ └── de │ │ │ └── learnlib │ │ │ └── algorithm │ │ │ └── kv │ │ │ ├── dfa │ │ │ ├── KearnsVaziraniDFAGrowingAlphabetTest.java │ │ │ ├── KearnsVaziraniDFAIT.java │ │ │ └── KearnsVaziraniDFAResumableLearnerTest.java │ │ │ └── mealy │ │ │ ├── KearnsVaziraniMealyGrowingAlphabetTest.java │ │ │ ├── KearnsVaziraniMealyIT.java │ │ │ └── KearnsVaziraniMealyResumableLearnerTest.java │ ├── lambda │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ └── java │ │ │ │ ├── de │ │ │ │ └── learnlib │ │ │ │ │ └── algorithm │ │ │ │ │ └── lambda │ │ │ │ │ ├── lstar │ │ │ │ │ ├── AbstractLLambda.java │ │ │ │ │ ├── LLambdaDFA.java │ │ │ │ │ ├── LLambdaMealy.java │ │ │ │ │ └── LLambdaState.java │ │ │ │ │ └── ttt │ │ │ │ │ ├── AbstractTTTLambda.java │ │ │ │ │ ├── dfa │ │ │ │ │ ├── ChildrenDFA.java │ │ │ │ │ ├── DecisionTreeDFA.java │ │ │ │ │ ├── HypothesisDFA.java │ │ │ │ │ └── TTTLambdaDFA.java │ │ │ │ │ ├── dt │ │ │ │ │ ├── AbstractDTNode.java │ │ │ │ │ ├── AbstractDecisionTree.java │ │ │ │ │ ├── Children.java │ │ │ │ │ ├── DTInnerNode.java │ │ │ │ │ └── DTLeaf.java │ │ │ │ │ ├── mealy │ │ │ │ │ ├── ChildrenMealy.java │ │ │ │ │ ├── DecisionTreeMealy.java │ │ │ │ │ ├── HypothesisMealy.java │ │ │ │ │ ├── MealyTransition.java │ │ │ │ │ └── TTTLambdaMealy.java │ │ │ │ │ ├── pt │ │ │ │ │ ├── PTNode.java │ │ │ │ │ ├── PTNodeImpl.java │ │ │ │ │ └── PrefixTree.java │ │ │ │ │ └── st │ │ │ │ │ ├── STNode.java │ │ │ │ │ ├── STNodeImpl.java │ │ │ │ │ └── SuffixTrie.java │ │ │ │ └── module-info.java │ │ │ └── test │ │ │ ├── java │ │ │ └── de │ │ │ │ └── learnlib │ │ │ │ └── algorithm │ │ │ │ └── lambda │ │ │ │ ├── AbstractCounterexampleQueueTest.java │ │ │ │ ├── lstar │ │ │ │ ├── dfa │ │ │ │ │ ├── LLambdaDFACounterexampleQueueTest.java │ │ │ │ │ ├── LLambdaDFAGrowingAlphabetTest.java │ │ │ │ │ ├── LLambdaDFAResumableTest.java │ │ │ │ │ └── it │ │ │ │ │ │ └── LLambdaDFAIT.java │ │ │ │ └── mealy │ │ │ │ │ ├── LLambdaMealyGrowingAlphabetTest.java │ │ │ │ │ ├── LLambdaMealyResumableTest.java │ │ │ │ │ └── it │ │ │ │ │ └── LLambdaMealyIT.java │ │ │ │ └── ttt │ │ │ │ ├── dfa │ │ │ │ ├── TTTLambdaDFACounterexampleQueueTest.java │ │ │ │ ├── TTTLambdaDFAGrowingAlphabetTest.java │ │ │ │ └── it │ │ │ │ │ └── TTTLambdaDFAIT.java │ │ │ │ └── mealy │ │ │ │ ├── TTTLambdaMealyGrowingAlphabetTest.java │ │ │ │ └── it │ │ │ │ └── TTTLambdaMealyIT.java │ │ │ └── resources │ │ │ └── mosquitto__two_client_will_retain.dot │ ├── lsharp │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ └── java │ │ │ │ ├── de │ │ │ │ └── learnlib │ │ │ │ │ └── algorithm │ │ │ │ │ └── lsharp │ │ │ │ │ ├── ApartnessUtil.java │ │ │ │ │ ├── LSOracle.java │ │ │ │ │ ├── LSharpMealy.java │ │ │ │ │ ├── MapTransitions.java │ │ │ │ │ ├── NormalObservationTree.java │ │ │ │ │ ├── ObservationTree.java │ │ │ │ │ ├── Rule2.java │ │ │ │ │ ├── Rule3.java │ │ │ │ │ ├── TransitionInformation.java │ │ │ │ │ └── ads │ │ │ │ │ ├── ADS.java │ │ │ │ │ ├── ADSNode.java │ │ │ │ │ ├── ADSTree.java │ │ │ │ │ ├── ArenaNode.java │ │ │ │ │ └── ArenaTree.java │ │ │ │ └── module-info.java │ │ │ └── test │ │ │ ├── java │ │ │ └── de │ │ │ │ └── learnlib │ │ │ │ └── algorithm │ │ │ │ └── lsharp │ │ │ │ ├── LSharpMealyTest.java │ │ │ │ ├── NormalObservationTreeTest.java │ │ │ │ ├── ads │ │ │ │ └── ADSTreeTest.java │ │ │ │ └── it │ │ │ │ └── LSharpMealyIT.java │ │ │ └── resources │ │ │ └── BitVise.dot │ ├── lstar │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ └── java │ │ │ │ ├── de │ │ │ │ └── learnlib │ │ │ │ │ └── algorithm │ │ │ │ │ ├── lstar │ │ │ │ │ ├── AbstractAutomatonLStar.java │ │ │ │ │ ├── AbstractExtensibleAutomatonLStar.java │ │ │ │ │ ├── AbstractLStar.java │ │ │ │ │ ├── AutomatonLStarState.java │ │ │ │ │ ├── ce │ │ │ │ │ │ ├── ObservationTableCEXHandler.java │ │ │ │ │ │ └── ObservationTableCEXHandlers.java │ │ │ │ │ ├── closing │ │ │ │ │ │ ├── CloseRandomStrategy.java │ │ │ │ │ │ ├── ClosingStrategies.java │ │ │ │ │ │ └── ClosingStrategy.java │ │ │ │ │ ├── dfa │ │ │ │ │ │ ├── ClassicLStarDFA.java │ │ │ │ │ │ ├── ExtensibleLStarDFA.java │ │ │ │ │ │ └── LStarDFAUtil.java │ │ │ │ │ ├── mealy │ │ │ │ │ │ ├── ClassicLStarMealy.java │ │ │ │ │ │ ├── ExtensibleLStarMealy.java │ │ │ │ │ │ └── LStarMealyUtil.java │ │ │ │ │ └── moore │ │ │ │ │ │ ├── ClassicLStarMoore.java │ │ │ │ │ │ ├── ExtensibleLStarMoore.java │ │ │ │ │ │ └── LStarMooreUtil.java │ │ │ │ │ ├── malerpnueli │ │ │ │ │ ├── MalerPnueliDFA.java │ │ │ │ │ ├── MalerPnueliMealy.java │ │ │ │ │ └── MalerPnueliMoore.java │ │ │ │ │ └── rivestschapire │ │ │ │ │ ├── RivestSchapireDFA.java │ │ │ │ │ ├── RivestSchapireMealy.java │ │ │ │ │ └── RivestSchapireMoore.java │ │ │ │ └── module-info.java │ │ │ └── test │ │ │ └── java │ │ │ └── de │ │ │ └── learnlib │ │ │ └── algorithm │ │ │ ├── lstar │ │ │ ├── ClassicLStarMealyGrowingAlphabetTest.java │ │ │ ├── ExtensibleLStarDFAGrowingAlphabetTest.java │ │ │ ├── ExtensibleLStarDFAResumableLearnerTest.java │ │ │ ├── ExtensibleLStarMealyGrowingAlphabetTest.java │ │ │ ├── ExtensibleLStarMealyResumableLearnerTest.java │ │ │ ├── ExtensibleLStarMooreGrowingAlphabetTest.java │ │ │ ├── ExtensibleLStarMooreResumableLearnerTest.java │ │ │ ├── LStarDFATest.java │ │ │ ├── LStarMealyTest.java │ │ │ ├── LearningTest.java │ │ │ └── it │ │ │ │ ├── ClassicLStarMealyIT.java │ │ │ │ ├── ClassicLStarMooreIT.java │ │ │ │ ├── ExtensibleLStarDFAIT.java │ │ │ │ ├── ExtensibleLStarMealyIT.java │ │ │ │ └── ExtensibleLStarMooreIT.java │ │ │ ├── malerpnueli │ │ │ ├── MalerPnueliDFAGrowingAlphabetTest.java │ │ │ ├── MalerPnueliDFAResumableLearnerTest.java │ │ │ ├── MalerPnueliMealyGrowingAlphabetTest.java │ │ │ ├── MalerPnueliMealyResumableLearnerTest.java │ │ │ ├── MalerPnueliMooreGrowingAlphabetTest.java │ │ │ └── MalerPnueliMooreResumableLearnerTest.java │ │ │ └── rivestschapire │ │ │ ├── RivestSchapireDFAGrowingAlphabetTest.java │ │ │ ├── RivestSchapireDFAResumableLearnerTest.java │ │ │ ├── RivestSchapireMealyGrowingAlphabetTest.java │ │ │ ├── RivestSchapireMealyResumableLearnerTest.java │ │ │ ├── RivestSchapireMooreGrowingAlphabetTest.java │ │ │ └── RivestSchapireMooreResumableLearnerTest.java │ ├── nlstar │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ └── java │ │ │ │ ├── de │ │ │ │ └── learnlib │ │ │ │ │ └── algorithm │ │ │ │ │ └── nlstar │ │ │ │ │ ├── Inconsistency.java │ │ │ │ │ ├── NLStarLearner.java │ │ │ │ │ ├── ObservationTable.java │ │ │ │ │ └── Row.java │ │ │ │ └── module-info.java │ │ │ └── test │ │ │ └── java │ │ │ └── de │ │ │ └── learnlib │ │ │ └── algorithm │ │ │ └── nlstar │ │ │ ├── NLStarTest.java │ │ │ └── it │ │ │ └── NLStarIT.java │ ├── observation-pack-vpa │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ └── java │ │ │ │ ├── de │ │ │ │ └── learnlib │ │ │ │ │ └── algorithm │ │ │ │ │ └── observationpack │ │ │ │ │ └── vpa │ │ │ │ │ ├── AbstractVPALearner.java │ │ │ │ │ ├── OPLearnerVPA.java │ │ │ │ │ └── hypothesis │ │ │ │ │ ├── AbstractHypTrans.java │ │ │ │ │ ├── ContextPair.java │ │ │ │ │ ├── DTNode.java │ │ │ │ │ ├── DTree.java │ │ │ │ │ ├── HypIntTrans.java │ │ │ │ │ ├── HypLoc.java │ │ │ │ │ ├── HypRetTrans.java │ │ │ │ │ ├── OneSEVPAHypothesis.java │ │ │ │ │ └── TransList.java │ │ │ │ └── module-info.java │ │ │ └── test │ │ │ ├── java │ │ │ └── de │ │ │ │ └── learnlib │ │ │ │ └── algorithm │ │ │ │ └── observationpack │ │ │ │ └── vpa │ │ │ │ ├── DTVisualizationTest.java │ │ │ │ └── OPLearnerVPAIT.java │ │ │ └── resources │ │ │ ├── dt.dot │ │ │ └── hyp.dot │ ├── observation-pack │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ └── java │ │ │ │ ├── de │ │ │ │ └── learnlib │ │ │ │ │ └── algorithm │ │ │ │ │ └── observationpack │ │ │ │ │ ├── AbstractOPLearner.java │ │ │ │ │ ├── OPLearnerState.java │ │ │ │ │ ├── dfa │ │ │ │ │ ├── HypothesisWrapperDFA.java │ │ │ │ │ └── OPLearnerDFA.java │ │ │ │ │ ├── hypothesis │ │ │ │ │ ├── HState.java │ │ │ │ │ ├── HTransition.java │ │ │ │ │ └── OPLearnerHypothesis.java │ │ │ │ │ ├── mealy │ │ │ │ │ ├── HypothesisWrapperMealy.java │ │ │ │ │ └── OPLearnerMealy.java │ │ │ │ │ └── moore │ │ │ │ │ ├── HypothesisWrapperMoore.java │ │ │ │ │ └── OPLearnerMoore.java │ │ │ │ └── module-info.java │ │ │ └── test │ │ │ ├── java │ │ │ └── de │ │ │ │ └── learnlib │ │ │ │ └── algorithm │ │ │ │ └── observationpack │ │ │ │ ├── DTVisualizationTest.java │ │ │ │ ├── OPLearnerDFAGrowingAlphabetTest.java │ │ │ │ ├── OPLearnerDFAIT.java │ │ │ │ ├── OPLearnerDFAResumableLearnerTest.java │ │ │ │ ├── OPLearnerMealyGrowingAlphabetTest.java │ │ │ │ ├── OPLearnerMealyIT.java │ │ │ │ ├── OPLearnerMealyResumableLearnerTest.java │ │ │ │ ├── OPLearnerMooreGrowingAlphabetTest.java │ │ │ │ ├── OPLearnerMooreIT.java │ │ │ │ └── OPLearnerMooreResumableLearnerTest.java │ │ │ └── resources │ │ │ ├── dt.dot │ │ │ └── hyp.dot │ ├── pom.xml │ ├── procedural │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ └── java │ │ │ │ ├── de │ │ │ │ └── learnlib │ │ │ │ │ └── algorithm │ │ │ │ │ └── procedural │ │ │ │ │ ├── SymbolWrapper.java │ │ │ │ │ ├── adapter │ │ │ │ │ ├── dfa │ │ │ │ │ │ ├── KearnsVaziraniAdapterDFA.java │ │ │ │ │ │ ├── LLambdaAdapterDFA.java │ │ │ │ │ │ ├── LStarBaseAdapterDFA.java │ │ │ │ │ │ ├── ObservationPackAdapterDFA.java │ │ │ │ │ │ ├── RivestSchapireAdapterDFA.java │ │ │ │ │ │ ├── TTTAdapterDFA.java │ │ │ │ │ │ └── TTTLambdaAdapterDFA.java │ │ │ │ │ └── mealy │ │ │ │ │ │ ├── KearnsVaziraniAdapterMealy.java │ │ │ │ │ │ ├── LLambdaAdapterMealy.java │ │ │ │ │ │ ├── LStarBaseAdapterMealy.java │ │ │ │ │ │ ├── ObservationPackAdapterMealy.java │ │ │ │ │ │ ├── RivestSchapireAdapterMealy.java │ │ │ │ │ │ ├── TTTAdapterMealy.java │ │ │ │ │ │ └── TTTLambdaAdapterMealy.java │ │ │ │ │ ├── sba │ │ │ │ │ ├── ATManager.java │ │ │ │ │ ├── MappingSBA.java │ │ │ │ │ ├── ProceduralMembershipOracle.java │ │ │ │ │ ├── SBALearner.java │ │ │ │ │ └── manager │ │ │ │ │ │ ├── DefaultATManager.java │ │ │ │ │ │ └── OptimizingATManager.java │ │ │ │ │ ├── spa │ │ │ │ │ ├── ATRManager.java │ │ │ │ │ ├── ProceduralMembershipOracle.java │ │ │ │ │ ├── SPALearner.java │ │ │ │ │ └── manager │ │ │ │ │ │ ├── DefaultATRManager.java │ │ │ │ │ │ └── OptimizingATRManager.java │ │ │ │ │ └── spmm │ │ │ │ │ ├── ATManager.java │ │ │ │ │ ├── MappingSPMM.java │ │ │ │ │ ├── ProceduralMembershipOracle.java │ │ │ │ │ ├── SPMMLearner.java │ │ │ │ │ └── manager │ │ │ │ │ ├── DefaultATManager.java │ │ │ │ │ └── OptimizingATManager.java │ │ │ │ └── module-info.java │ │ │ └── test │ │ │ └── java │ │ │ └── de │ │ │ └── learnlib │ │ │ └── algorithm │ │ │ └── procedural │ │ │ ├── sba │ │ │ ├── ATManagerTest.java │ │ │ ├── OptimizationsTest.java │ │ │ └── it │ │ │ │ └── SBAIT.java │ │ │ ├── spa │ │ │ ├── ATRManagerTest.java │ │ │ └── it │ │ │ │ └── SPAIT.java │ │ │ └── spmm │ │ │ ├── ATManagerTest.java │ │ │ ├── OptimizationsTest.java │ │ │ └── it │ │ │ └── SPMMIT.java │ ├── ttt-vpa │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ └── java │ │ │ │ ├── de │ │ │ │ └── learnlib │ │ │ │ │ └── algorithm │ │ │ │ │ └── ttt │ │ │ │ │ └── vpa │ │ │ │ │ ├── ExtractRecord.java │ │ │ │ │ ├── GlobalSplitter.java │ │ │ │ │ ├── NonDetState.java │ │ │ │ │ ├── NondetStackContents.java │ │ │ │ │ ├── OutputInconsistency.java │ │ │ │ │ ├── Splitter.java │ │ │ │ │ └── TTTLearnerVPA.java │ │ │ │ └── module-info.java │ │ │ └── test │ │ │ └── java │ │ │ └── de │ │ │ └── learnlib │ │ │ └── algorithm │ │ │ └── ttt │ │ │ └── dfa │ │ │ └── it │ │ │ └── TTTLearnerVPAIT.java │ └── ttt │ │ ├── pom.xml │ │ └── src │ │ ├── main │ │ └── java │ │ │ ├── de │ │ │ └── learnlib │ │ │ │ └── algorithm │ │ │ │ └── ttt │ │ │ │ ├── base │ │ │ │ ├── AbstractBaseDTNode.java │ │ │ │ ├── AbstractTTTHypothesis.java │ │ │ │ ├── AbstractTTTLearner.java │ │ │ │ ├── BaseTTTDiscriminationTree.java │ │ │ │ ├── HypothesisChangedException.java │ │ │ │ ├── OutputInconsistency.java │ │ │ │ ├── TTTLearnerState.java │ │ │ │ ├── TTTState.java │ │ │ │ └── TTTTransition.java │ │ │ │ ├── dfa │ │ │ │ ├── PrefixTTTLearnerDFA.java │ │ │ │ ├── TTTDTNodeDFA.java │ │ │ │ ├── TTTHypothesisDFA.java │ │ │ │ ├── TTTLearnerDFA.java │ │ │ │ └── TTTStateDFA.java │ │ │ │ ├── mealy │ │ │ │ ├── TTTDTNodeMealy.java │ │ │ │ ├── TTTHypothesisMealy.java │ │ │ │ ├── TTTLearnerMealy.java │ │ │ │ └── TTTTransitionMealy.java │ │ │ │ └── moore │ │ │ │ ├── TTTDTNodeMoore.java │ │ │ │ ├── TTTHypothesisMoore.java │ │ │ │ ├── TTTLearnerMoore.java │ │ │ │ └── TTTStateMoore.java │ │ │ └── module-info.java │ │ └── test │ │ ├── java │ │ └── de │ │ │ └── learnlib │ │ │ └── algorithm │ │ │ └── ttt │ │ │ ├── TTTDFAGrowingAlphabetTest.java │ │ │ ├── TTTLearnerDFAResumableLearnerTest.java │ │ │ ├── TTTLearnerMealyGrowingAlphabetTest.java │ │ │ ├── TTTLearnerMealyResumableLearnerTest.java │ │ │ ├── TTTLearnerMooreGrowingAlphabetTest.java │ │ │ ├── TTTLearnerMooreResumableLearnerTest.java │ │ │ ├── TTTVisualizationTest.java │ │ │ ├── dfa │ │ │ └── it │ │ │ │ ├── PrefixTTTLearnerDFAIT.java │ │ │ │ └── TTTLearnerDFAIT.java │ │ │ ├── mealy │ │ │ └── it │ │ │ │ └── TTTLearnerMealyIT.java │ │ │ └── moore │ │ │ └── it │ │ │ └── TTTLearnerMooreIT.java │ │ └── resources │ │ ├── dt.dot │ │ └── hyp.dot ├── passive │ ├── ostia │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ └── java │ │ │ │ ├── de │ │ │ │ └── learnlib │ │ │ │ │ └── algorithm │ │ │ │ │ └── ostia │ │ │ │ │ ├── Blue.java │ │ │ │ │ ├── Edge.java │ │ │ │ │ ├── IntQueue.java │ │ │ │ │ ├── OSSTWrapper.java │ │ │ │ │ ├── OSTIA.java │ │ │ │ │ ├── Out.java │ │ │ │ │ ├── State.java │ │ │ │ │ ├── StateCopy.java │ │ │ │ │ └── StateParent.java │ │ │ │ └── module-info.java │ │ │ └── test │ │ │ ├── java │ │ │ └── de │ │ │ │ └── learnlib │ │ │ │ └── algorithm │ │ │ │ └── ostia │ │ │ │ ├── OSTIAIT.java │ │ │ │ └── OSTIATest.java │ │ │ └── resources │ │ │ └── hyp.dot │ ├── pom.xml │ └── rpni │ │ ├── pom.xml │ │ └── src │ │ ├── main │ │ └── java │ │ │ ├── de │ │ │ └── learnlib │ │ │ │ └── algorithm │ │ │ │ └── rpni │ │ │ │ ├── AbstractBlueFringeRPNI.java │ │ │ │ ├── BlueFringeEDSMDFA.java │ │ │ │ ├── BlueFringeMDLDFA.java │ │ │ │ ├── BlueFringeRPNIDFA.java │ │ │ │ ├── BlueFringeRPNIMealy.java │ │ │ │ ├── BlueFringeRPNIMoore.java │ │ │ │ ├── EDSMUtil.java │ │ │ │ └── MDLUtil.java │ │ │ └── module-info.java │ │ └── test │ │ └── java │ │ └── de │ │ └── learnlib │ │ └── algorithm │ │ └── rpni │ │ ├── EDSMScoreTest.java │ │ ├── MDLScoreTest.java │ │ └── it │ │ ├── EdsmDfaIT.java │ │ ├── MdlDfaIT.java │ │ ├── RpniDfaIT.java │ │ ├── RpniMealyIT.java │ │ └── RpniMooreIT.java └── pom.xml ├── api ├── pom.xml └── src │ └── main │ └── java │ ├── de │ └── learnlib │ │ ├── AccessSequenceProvider.java │ │ ├── AccessSequenceTransformer.java │ │ ├── Mapper.java │ │ ├── Resumable.java │ │ ├── algorithm │ │ ├── GlobalSuffixLearner.java │ │ ├── LearnerConstructor.java │ │ ├── LearningAlgorithm.java │ │ ├── PassiveLearningAlgorithm.java │ │ └── package-info.java │ │ ├── exception │ │ ├── BatchInterruptedException.java │ │ ├── MappedException.java │ │ └── SULException.java │ │ ├── logging │ │ └── Category.java │ │ ├── oracle │ │ ├── AdaptiveMembershipOracle.java │ │ ├── AutomatonOracle.java │ │ ├── BatchProcessor.java │ │ ├── BlackBoxOracle.java │ │ ├── EmptinessOracle.java │ │ ├── EquivalenceOracle.java │ │ ├── InclusionOracle.java │ │ ├── LassoEmptinessOracle.java │ │ ├── LassoOracle.java │ │ ├── MembershipOracle.java │ │ ├── OmegaMembershipOracle.java │ │ ├── OmegaQueryAnswerer.java │ │ ├── ParallelAdaptiveOracle.java │ │ ├── ParallelOmegaOracle.java │ │ ├── ParallelOracle.java │ │ ├── PropertyOracle.java │ │ ├── QueryAnswerer.java │ │ ├── SingleAdaptiveMembershipOracle.java │ │ ├── SingleQueryOmegaOracle.java │ │ ├── SingleQueryOracle.java │ │ ├── ThreadPool.java │ │ └── package-info.java │ │ ├── query │ │ ├── AbstractQuery.java │ │ ├── AdaptiveQuery.java │ │ ├── DefaultQuery.java │ │ ├── OmegaQuery.java │ │ └── Query.java │ │ ├── statistic │ │ ├── StatisticCollector.java │ │ ├── StatisticData.java │ │ ├── StatisticLearner.java │ │ ├── StatisticOracle.java │ │ └── StatisticSUL.java │ │ └── sul │ │ ├── ContextExecutableInput.java │ │ ├── ContextHandler.java │ │ ├── ExecutableInput.java │ │ ├── ObservableSUL.java │ │ ├── SUL.java │ │ ├── SULMapper.java │ │ ├── StateLocalInputSUL.java │ │ └── package-info.java │ └── module-info.java ├── archetypes ├── basic │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── resources-template │ │ │ └── META-INF │ │ │ │ └── maven │ │ │ │ └── archetype-metadata.xml │ │ └── resources │ │ │ └── archetype-resources │ │ │ ├── pom.xml │ │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── Example.java │ │ │ └── resources │ │ │ ├── automatalib.properties │ │ │ └── logback.xml │ │ └── test │ │ ├── resources-template │ │ └── projects │ │ │ └── basic │ │ │ └── archetype.properties │ │ └── resources │ │ └── projects │ │ └── basic │ │ └── goal.txt ├── complete │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── resources-template │ │ │ └── META-INF │ │ │ │ └── maven │ │ │ │ └── archetype-metadata.xml │ │ └── resources │ │ │ └── archetype-resources │ │ │ ├── pom.xml │ │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── Example.java │ │ │ └── resources │ │ │ ├── automatalib.properties │ │ │ └── logback.xml │ │ └── test │ │ ├── resources-template │ │ └── projects │ │ │ └── complete │ │ │ └── archetype.properties │ │ └── resources │ │ └── projects │ │ └── complete │ │ └── goal.txt └── pom.xml ├── build-config ├── .gitignore ├── automatalib-learnlib-intellij-format.xml ├── generate-module-overview.py ├── pom.xml └── src │ └── main │ └── resources │ ├── automatalib-learnlib-checkstyle.xml │ ├── learnlib-checkstyle-suppressions.xml │ ├── learnlib-pmd-ruleset.xml │ ├── learnlib-spotbugs-exclusions.xml │ ├── license-header-java.txt │ └── license-header-xml.txt ├── build-parent └── pom.xml ├── commons ├── counterexamples │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ ├── de │ │ │ └── learnlib │ │ │ │ ├── acex │ │ │ │ ├── AbstractBaseCounterexample.java │ │ │ │ ├── AbstractCounterexample.java │ │ │ │ ├── AbstractNamedAcexAnalyzer.java │ │ │ │ ├── AcexAnalysisAlgorithms.java │ │ │ │ ├── AcexAnalyzer.java │ │ │ │ ├── AcexAnalyzers.java │ │ │ │ ├── ClassicPrefixTransformAcex.java │ │ │ │ ├── MealyOutInconsPrefixTransformAcex.java │ │ │ │ ├── MooreOutInconsPrefixTransformAcex.java │ │ │ │ ├── OutInconsPrefixTransformAcex.java │ │ │ │ └── package-info.java │ │ │ │ └── counterexample │ │ │ │ ├── AcexLocalSuffixFinder.java │ │ │ │ ├── GlobalSuffixFinder.java │ │ │ │ ├── GlobalSuffixFinders.java │ │ │ │ ├── LocalSuffixFinder.java │ │ │ │ ├── LocalSuffixFinders.java │ │ │ │ └── package-info.java │ │ │ └── module-info.java │ │ └── test │ │ └── java │ │ └── de │ │ └── learnlib │ │ └── counterexample │ │ └── acex │ │ ├── AnalyzersTest.java │ │ └── DummyAcex.java ├── datastructures │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ ├── de │ │ │ └── learnlib │ │ │ │ └── datastructure │ │ │ │ ├── discriminationtree │ │ │ │ ├── BinaryDTNode.java │ │ │ │ ├── BinaryDTree.java │ │ │ │ ├── MultiDTNode.java │ │ │ │ ├── MultiDTree.java │ │ │ │ ├── SplitData.java │ │ │ │ ├── iterators │ │ │ │ │ ├── DiscriminationTreeIterators.java │ │ │ │ │ └── NodeIterator.java │ │ │ │ └── model │ │ │ │ │ ├── AbstractDTNode.java │ │ │ │ │ ├── AbstractDiscriminationTree.java │ │ │ │ │ ├── AbstractTemporaryIntrusiveDTNode.java │ │ │ │ │ ├── AbstractWordBasedDTNode.java │ │ │ │ │ ├── AbstractWordBasedDiscriminationTree.java │ │ │ │ │ ├── BooleanMap.java │ │ │ │ │ └── LCAInfo.java │ │ │ │ ├── list │ │ │ │ ├── AbstractIntrusiveListEntryImpl.java │ │ │ │ ├── IntrusiveList.java │ │ │ │ └── IntrusiveListEntry.java │ │ │ │ ├── observationtable │ │ │ │ ├── GenericObservationTable.java │ │ │ │ ├── Inconsistency.java │ │ │ │ ├── MutableObservationTable.java │ │ │ │ ├── OTLearner.java │ │ │ │ ├── OTUtils.java │ │ │ │ ├── ObservationTable.java │ │ │ │ ├── ObservationTableFeature.java │ │ │ │ ├── Row.java │ │ │ │ ├── RowImpl.java │ │ │ │ ├── reader │ │ │ │ │ ├── ObservationTableReader.java │ │ │ │ │ ├── SimpleObservationTable.java │ │ │ │ │ └── SuffixASCIIReader.java │ │ │ │ └── writer │ │ │ │ │ ├── AbstractObservationTableWriter.java │ │ │ │ │ ├── ObservationTableASCIIWriter.java │ │ │ │ │ ├── ObservationTableHTMLWriter.java │ │ │ │ │ ├── ObservationTableWriter.java │ │ │ │ │ └── SuffixASCIIWriter.java │ │ │ │ └── pta │ │ │ │ ├── AbstractBasePTAState.java │ │ │ │ ├── AbstractBlueFringePTA.java │ │ │ │ ├── AbstractBlueFringePTAState.java │ │ │ │ ├── BasePTA.java │ │ │ │ ├── BlueFringePTA.java │ │ │ │ ├── BlueFringePTAState.java │ │ │ │ ├── Color.java │ │ │ │ ├── PTATransition.java │ │ │ │ ├── RedBlueMerge.java │ │ │ │ ├── config │ │ │ │ ├── DefaultProcessingOrders.java │ │ │ │ └── ProcessingOrder.java │ │ │ │ ├── visualization │ │ │ │ ├── BlueFringeVisualizationHelper.java │ │ │ │ └── PTAVisualizationHelper.java │ │ │ │ └── wrapper │ │ │ │ ├── DFAWrapper.java │ │ │ │ ├── MealyWrapper.java │ │ │ │ └── MooreWrapper.java │ │ │ └── module-info.java │ │ └── test │ │ ├── java │ │ └── de │ │ │ └── learnlib │ │ │ └── datastructure │ │ │ ├── discriminationtree │ │ │ ├── DummyDT.java │ │ │ ├── IteratorsTest.java │ │ │ ├── LCATest.java │ │ │ └── VisualizationTest.java │ │ │ ├── observationtable │ │ │ ├── MockedObservationTable.java │ │ │ ├── ObservationTableSource.java │ │ │ └── writer │ │ │ │ ├── ObservationTableWriterTest.java │ │ │ │ └── SuffixASCIIWriterTest.java │ │ │ └── pta │ │ │ ├── MergedAutomatonTest.java │ │ │ └── PTAVisualizationTest.java │ │ └── resources │ │ ├── OT_ASCII.txt │ │ ├── OT_HTML.html │ │ ├── dt.dot │ │ ├── merged.dot │ │ ├── promoted.dot │ │ └── pta.dot ├── pom.xml ├── settings │ ├── learnlib.properties │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ ├── de │ │ │ └── learnlib │ │ │ │ └── setting │ │ │ │ ├── LearnLibProperty.java │ │ │ │ ├── LearnLibSettings.java │ │ │ │ ├── LearnLibSettingsSource.java │ │ │ │ └── sources │ │ │ │ ├── LearnLibLocalPropertiesAutomataLibSettingsSource.java │ │ │ │ ├── LearnLibLocalPropertiesSource.java │ │ │ │ ├── LearnLibPropertiesAutomataLibSettingsSource.java │ │ │ │ ├── LearnLibPropertiesSource.java │ │ │ │ ├── LearnLibSystemPropertiesAutomataLibSettingsSource.java │ │ │ │ └── LearnLibSystemPropertiesSource.java │ │ │ └── module-info.java │ │ └── test │ │ ├── java │ │ └── de │ │ │ └── learnlib │ │ │ └── setting │ │ │ └── LearnLibSettingsTest.java │ │ └── resources │ │ └── automatalib.properties └── util │ ├── pom.xml │ └── src │ ├── main │ └── java │ │ ├── de │ │ └── learnlib │ │ │ └── util │ │ │ ├── AbstractBFOracle.java │ │ │ ├── Experiment.java │ │ │ ├── MQUtil.java │ │ │ ├── mealy │ │ │ ├── MealyLearnerWrapper.java │ │ │ ├── MealyUtil.java │ │ │ ├── PresetAdaptiveQuery.java │ │ │ ├── SymbolOracleWrapper.java │ │ │ └── WordAdaptiveQuery.java │ │ │ ├── moore │ │ │ ├── MooreLearnerWrapper.java │ │ │ ├── MooreUtil.java │ │ │ └── SymbolOracleWrapper.java │ │ │ ├── nfa │ │ │ └── NFALearnerWrapper.java │ │ │ └── statistic │ │ │ └── SimpleProfiler.java │ │ └── module-info.java │ └── test │ └── java │ └── de │ └── learnlib │ └── util │ └── ExperimentTest.java ├── distribution ├── pom.xml └── src │ ├── it │ ├── jlink │ │ └── pom.xml │ └── settings.xml │ └── main │ └── assembly │ ├── learnlib-bundle.xml │ ├── learnlib-dependencies-bundle.xml │ └── learnlib-sources-jar.xml ├── drivers ├── basic │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ ├── de │ │ │ └── learnlib │ │ │ │ └── driver │ │ │ │ ├── AbstractContextExecutableInputSUL.java │ │ │ │ ├── ContextExecutableInputSUL.java │ │ │ │ ├── ExecutableInputSUL.java │ │ │ │ └── reflect │ │ │ │ ├── Error.java │ │ │ │ ├── InstanceConstructor.java │ │ │ │ ├── MethodInput.java │ │ │ │ ├── MethodOutput.java │ │ │ │ ├── ReturnValue.java │ │ │ │ ├── SimplePOJOExceptionMapper.java │ │ │ │ ├── SimplePOJOTestDriver.java │ │ │ │ ├── Unobserved.java │ │ │ │ └── VoidOutput.java │ │ │ └── module-info.java │ │ └── test │ │ └── java │ │ └── de │ │ └── learnlib │ │ └── driver │ │ └── reflect │ │ └── SimplePOJOTestDriverTest.java ├── mapper │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ ├── de │ │ │ └── learnlib │ │ │ │ └── mapper │ │ │ │ ├── MappedSUL.java │ │ │ │ ├── MapperComposition.java │ │ │ │ ├── Mappers.java │ │ │ │ ├── SULMapperComposition.java │ │ │ │ ├── SULMappers.java │ │ │ │ └── StringMapper.java │ │ │ └── module-info.java │ │ └── test │ │ └── java │ │ └── de │ │ └── learnlib │ │ └── mapper │ │ ├── MappedSULTest.java │ │ ├── MapperCompositionTest.java │ │ └── SULMapperCompositionTest.java ├── pom.xml └── simulator │ ├── pom.xml │ └── src │ └── main │ └── java │ ├── de │ └── learnlib │ │ └── driver │ │ └── simulator │ │ ├── MealySimulatorSUL.java │ │ ├── ObservableMealySimulatorSUL.java │ │ └── StateLocalInputMealySimulatorSUL.java │ └── module-info.java ├── examples ├── pom.xml └── src │ ├── main │ ├── java │ │ ├── de │ │ │ └── learnlib │ │ │ │ └── example │ │ │ │ ├── Example1.java │ │ │ │ ├── Example2.java │ │ │ │ ├── Example3.java │ │ │ │ ├── aaar │ │ │ │ ├── AlternatingBitExampleExplicit.java │ │ │ │ ├── AlternatingBitExampleGeneric.java │ │ │ │ ├── Event.java │ │ │ │ └── Protocol.java │ │ │ │ ├── bbc │ │ │ │ ├── Example1.java │ │ │ │ ├── Example2.java │ │ │ │ ├── Example3.java │ │ │ │ └── Example4.java │ │ │ │ ├── parallelism │ │ │ │ ├── ParallelismExample1.java │ │ │ │ └── ParallelismExample2.java │ │ │ │ ├── passive │ │ │ │ └── Example1.java │ │ │ │ ├── resumable │ │ │ │ └── ResumableExample.java │ │ │ │ └── sli │ │ │ │ ├── Example1.java │ │ │ │ └── Example2.java │ │ └── module-info.java │ └── resources │ │ ├── automatalib.properties │ │ └── logback.xml │ └── test │ └── java │ └── de │ └── learnlib │ └── example │ └── ExamplesTest.java ├── filters ├── cache │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ ├── de │ │ │ └── learnlib │ │ │ │ └── filter │ │ │ │ └── cache │ │ │ │ ├── DynamicSymbolComparator.java │ │ │ │ ├── InterningMembershipOracle.java │ │ │ │ ├── LearningCache.java │ │ │ │ ├── LearningCacheOracle.java │ │ │ │ ├── ReverseLexCmp.java │ │ │ │ ├── dfa │ │ │ │ ├── DFACacheConsistencyTest.java │ │ │ │ ├── DFACacheOracle.java │ │ │ │ ├── DFACaches.java │ │ │ │ ├── DFAHashCacheConsistencyTest.java │ │ │ │ ├── DFAHashCacheOracle.java │ │ │ │ ├── ProxyQuery.java │ │ │ │ ├── ThreadSafeDFACacheConsistencyTest.java │ │ │ │ ├── ThreadSafeDFACacheOracle.java │ │ │ │ └── ThreadSafeDFACaches.java │ │ │ │ ├── mealy │ │ │ │ ├── AdaptiveQueryCache.java │ │ │ │ ├── MasterQuery.java │ │ │ │ ├── MealyCacheConsistencyTest.java │ │ │ │ ├── MealyCacheOracle.java │ │ │ │ ├── MealyCaches.java │ │ │ │ ├── ThreadSafeMealyCacheConsistencyTest.java │ │ │ │ ├── ThreadSafeMealyCacheOracle.java │ │ │ │ └── ThreadSafeMealyCaches.java │ │ │ │ ├── moore │ │ │ │ ├── MasterQuery.java │ │ │ │ ├── MooreCacheConsistencyTest.java │ │ │ │ ├── MooreCacheOracle.java │ │ │ │ ├── MooreCaches.java │ │ │ │ ├── ThreadSafeMooreCacheConsistencyTest.java │ │ │ │ ├── ThreadSafeMooreCacheOracle.java │ │ │ │ └── ThreadSafeMooreCaches.java │ │ │ │ └── sul │ │ │ │ ├── AbstractSULCache.java │ │ │ │ ├── SULCache.java │ │ │ │ ├── SULCaches.java │ │ │ │ ├── StateLocalInputSULCache.java │ │ │ │ ├── ThreadSafeSULCache.java │ │ │ │ ├── ThreadSafeSULCaches.java │ │ │ │ └── ThreadSafeStateLocalInputSULCache.java │ │ │ └── module-info.java │ │ └── test │ │ └── java │ │ └── de │ │ └── learnlib │ │ └── filter │ │ └── cache │ │ ├── AbstractCacheTest.java │ │ ├── AbstractParallelCacheTest.java │ │ ├── CacheConfig.java │ │ ├── CacheCreator.java │ │ ├── CacheTestUtils.java │ │ ├── InterningMembershipOracleTest.java │ │ ├── SULLearningCacheOracle.java │ │ ├── dfa │ │ ├── AbstractDFACacheTest.java │ │ ├── DFADAGCacheTest.java │ │ ├── DFAHashCacheTest.java │ │ ├── DFAParallelCacheTest.java │ │ └── DFATreeCacheTest.java │ │ ├── mealy │ │ ├── AbstractMealyCacheTest.java │ │ ├── AdaptiveQueryCacheTest.java │ │ ├── DynamicMealyTreeCacheTest.java │ │ ├── DynamicMealyTreeMapperCacheTest.java │ │ ├── MealyDAGCacheTest.java │ │ ├── MealyDAGMapperCacheTest.java │ │ ├── MealyParallelCacheTest.java │ │ ├── MealyTreeCacheTest.java │ │ └── MealyTreeMapperCacheTest.java │ │ ├── moore │ │ ├── AbstractMooreCacheTest.java │ │ ├── MooreDAGCacheTest.java │ │ ├── MooreDAGMapperCacheTest.java │ │ ├── MooreParallelCacheTest.java │ │ ├── MooreTreeCacheTest.java │ │ └── MooreTreeMapperCacheTest.java │ │ └── sul │ │ ├── AbstractSULCacheTest.java │ │ ├── SLISULParallelCacheTest.java │ │ ├── SULDAGCacheTest.java │ │ ├── SULParallelCacheTest.java │ │ ├── SULTreeCacheTest.java │ │ └── StateLocalInputSULTreeCacheTest.java ├── pom.xml ├── reuse │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ ├── de │ │ │ └── learnlib │ │ │ │ └── filter │ │ │ │ └── reuse │ │ │ │ ├── BuilderDefaults.java │ │ │ │ ├── ReuseCapableOracle.java │ │ │ │ ├── ReuseException.java │ │ │ │ ├── ReuseOracle.java │ │ │ │ └── tree │ │ │ │ ├── BoundedDeque.java │ │ │ │ ├── ReuseEdge.java │ │ │ │ ├── ReuseNode.java │ │ │ │ ├── ReuseTree.java │ │ │ │ ├── ReuseTreeDotHelper.java │ │ │ │ └── SystemStateHandler.java │ │ │ └── module-info.java │ │ └── test │ │ └── java │ │ └── de │ │ └── learnlib │ │ └── filter │ │ └── reuse │ │ └── test │ │ ├── DomainKnowledgeTest.java │ │ ├── LearningTest.java │ │ ├── QuiescenceTest.java │ │ └── ReuseOracleTest.java └── statistics │ ├── pom.xml │ └── src │ ├── main │ └── java │ │ ├── de │ │ └── learnlib │ │ │ └── filter │ │ │ └── statistic │ │ │ ├── AbstractStatisticData.java │ │ │ ├── Counter.java │ │ │ ├── CounterCollection.java │ │ │ ├── HistogramDataSet.java │ │ │ ├── learner │ │ │ └── RefinementCounterLearner.java │ │ │ ├── oracle │ │ │ ├── CounterAdaptiveQueryOracle.java │ │ │ ├── CounterOracle.java │ │ │ └── HistogramOracle.java │ │ │ └── sul │ │ │ ├── CounterObservableSUL.java │ │ │ ├── CounterSUL.java │ │ │ └── CounterStateLocalInputSUL.java │ │ └── module-info.java │ └── test │ ├── java │ └── de │ │ └── learnlib │ │ └── filter │ │ └── statistic │ │ ├── NoopQuery.java │ │ ├── TestQueries.java │ │ ├── oracle │ │ ├── CounterAdaptiveOracleTest.java │ │ ├── CounterOracleTest.java │ │ └── HistogramOracleTest.java │ │ └── sul │ │ ├── AbstractCounterSULTest.java │ │ ├── AbstractResetCounterSULTest.java │ │ ├── AbstractSymbolCounterSULTest.java │ │ ├── ResetCounterObservableSULTest.java │ │ ├── ResetCounterSULTest.java │ │ ├── ResetCounterStateLocalInputSULTest.java │ │ ├── SymbolCounterObservableSULTest.java │ │ ├── SymbolCounterSULTest.java │ │ └── SymbolCounterStateLocalInputSULTest.java │ └── resources │ ├── histogram_details.txt │ └── histogram_summary.txt ├── oracles ├── emptiness-oracles │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ ├── de │ │ │ └── learnlib │ │ │ │ └── oracle │ │ │ │ └── emptiness │ │ │ │ ├── AbstractBFEmptinessOracle.java │ │ │ │ └── LassoEmptinessOracleImpl.java │ │ │ └── module-info.java │ │ └── test │ │ └── java │ │ └── de │ │ └── learnlib │ │ └── oracle │ │ └── emptiness │ │ ├── AbstractBFEmptinessOracleTest.java │ │ ├── AbstractLassoEmptinessOracleImplTest.java │ │ ├── DFABFEmptinessOracleTest.java │ │ ├── DFALassoEmptinessOracleImplTest.java │ │ ├── MealyBFEmptinessOracleTest.java │ │ └── MealyLassoEmptinessOracleImplTest.java ├── equivalence-oracles │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ ├── de │ │ │ └── learnlib │ │ │ │ └── oracle │ │ │ │ └── equivalence │ │ │ │ ├── AbstractBFInclusionOracle.java │ │ │ │ ├── AbstractTestWordEQOracle.java │ │ │ │ ├── CExFirstOracle.java │ │ │ │ ├── CompleteExplorationEQOracle.java │ │ │ │ ├── DisproveFirstOracle.java │ │ │ │ ├── EQOracleChain.java │ │ │ │ ├── IncrementalWMethodEQOracle.java │ │ │ │ ├── RandomWMethodEQOracle.java │ │ │ │ ├── RandomWordsEQOracle.java │ │ │ │ ├── RandomWpMethodEQOracle.java │ │ │ │ ├── SampleSetEQOracle.java │ │ │ │ ├── SimulatorEQOracle.java │ │ │ │ ├── WMethodEQOracle.java │ │ │ │ ├── WpMethodEQOracle.java │ │ │ │ ├── mealy │ │ │ │ ├── RandomWalkEQOracle.java │ │ │ │ ├── StateLocalInputMealySimulatorEQOracle.java │ │ │ │ └── SymbolEQOracleWrapper.java │ │ │ │ ├── sba │ │ │ │ ├── SimulatorEQOracle.java │ │ │ │ └── WMethodEQOracle.java │ │ │ │ ├── spa │ │ │ │ ├── SimulatorEQOracle.java │ │ │ │ ├── WMethodEQOracle.java │ │ │ │ └── WpMethodEQOracle.java │ │ │ │ ├── spmm │ │ │ │ ├── SimulatorEQOracle.java │ │ │ │ └── WMethodEQOracle.java │ │ │ │ └── vpa │ │ │ │ ├── RandomWellMatchedWordsEQOracle.java │ │ │ │ └── SimulatorEQOracle.java │ │ │ └── module-info.java │ │ └── test │ │ └── java │ │ └── de │ │ └── learnlib │ │ └── oracle │ │ └── equivalence │ │ ├── AbstractBFInclusionOracleTest.java │ │ ├── AbstractEQOracleTest.java │ │ ├── CExFirstOracleTest.java │ │ ├── DFABFInclusionOracleTest.java │ │ ├── DisproveFirstOracleTest.java │ │ ├── EmptyAutomatonOracleTest.java │ │ ├── IncrementalWMethodEQOracleTest.java │ │ ├── MealyBFInclusionOracleTest.java │ │ ├── RandomWMethodEQOracleTest.java │ │ ├── RandomWordsEQOracleTest.java │ │ ├── RandomWpMethodEQOracleTest.java │ │ ├── SampleSetEQOracleTest.java │ │ ├── TestWordEQOracleBatchTest.java │ │ ├── mealy │ │ └── RandomWalkEQOracleTest.java │ │ ├── sba │ │ └── WMethodEQOracleTest.java │ │ ├── spa │ │ ├── WMethodEQOracleTest.java │ │ └── WpMethodEQOracleTest.java │ │ ├── spmm │ │ └── WMethodEQOracleTest.java │ │ └── vpa │ │ └── RandomWellMatchedWordsEQOracleTest.java ├── membership-oracles │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ ├── de │ │ │ └── learnlib │ │ │ │ └── oracle │ │ │ │ └── membership │ │ │ │ ├── AbstractSULOmegaOracle.java │ │ │ │ ├── MappedOracle.java │ │ │ │ ├── SULAdaptiveOracle.java │ │ │ │ ├── SULOracle.java │ │ │ │ ├── SimulatorOmegaOracle.java │ │ │ │ ├── SimulatorOracle.java │ │ │ │ ├── StateLocalInputSULAdaptiveOracle.java │ │ │ │ └── StateLocalInputSULOracle.java │ │ │ └── module-info.java │ │ └── test │ │ └── java │ │ └── de │ │ └── learnlib │ │ └── oracle │ │ └── membership │ │ ├── AdaptiveTestQuery.java │ │ ├── SULAdaptiveOracleTest.java │ │ ├── SULOmegaOracleTest.java │ │ ├── SimulatorOmegaOracleTest.java │ │ ├── SimulatorOracleTest.java │ │ └── StateLocalInputSULAdaptiveOracleTest.java ├── parallelism │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ ├── de │ │ │ └── learnlib │ │ │ │ └── oracle │ │ │ │ └── parallelism │ │ │ │ ├── AbstractDynamicBatchProcessor.java │ │ │ │ ├── AbstractDynamicBatchProcessorBuilder.java │ │ │ │ ├── AbstractQueriesJob.java │ │ │ │ ├── AbstractStaticBatchProcessor.java │ │ │ │ ├── AbstractStaticBatchProcessorBuilder.java │ │ │ │ ├── BatchProcessorDefaults.java │ │ │ │ ├── DynamicParallelAdaptiveOracle.java │ │ │ │ ├── DynamicParallelAdaptiveOracleBuilder.java │ │ │ │ ├── DynamicParallelOmegaOracle.java │ │ │ │ ├── DynamicParallelOmegaOracleBuilder.java │ │ │ │ ├── DynamicParallelOracle.java │ │ │ │ ├── DynamicParallelOracleBuilder.java │ │ │ │ ├── DynamicQueriesJob.java │ │ │ │ ├── ParallelOracleBuilders.java │ │ │ │ ├── StaticParallelAdaptiveOracle.java │ │ │ │ ├── StaticParallelAdaptiveOracleBuilder.java │ │ │ │ ├── StaticParallelOmegaOracle.java │ │ │ │ ├── StaticParallelOmegaOracleBuilder.java │ │ │ │ ├── StaticParallelOracle.java │ │ │ │ ├── StaticParallelOracleBuilder.java │ │ │ │ └── StaticQueriesJob.java │ │ │ └── module-info.java │ │ └── test │ │ ├── java │ │ └── de │ │ │ └── learnlib │ │ │ └── oracle │ │ │ └── parallelism │ │ │ ├── AbstractDynamicParallelAdaptiveOracleTest.java │ │ │ ├── AbstractDynamicParallelOmegaOracleTest.java │ │ │ ├── AbstractDynamicParallelOracleTest.java │ │ │ ├── AbstractStaticParallelAdaptiveOracleTest.java │ │ │ ├── AbstractStaticParallelOmegaOracleTest.java │ │ │ ├── AbstractStaticParallelOracleTest.java │ │ │ ├── DynamicParallelAdaptiveOracleTest.java │ │ │ ├── DynamicParallelAdaptiveSupplierTest.java │ │ │ ├── DynamicParallelObservableSULTest.java │ │ │ ├── DynamicParallelOmegaOracleTest.java │ │ │ ├── DynamicParallelOmegaSupplierTest.java │ │ │ ├── DynamicParallelOracleBuilderTest.java │ │ │ ├── DynamicParallelOracleTest.java │ │ │ ├── DynamicParallelSLISULTest.java │ │ │ ├── DynamicParallelSULTest.java │ │ │ ├── DynamicParallelSupplierTest.java │ │ │ ├── OmegaException.java │ │ │ ├── SettingsTest.java │ │ │ ├── StaticParallelAdaptiveOracleTest.java │ │ │ ├── StaticParallelAdaptiveSupplierTest.java │ │ │ ├── StaticParallelObservableSULTest.java │ │ │ ├── StaticParallelOmegaOracleTest.java │ │ │ ├── StaticParallelOmegaSupplierTest.java │ │ │ ├── StaticParallelOracleBuilderTest.java │ │ │ ├── StaticParallelOracleTest.java │ │ │ ├── StaticParallelSLISULTest.java │ │ │ ├── StaticParallelSULTest.java │ │ │ ├── StaticParallelSupplierTest.java │ │ │ └── Utils.java │ │ └── resources │ │ └── learnlib.properties ├── pom.xml └── property-oracles │ ├── pom.xml │ └── src │ ├── main │ └── java │ │ ├── de │ │ └── learnlib │ │ │ └── oracle │ │ │ └── property │ │ │ ├── AbstractPropertyOracle.java │ │ │ ├── DFAFinitePropertyOracle.java │ │ │ ├── DFALassoPropertyOracle.java │ │ │ ├── LoggingPropertyOracle.java │ │ │ ├── MealyFinitePropertyOracle.java │ │ │ ├── MealyLassoPropertyOracle.java │ │ │ └── PropertyOracleChain.java │ │ └── module-info.java │ └── test │ └── java │ └── de │ └── learnlib │ └── oracle │ └── property │ └── MealyPropertyOracleTest.java ├── pom.xml ├── src └── site │ └── site.xml └── test-support ├── learner-it-support ├── pom.xml └── src │ └── main │ └── java │ ├── de │ └── learnlib │ │ └── testsupport │ │ └── it │ │ └── learner │ │ ├── AbstractDFALearnerIT.java │ │ ├── AbstractDFAPassiveLearnerIT.java │ │ ├── AbstractLearnerVariantITCase.java │ │ ├── AbstractMealyLearnerIT.java │ │ ├── AbstractMealyPassiveLearnerIT.java │ │ ├── AbstractMealySymLearnerIT.java │ │ ├── AbstractMooreLearnerIT.java │ │ ├── AbstractMoorePassiveLearnerIT.java │ │ ├── AbstractMooreSymLearnerIT.java │ │ ├── AbstractOneSEVPALearnerIT.java │ │ ├── AbstractSBALearnerIT.java │ │ ├── AbstractSPALearnerIT.java │ │ ├── AbstractSPMMLearnerIT.java │ │ ├── AbstractSSTPassiveLearnerIT.java │ │ ├── LearnerITUtil.java │ │ ├── LearnerVariant.java │ │ ├── LearnerVariantList.java │ │ ├── LearnerVariantListImpl.java │ │ ├── OneSEVPALearnerITCase.java │ │ ├── PassiveLearnerVariant.java │ │ ├── PassiveLearnerVariantITCase.java │ │ ├── PassiveLearnerVariantList.java │ │ ├── PassiveLearnerVariantListImpl.java │ │ ├── SBALearnerITCase.java │ │ ├── SPALearnerITCase.java │ │ ├── SPMMLearnerITCase.java │ │ └── UniversalDeterministicLearnerITCase.java │ └── module-info.java ├── learning-examples ├── pom.xml └── src │ ├── main │ ├── java │ │ ├── de │ │ │ └── learnlib │ │ │ │ └── testsupport │ │ │ │ └── example │ │ │ │ ├── DefaultLearningExample.java │ │ │ │ ├── DefaultPassiveLearningExample.java │ │ │ │ ├── LearningExample.java │ │ │ │ ├── LearningExamples.java │ │ │ │ ├── PassiveLearningExample.java │ │ │ │ ├── dfa │ │ │ │ ├── DFABenchmarks.java │ │ │ │ ├── ExampleAngluin.java │ │ │ │ ├── ExampleKeylock.java │ │ │ │ ├── ExamplePaulAndMary.java │ │ │ │ ├── ExampleRandomDFA.java │ │ │ │ └── ExampleTinyDFA.java │ │ │ │ ├── mealy │ │ │ │ ├── ExampleCoffeeMachine.java │ │ │ │ ├── ExampleGrid.java │ │ │ │ ├── ExampleRandomMealy.java │ │ │ │ ├── ExampleRandomStateLocalInputMealy.java │ │ │ │ ├── ExampleShahbazGroz.java │ │ │ │ ├── ExampleStack.java │ │ │ │ └── ExampleTinyMealy.java │ │ │ │ ├── moore │ │ │ │ └── ExampleRandomMoore.java │ │ │ │ ├── sba │ │ │ │ ├── ExamplePalindrome.java │ │ │ │ └── ExampleRandomSBA.java │ │ │ │ ├── spa │ │ │ │ ├── ExamplePalindrome.java │ │ │ │ └── ExampleRandomSPA.java │ │ │ │ ├── spmm │ │ │ │ ├── ExamplePalindrome.java │ │ │ │ └── ExampleRandomSPMM.java │ │ │ │ ├── sst │ │ │ │ └── ExampleRandomSST.java │ │ │ │ └── vpa │ │ │ │ └── ExampleRandomOneSEVPA.java │ │ └── module-info.java │ └── resources │ │ └── automata │ │ └── learnlibv2 │ │ ├── peterson2.dfa.gz │ │ ├── peterson3.dfa.gz │ │ ├── pots2.dfa.gz │ │ └── pots3.dfa.gz │ └── test │ └── java │ └── de │ └── learnlib │ └── example │ └── dfa │ └── DFAExamplesTest.java ├── pom.xml └── test-support ├── pom.xml └── src └── main └── java ├── de └── learnlib │ └── testsupport │ ├── AbstractBFOracleTest.java │ ├── AbstractGrowingAlphabetDFATest.java │ ├── AbstractGrowingAlphabetMealyTest.java │ ├── AbstractGrowingAlphabetMooreTest.java │ ├── AbstractGrowingAlphabetTest.java │ ├── AbstractResumableLearnerDFATest.java │ ├── AbstractResumableLearnerMealyTest.java │ ├── AbstractResumableLearnerMooreTest.java │ ├── AbstractResumableLearnerTest.java │ ├── MQ2AQWrapper.java │ ├── ResumeUtils.java │ └── VisualizationUtils.java └── module-info.java /.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 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.github/settings.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | false 6 | 7 | 8 | 9 | ossrh 10 | ${env.OSSRH_TOKEN_USERNAME} 11 | ${env.OSSRH_TOKEN_PASSWORD} 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /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/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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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/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 | -------------------------------------------------------------------------------- /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/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 | public interface ADSCalculator { 26 | 27 | Optional> compute(MealyMachine hypothesis, 28 | Alphabet alphabet, 29 | Set targets); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /algorithms/active/adt/src/main/java/de/learnlib/algorithm/adt/config/model/DefensiveADSCalculator.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 de.learnlib.algorithm.adt.api.PartialTransitionAnalyzer; 23 | import net.automatalib.alphabet.Alphabet; 24 | import net.automatalib.automaton.transducer.MealyMachine; 25 | 26 | public interface DefensiveADSCalculator { 27 | 28 | Optional> compute(MealyMachine automaton, 29 | Alphabet alphabet, 30 | Set states, 31 | PartialTransitionAnalyzer partialTransitionAnalyzer); 32 | } 33 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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/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/lambda/src/test/java/de/learnlib/algorithm/lambda/lstar/mealy/LLambdaMealyGrowingAlphabetTest.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.mealy; 17 | 18 | import de.learnlib.algorithm.lambda.lstar.LLambdaMealy; 19 | import de.learnlib.oracle.MembershipOracle.MealyMembershipOracle; 20 | import de.learnlib.testsupport.AbstractGrowingAlphabetMealyTest; 21 | import net.automatalib.alphabet.Alphabet; 22 | 23 | public class LLambdaMealyGrowingAlphabetTest 24 | extends AbstractGrowingAlphabetMealyTest> { 25 | 26 | @Override 27 | protected LLambdaMealy getLearner(MealyMembershipOracle oracle, 28 | Alphabet alphabet) { 29 | return new LLambdaMealy<>(alphabet, oracle); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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/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/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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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-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 | -------------------------------------------------------------------------------- /algorithms/active/ttt-vpa/src/main/java/de/learnlib/algorithm/ttt/vpa/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.vpa; 17 | 18 | import de.learnlib.algorithm.observationpack.vpa.hypothesis.ContextPair; 19 | import de.learnlib.algorithm.observationpack.vpa.hypothesis.HypLoc; 20 | 21 | final class OutputInconsistency { 22 | 23 | public final HypLoc location; 24 | 25 | public final ContextPair discriminator; 26 | 27 | public final boolean expectedOut; 28 | 29 | OutputInconsistency(HypLoc location, ContextPair discriminator, boolean expectedOut) { 30 | this.location = location; 31 | this.discriminator = discriminator; 32 | this.expectedOut = expectedOut; 33 | } 34 | 35 | public int totalLength() { 36 | return location.getAccessSequence().length() + discriminator.getLength(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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.learner.AbstractSSTPassiveLearnerIT; 19 | import de.learnlib.testsupport.it.learner.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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | public interface AccessSequenceProvider { 28 | 29 | /** 30 | * Retrieves the access sequence of this object. 31 | * 32 | * @return the access sequence 33 | */ 34 | Word getAccessSequence(); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /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 | public interface AccessSequenceTransformer { 21 | 22 | Word transformAccessSequence(Word word); 23 | 24 | default Word longestASPrefix(Word word) { 25 | int len = word.length(); 26 | Word lastPrefix = Word.epsilon(); 27 | for (int i = 1; i <= len; i++) { 28 | Word prefix = word.prefix(i); 29 | if (!isAccessSequence(prefix)) { 30 | return lastPrefix; 31 | } 32 | lastPrefix = prefix; 33 | } 34 | return word; 35 | } 36 | 37 | default boolean isAccessSequence(Word word) { 38 | return word.equals(transformAccessSequence(word)); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /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/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/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 | public interface BatchProcessor { 30 | 31 | /** 32 | * Process the batch. 33 | * 34 | * @param batch 35 | * the batch to process 36 | * 37 | * @throws BatchInterruptedException 38 | * if the processing thread was interrupted by an exception. 39 | */ 40 | void processBatch(Collection batch); 41 | 42 | } 43 | -------------------------------------------------------------------------------- /api/src/main/java/de/learnlib/oracle/LassoEmptinessOracle.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.modelchecking.Lasso; 19 | import net.automatalib.modelchecking.Lasso.DFALasso; 20 | import net.automatalib.modelchecking.Lasso.MealyLasso; 21 | import net.automatalib.word.Word; 22 | 23 | /** 24 | * An emptiness oracle for lassos. 25 | * 26 | * @see EmptinessOracle 27 | * 28 | * @param the lasso type 29 | * @param the input type 30 | * @param the output type 31 | */ 32 | public interface LassoEmptinessOracle, I, D> extends EmptinessOracle { 33 | 34 | interface DFALassoEmptinessOracle extends LassoEmptinessOracle, I, Boolean> {} 35 | 36 | interface MealyLassoEmptinessOracle extends LassoEmptinessOracle, I, Word> {} 37 | } 38 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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 | public interface QueryAnswerer { 29 | 30 | default D answerQuery(Word input) { 31 | return answerQuery(Word.epsilon(), input); 32 | } 33 | 34 | D answerQuery(Word prefix, Word suffix); 35 | 36 | default MembershipOracle asOracle() { 37 | return queries -> queries.forEach(q -> q.answer(answerQuery(q.getPrefix(), q.getSuffix()))); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /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 | public interface SingleAdaptiveMembershipOracle extends AdaptiveMembershipOracle { 29 | 30 | @Override 31 | default void processQueries(Collection> queries) { 32 | for (AdaptiveQuery query : queries) { 33 | processQuery(query); 34 | } 35 | } 36 | 37 | @Override 38 | void processQuery(AdaptiveQuery query); 39 | } 40 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /api/src/main/java/de/learnlib/statistic/StatisticCollector.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.statistic; 17 | 18 | /** 19 | * A utility interface to indicate that the implementing class collects statistical information that may be obtained via 20 | * its {@link #getStatisticalData()} method. 21 | */ 22 | public interface StatisticCollector { 23 | 24 | /** 25 | * Returns this statistical data gathered by this collector. 26 | * 27 | * @return the statistical data gathered by this collector 28 | */ 29 | StatisticData getStatisticalData(); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /api/src/main/java/de/learnlib/statistic/StatisticData.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.statistic; 17 | 18 | /** 19 | * Common interface for statistical data. 20 | */ 21 | public interface StatisticData { 22 | 23 | String getName(); 24 | 25 | String getUnit(); 26 | 27 | String getSummary(); 28 | 29 | String getDetails(); 30 | } 31 | 32 | -------------------------------------------------------------------------------- /api/src/main/java/de/learnlib/statistic/StatisticOracle.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 | package de.learnlib.statistic; 18 | 19 | import de.learnlib.oracle.MembershipOracle; 20 | 21 | /** 22 | * Common interface for oracles keeping statistics. 23 | * 24 | * @param 25 | * input symbol class 26 | * @param 27 | * output domain class 28 | */ 29 | public interface StatisticOracle extends MembershipOracle, StatisticCollector {} 30 | -------------------------------------------------------------------------------- /api/src/main/java/de/learnlib/statistic/StatisticSUL.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.statistic; 17 | 18 | import de.learnlib.sul.SUL; 19 | 20 | public interface StatisticSUL extends SUL, StatisticCollector {} 21 | -------------------------------------------------------------------------------- /api/src/main/java/de/learnlib/sul/ContextExecutableInput.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 | * A context executable input is an input that performs a specific action on a {@link SUL} itself, given a specific 22 | * execution context. 23 | * 24 | * @param 25 | * output 26 | * @param 27 | * context 28 | */ 29 | public interface ContextExecutableInput { 30 | 31 | /** 32 | * Executes {@code this} input symbol with a given context. 33 | * 34 | * @param context 35 | * the context for {@code this} input symbol 36 | * 37 | * @return the output generated by the {@link SUL} 38 | * 39 | * @throws SULException 40 | * if {@code this} input cannot be executed on the {@link SUL} 41 | */ 42 | O execute(C context); 43 | } 44 | -------------------------------------------------------------------------------- /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/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 | public interface ExecutableInput { 27 | 28 | /** 29 | * Executes {@code this} input symbol. 30 | * 31 | * @return the output generated by the {@link SUL} 32 | * 33 | * @throws SULException 34 | * if {@code this} input cannot be executed on the {@link SUL} 35 | */ 36 | O execute(); 37 | 38 | } 39 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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/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/basic/src/test/resources/projects/basic/goal.txt: -------------------------------------------------------------------------------- 1 | package 2 | 3 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /archetypes/complete/src/test/resources/projects/complete/goal.txt: -------------------------------------------------------------------------------- 1 | package 2 | 3 | -------------------------------------------------------------------------------- /build-config/.gitignore: -------------------------------------------------------------------------------- 1 | /pages/ 2 | -------------------------------------------------------------------------------- /build-config/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 4.0.0 20 | 21 | 22 | de.learnlib 23 | learnlib-parent 24 | 0.19.0-SNAPSHOT 25 | ../pom.xml 26 | 27 | 28 | learnlib-build-config 29 | 30 | LearnLib :: Build Config 31 | Configs and other resources required for building LearnLib 32 | 33 | -------------------------------------------------------------------------------- /build-config/src/main/resources/learnlib-checkstyle-suppressions.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /build-config/src/main/resources/license-header-java.txt: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /build-config/src/main/resources/license-header-xml.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /commons/counterexamples/src/main/java/de/learnlib/acex/AbstractNamedAcexAnalyzer.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 | /** 19 | * An abstract counterexample analyzer that carries a name. 20 | */ 21 | public abstract class AbstractNamedAcexAnalyzer implements AcexAnalyzer { 22 | 23 | private final String name; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param name 29 | * the name of the counterexample analyzer 30 | */ 31 | public AbstractNamedAcexAnalyzer(String name) { 32 | this.name = name; 33 | } 34 | 35 | @Override 36 | public String toString() { 37 | return getName(); 38 | } 39 | 40 | /** 41 | * Retrieves the name of this analyzer. 42 | * 43 | * @return the name of this analyzer 44 | */ 45 | public String getName() { 46 | return name; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | public interface ObservationTableFeature { 19 | 20 | ObservationTable getObservationTable(); 21 | } 22 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | public interface LearnLibSettingsSource extends SettingsSource {} 21 | -------------------------------------------------------------------------------- /commons/settings/src/main/java/de/learnlib/setting/sources/LearnLibLocalPropertiesAutomataLibSettingsSource.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.LocalFileSource; 20 | import org.kohsuke.MetaInfServices; 21 | 22 | @MetaInfServices(AutomataLibSettingsSource.class) 23 | public class LearnLibLocalPropertiesAutomataLibSettingsSource extends LocalFileSource 24 | implements AutomataLibSettingsSource { 25 | 26 | private static final int PRIORITY_DECREASE = 10; 27 | 28 | public LearnLibLocalPropertiesAutomataLibSettingsSource() { 29 | super("./learnlib.properties"); 30 | } 31 | 32 | @Override 33 | public int getPriority() { 34 | return super.getPriority() - PRIORITY_DECREASE; // bump prio down a bit 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /commons/settings/src/test/resources/automatalib.properties: -------------------------------------------------------------------------------- 1 | automatalib.word.delim.left=delim_left 2 | automatalib.word.empty=empty_rep 3 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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/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/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/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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/main/java/de/learnlib/filter/statistic/AbstractStatisticData.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 | package de.learnlib.filter.statistic; 18 | 19 | import de.learnlib.statistic.StatisticData; 20 | 21 | /** 22 | * Common interface for statistical data. 23 | */ 24 | public abstract class AbstractStatisticData implements StatisticData { 25 | 26 | private final String name; 27 | private final String unit; 28 | 29 | protected AbstractStatisticData(String name, String unit) { 30 | this.name = name; 31 | this.unit = unit; 32 | } 33 | 34 | @Override 35 | public String getName() { 36 | return name; 37 | } 38 | 39 | @Override 40 | public String getUnit() { 41 | return unit; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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.statistic.StatisticSUL; 23 | import net.automatalib.word.Word; 24 | 25 | public abstract class AbstractResetCounterSULTest> 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 | -------------------------------------------------------------------------------- /filters/statistics/src/test/java/de/learnlib/filter/statistic/sul/ResetCounterObservableSULTest.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 de.learnlib.driver.simulator.ObservableMealySimulatorSUL; 19 | import de.learnlib.filter.statistic.Counter; 20 | import de.learnlib.filter.statistic.TestQueries; 21 | 22 | public class ResetCounterObservableSULTest 23 | extends AbstractResetCounterSULTest> { 24 | 25 | @Override 26 | protected CounterObservableSUL getStatisticSUL() { 27 | return new CounterObservableSUL<>(new ObservableMealySimulatorSUL<>(TestQueries.DELEGATE)); 28 | } 29 | 30 | @Override 31 | protected Counter getCounter(CounterObservableSUL sul) { 32 | return sul.getResetCounter(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /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 de.learnlib.driver.simulator.MealySimulatorSUL; 19 | import de.learnlib.filter.statistic.Counter; 20 | import de.learnlib.filter.statistic.TestQueries; 21 | 22 | public class ResetCounterSULTest extends AbstractResetCounterSULTest> { 23 | 24 | @Override 25 | protected CounterSUL getStatisticSUL() { 26 | return new CounterSUL<>(new MealySimulatorSUL<>(TestQueries.DELEGATE)); 27 | } 28 | 29 | @Override 30 | protected Counter getCounter(CounterSUL sul) { 31 | return sul.getResetCounter(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /filters/statistics/src/test/java/de/learnlib/filter/statistic/sul/SymbolCounterObservableSULTest.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 de.learnlib.driver.simulator.ObservableMealySimulatorSUL; 19 | import de.learnlib.filter.statistic.Counter; 20 | import de.learnlib.filter.statistic.TestQueries; 21 | 22 | public class SymbolCounterObservableSULTest 23 | extends AbstractSymbolCounterSULTest> { 24 | 25 | @Override 26 | protected CounterObservableSUL getStatisticSUL() { 27 | return new CounterObservableSUL<>(new ObservableMealySimulatorSUL<>(TestQueries.DELEGATE)); 28 | } 29 | 30 | @Override 31 | protected Counter getCounter(CounterObservableSUL sul) { 32 | return sul.getSymbolCounter(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /filters/statistics/src/test/java/de/learnlib/filter/statistic/sul/SymbolCounterSULTest.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 de.learnlib.driver.simulator.MealySimulatorSUL; 19 | import de.learnlib.filter.statistic.Counter; 20 | import de.learnlib.filter.statistic.TestQueries; 21 | 22 | public class SymbolCounterSULTest extends AbstractSymbolCounterSULTest> { 23 | 24 | @Override 25 | protected CounterSUL getStatisticSUL() { 26 | return new CounterSUL<>(new MealySimulatorSUL<>(TestQueries.DELEGATE)); 27 | } 28 | 29 | @Override 30 | protected Counter getCounter(CounterSUL sul) { 31 | return sul.getSymbolCounter(); 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /filters/statistics/src/test/resources/histogram_details.txt: -------------------------------------------------------------------------------- 1 | testCounter [query length]: 4 (count), 10 (sum), 2.5 (mean), 0.0 (median) 2 | 0, 2 3 | 5, 2 4 | -------------------------------------------------------------------------------- /filters/statistics/src/test/resources/histogram_summary.txt: -------------------------------------------------------------------------------- 1 | testCounter [query length]: 4 (count), 10 (sum), 2.5 (mean), 0.0 (median) -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /oracles/parallelism/src/test/java/de/learnlib/oracle/parallelism/StaticParallelOmegaSupplierTest.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.AbstractStaticParallelOmegaOracleTest.TestOutput; 20 | 21 | public class StaticParallelOmegaSupplierTest extends AbstractStaticParallelOmegaOracleTest { 22 | 23 | @Override 24 | protected StaticParallelOmegaOracleBuilder getBuilder() { 25 | TestMembershipOracle[] oracles = getOracles(); 26 | return ParallelOracleBuilders.newStaticParallelOmegaOracle(new StaticOracleProvider<>(oracles)); 27 | } 28 | 29 | @Override 30 | protected TestOutput extractTestOutput(TestOutput output) { 31 | return output; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/java/de/learnlib/testsupport/example/PassiveLearningExample.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; 17 | 18 | import java.util.Collection; 19 | 20 | import de.learnlib.query.DefaultQuery; 21 | import net.automatalib.word.Word; 22 | 23 | public interface PassiveLearningExample { 24 | 25 | Collection> getSamples(); 26 | 27 | interface DFAPassiveLearningExample extends PassiveLearningExample {} 28 | 29 | interface MealyPassiveLearningExample extends PassiveLearningExample> {} 30 | 31 | interface MoorePassiveLearningExample extends PassiveLearningExample> {} 32 | 33 | interface SSTPassiveLearningExample extends PassiveLearningExample> {} 34 | } 35 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /test-support/learning-examples/src/main/java/de/learnlib/testsupport/example/sba/ExampleRandomSBA.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.sba; 17 | 18 | import java.util.Random; 19 | 20 | import de.learnlib.testsupport.example.DefaultLearningExample.DefaultSBALearningExample; 21 | import net.automatalib.alphabet.ProceduralInputAlphabet; 22 | import net.automatalib.util.automaton.random.RandomAutomata; 23 | 24 | public class ExampleRandomSBA extends DefaultSBALearningExample { 25 | 26 | public ExampleRandomSBA(Random random, ProceduralInputAlphabet alphabet, int size) { 27 | super(RandomAutomata.randomSBA(random, alphabet, size)); 28 | } 29 | 30 | public static ExampleRandomSBA createExample(Random random, ProceduralInputAlphabet alphabet, int size) { 31 | return new ExampleRandomSBA<>(random, alphabet, size); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /test-support/learning-examples/src/main/java/de/learnlib/testsupport/example/spa/ExampleRandomSPA.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.spa; 17 | 18 | import java.util.Random; 19 | 20 | import de.learnlib.testsupport.example.DefaultLearningExample.DefaultSPALearningExample; 21 | import net.automatalib.alphabet.ProceduralInputAlphabet; 22 | import net.automatalib.util.automaton.random.RandomAutomata; 23 | 24 | public class ExampleRandomSPA extends DefaultSPALearningExample { 25 | 26 | public ExampleRandomSPA(Random random, ProceduralInputAlphabet alphabet, int size) { 27 | super(RandomAutomata.randomSPA(random, alphabet, size)); 28 | } 29 | 30 | public static ExampleRandomSPA createExample(Random random, ProceduralInputAlphabet alphabet, int size) { 31 | return new ExampleRandomSPA<>(random, alphabet, size); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /test-support/learning-examples/src/main/resources/automata/learnlibv2/peterson2.dfa.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LearnLib/learnlib/5599f0cab549b482356c0a3e3377d65786e36e29/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/5599f0cab549b482356c0a3e3377d65786e36e29/test-support/learning-examples/src/main/resources/automata/learnlibv2/peterson3.dfa.gz -------------------------------------------------------------------------------- /test-support/learning-examples/src/main/resources/automata/learnlibv2/pots2.dfa.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LearnLib/learnlib/5599f0cab549b482356c0a3e3377d65786e36e29/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/5599f0cab549b482356c0a3e3377d65786e36e29/test-support/learning-examples/src/main/resources/automata/learnlibv2/pots3.dfa.gz -------------------------------------------------------------------------------- /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 | --------------------------------------------------------------------------------