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>>
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>>
A learning algorithm forSPMM
s.
-
-
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
Constructors Constructor Description SPMMLearner(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SPMM<?,I,?,O>
getHypothesisModel()
Returns the current hypothesis model.boolean
refineHypothesis(DefaultQuery<I,Word<O>> defaultQuery)
Triggers a refinement of the model by providing a counterexample.void
startLearning()
Starts the model inference process, creating an initial hypothesis in the provided model object.
-
-
-
Constructor Detail
-
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 Detail
-
startLearning
public void startLearning()
Description copied from interface:LearningAlgorithm
Starts the model inference process, creating an initial hypothesis in the provided model object. Please note that it should be illegal to invoke this method twice.- Specified by:
startLearning
in interfaceLearningAlgorithm<I,O,L extends LearningAlgorithm.MealyLearner<SymbolWrapper<I>,O> & SupportsGrowingAlphabet<SymbolWrapper<I>> & AccessSequenceTransformer<SymbolWrapper<I>>>
-
refineHypothesis
public boolean refineHypothesis(DefaultQuery<I,Word<O>> defaultQuery)
Description copied from interface:LearningAlgorithm
Triggers 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. Please note that invoking this method before an initial invocation ofLearningAlgorithm.startLearning()
should be illegal.- Specified by:
refineHypothesis
in 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:
true
if the counterexample triggered a refinement of the hypothesis,false
otherwise (i.e., it was no counterexample).
-
getHypothesisModel
public SPMM<?,I,?,O> getHypothesisModel()
Description copied from interface:LearningAlgorithm
Returns the current hypothesis model.N.B.: By the contract of this interface, the model returned by this method may not be modified (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.Please note that it should be illegal to invoke this method before an initial invocation of
LearningAlgorithm.startLearning()
.- Specified by:
getHypothesisModel
in interfaceLearningAlgorithm<I,O,L extends LearningAlgorithm.MealyLearner<SymbolWrapper<I>,O> & SupportsGrowingAlphabet<SymbolWrapper<I>> & AccessSequenceTransformer<SymbolWrapper<I>>>
- Returns:
- the current hypothesis model.
-
-