java.lang.Object
de.learnlib.algorithm.lsharp.LSharpMealy<I,O>
- Type Parameters:
I- input symbol typeO- output symbol type
- All Implemented Interfaces:
AccessSequenceTransformer<I>,LearningAlgorithm<MealyMachine<?,,I, ?, O>, I, Word<O>> LearningAlgorithm.MealyLearner<I,,O> LearnerStateTracker
public class LSharpMealy<I,O>
extends Object
implements LearningAlgorithm.MealyLearner<I,O>, AccessSequenceTransformer<I>, LearnerStateTracker
Implementation of the L# algorithm for
MealyMachines. The implementation is based on the
original
implementation of the authors. However, it does not support all features (such as compressed ADSs or some of the
more intricate equivalence checks on observation trees).
Implementation note: this learner uses the AccessSequenceTransformer interface to provide access to
the representatives of the states of the current hypothesis model.
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.learnlib.algorithm.LearningAlgorithm
LearningAlgorithm.DFALearner<I>, LearningAlgorithm.MealyLearner<I,O>, LearningAlgorithm.MooreLearner<I, O>, LearningAlgorithm.NFALearner<I> -
Constructor Summary
ConstructorsConstructorDescriptionLSharpMealy(Alphabet<I> alphabet, AdaptiveMembershipOracle<I, O> oracle) LSharpMealy(Alphabet<I> alphabet, AdaptiveMembershipOracle<I, O> oracle, Rule2 rule2, Rule3 rule3, @Nullable Word<I> sinkState, O sinkOutput, Random random) -
Method Summary
Modifier and TypeMethodDescriptioncheckConsistency(MealyMachine<Integer, I, ?, O> mealy) voidMealyMachine<?,I, ?, O> Returns the current hypothesis model.booleanReturns whether the learning process has started yet.identifyFrontierOrBasis(Word<I> seq) voidvoidvoidprocessBinarySearch(Word<I> ceInput, Word<O> ceOutput, MealyMachine<Integer, I, ?, O> mealy) booleanprocessCex(DefaultQuery<I, Word<O>> cex, MealyMachine<Integer, I, ?, O> mealy) voidbooleanrefineHypothesis(DefaultQuery<I, Word<O>> ceQuery) Triggers a refinement of the model by providing a counterexample.voidStarts the model inference process, creating an initial hypothesis in the provided model object.transformAccessSequence(Word<I> word) booleanvoidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.learnlib.AccessSequenceTransformer
isAccessSequence, longestASPrefixMethods inherited from interface de.learnlib.LearnerStateTracker
requireLearningProcessNotStarted, requireLearningProcessStarted
-
Constructor Details
-
LSharpMealy
-
LSharpMealy
-
-
Method Details
-
processCex
-
processBinarySearch
-
makeObsTreeAdequate
public void makeObsTreeAdequate() -
promoteFrontierState
public void promoteFrontierState() -
treeIsAdequate
public boolean treeIsAdequate() -
updateFrontierAndBasis
public void updateFrontierAndBasis() -
buildHypothesis
-
constructHypothesis
-
identifyFrontierOrBasis
-
initObsTree
-
checkFrontierConsistency
public void checkFrontierConsistency() -
checkConsistency
-
startLearning
public void startLearning()Description copied from interface:LearningAlgorithmStarts the model inference process, creating an initial hypothesis in the provided model object.- Specified by:
startLearningin interfaceLearningAlgorithm<MealyMachine<?,I, ?, O>, I, Word<O>>
-
refineHypothesis
Description copied from interface:LearningAlgorithmTriggers a refinement of the model by providing a counterexample. A counterexample is a query which exposes different behavior of the real SUL compared to the hypothesis.- Specified by:
refineHypothesisin interfaceLearningAlgorithm<MealyMachine<?,I, ?, O>, I, Word<O>> - Parameters:
ceQuery- the query which exposes diverging behavior, as posed to the real SUL (i.e. with the SULs output).- Returns:
trueif the counterexample triggered a refinement of the hypothesis,falseotherwise (i.e., it was no counterexample).
-
getHypothesisModel
Description copied from interface:LearningAlgorithmReturns the current hypothesis model.N.B.: By the contract of this interface, the model returned by this method should not be modified by external code (i.e., M generally should refer to an immutable interface), and its validity is retained only until the next invocation of
LearningAlgorithm.refineHypothesis(DefaultQuery). If older hypotheses have to be maintained, a copy of the returned model must be made.- Specified by:
getHypothesisModelin interfaceLearningAlgorithm<MealyMachine<?,I, ?, O>, I, Word<O>> - Returns:
- the current hypothesis model.
-
hasLearningProcessStarted
public boolean hasLearningProcessStarted()Description copied from interface:LearnerStateTrackerReturns whether the learning process has started yet.- Specified by:
hasLearningProcessStartedin interfaceLearnerStateTracker- Returns:
trueif the learning process has started,falseotherwise
-
transformAccessSequence
- Specified by:
transformAccessSequencein interfaceAccessSequenceTransformer<I>
-