Class SPMMLearner<I,O,L extends LearningAlgorithm.MealyLearner<SymbolWrapper<I>,O> & SupportsGrowingAlphabet<SymbolWrapper<I>> & AccessSequenceTransformer<SymbolWrapper<I>>>
java.lang.Object
de.learnlib.algorithm.procedural.spmm.SPMMLearner<I,O,L>
- Type Parameters:
I- input symbol typeO- output symbol typeL- sub-learner type
- All Implemented Interfaces:
LearningAlgorithm<SPMM<?,,I, ?, O>, I, Word<O>> LearnerStateTracker
public class SPMMLearner<I,O,L extends LearningAlgorithm.MealyLearner<SymbolWrapper<I>,O> & SupportsGrowingAlphabet<SymbolWrapper<I>> & AccessSequenceTransformer<SymbolWrapper<I>>>
extends Object
implements LearningAlgorithm<SPMM<?,I,?,O>,I,Word<O>>, LearnerStateTracker
A learning algorithm for
SPMMs.-
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
ConstructorsConstructorDescriptionSPMMLearner(ProceduralInputAlphabet<I> alphabet, O errorOutput, MembershipOracle<I, Word<O>> oracle, LearnerConstructor<L, SymbolWrapper<I>, Word<O>> learnerConstructor) SPMMLearner(ProceduralInputAlphabet<I> alphabet, O errorOutput, MembershipOracle<I, Word<O>> oracle, Mapping<I, LearnerConstructor<L, SymbolWrapper<I>, Word<O>>> learnerConstructors, ATManager<I, O> atManager) -
Method Summary
Modifier and TypeMethodDescriptionReturns the current hypothesis model.booleanReturns whether the learning process has started yet.booleanrefineHypothesis(DefaultQuery<I, Word<O>> defaultQuery) Triggers a refinement of the model by providing a counterexample.voidStarts the model inference process, creating an initial hypothesis in the provided model object.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.learnlib.LearnerStateTracker
requireLearningProcessNotStarted, requireLearningProcessStarted
-
Constructor Details
-
SPMMLearner
public SPMMLearner(ProceduralInputAlphabet<I> alphabet, O errorOutput, MembershipOracle<I, Word<O>> oracle, LearnerConstructor<L, SymbolWrapper<I>, Word<O>> learnerConstructor) -
SPMMLearner
public SPMMLearner(ProceduralInputAlphabet<I> alphabet, O errorOutput, MembershipOracle<I, Word<O>> oracle, Mapping<I, LearnerConstructor<L, SymbolWrapper<I>, Word<O>>> learnerConstructors, ATManager<I, O> atManager)
-
-
Method Details
-
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<I,O, L extends LearningAlgorithm.MealyLearner<SymbolWrapper<I>, O> & SupportsGrowingAlphabet<SymbolWrapper<I>> & AccessSequenceTransformer<SymbolWrapper<I>>>
-
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<I,O, L extends LearningAlgorithm.MealyLearner<SymbolWrapper<I>, O> & SupportsGrowingAlphabet<SymbolWrapper<I>> & AccessSequenceTransformer<SymbolWrapper<I>>> - Parameters:
defaultQuery- 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).
-
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
-
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<I,O, L extends LearningAlgorithm.MealyLearner<SymbolWrapper<I>, O> & SupportsGrowingAlphabet<SymbolWrapper<I>> & AccessSequenceTransformer<SymbolWrapper<I>>> - Returns:
- the current hypothesis model.
-