Package de.learnlib.algorithm
Interface LearningAlgorithm<M,I,D>
-
- Type Parameters:
M
- model typeI
- input symbol typeD
- output domain type
- All Known Subinterfaces:
GlobalSuffixLearner<M,I,D>
,GlobalSuffixLearner.GlobalSuffixLearnerDFA<I>
,GlobalSuffixLearner.GlobalSuffixLearnerMealy<I,O>
,LearningAlgorithm.DFALearner<I>
,LearningAlgorithm.MealyLearner<I,O>
,LearningAlgorithm.MooreLearner<I,O>
,LearningAlgorithm.NFALearner<I>
,OTLearner<M,I,D>
,OTLearner.OTLearnerDFA<I>
,OTLearner.OTLearnerMealy<I,O>
,OTLearner.OTLearnerMoore<I,O>
,StatisticLearner<M,I,D>
,StatisticLearner.DFAStatisticLearner<I>
,StatisticLearner.MealyStatisticLearner<I,O>
,StatisticLearner.MooreStatisticLearner<I,O>
- All Known Implementing Classes:
AbstractAAARLearner
,AbstractAutomatonLStar
,AbstractExplicitAAARLearner
,AbstractExtensibleAutomatonLStar
,AbstractGenericAAARLearner
,AbstractLStar
,AbstractOPLearner
,AbstractOptimalTTT
,AbstractTTTLearner
,AbstractVPALearner
,ADTLearner
,ClassicLStarDFA
,ClassicLStarMealy
,ClassicLStarMoore
,DFARefinementCounterLearner
,ExplicitAAARLearnerDFA
,ExplicitAAARLearnerMealy
,ExplicitAAARLearnerMoore
,ExtensibleLStarDFA
,ExtensibleLStarMealy
,ExtensibleLStarMoore
,GenericAAARLearnerDFA
,GenericAAARLearnerMealy
,GenericAAARLearnerMoore
,KearnsVaziraniAdapterDFA
,KearnsVaziraniAdapterMealy
,KearnsVaziraniDFA
,KearnsVaziraniMealy
,LStarBaseAdapterDFA
,LStarBaseAdapterMealy
,MalerPnueliDFA
,MalerPnueliMealy
,MalerPnueliMoore
,MealyDHC
,MealyRefinementCounterLearner
,MooreRefinementCounterLearner
,NFALearnerWrapper
,NLStarLearner
,ObservationPackAdapterDFA
,ObservationPackAdapterMealy
,OPLearnerDFA
,OPLearnerMealy
,OPLearnerMoore
,OPLearnerVPA
,OptimalLStarDFA
,OptimalLStarMealy
,OptimalTTTAdapterDFA
,OptimalTTTAdapterMealy
,OptimalTTTDFA
,OptimalTTTMealy
,PrefixTTTLearnerDFA
,RefinementCounterLearner
,RivestSchapireAdapterDFA
,RivestSchapireAdapterMealy
,RivestSchapireDFA
,RivestSchapireMealy
,RivestSchapireMoore
,SBALearner
,SPALearner
,SPMMLearner
,TTTAdapterDFA
,TTTAdapterMealy
,TTTLearnerDFA
,TTTLearnerMealy
,TTTLearnerMoore
,TTTLearnerVPA
public interface LearningAlgorithm<M,I,D>
Basic interface for a model inference algorithm.Actively inferring models (such as DFAs or Mealy machines) consists of the construction of an initial hypothesis, which is subsequently refined using counterexamples (see
EquivalenceOracle
).
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
LearningAlgorithm.DFALearner<I>
static interface
LearningAlgorithm.MealyLearner<I,O>
static interface
LearningAlgorithm.MooreLearner<I,O>
static interface
LearningAlgorithm.NFALearner<I>
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description M
getHypothesisModel()
Returns the current hypothesis model.boolean
refineHypothesis(DefaultQuery<I,D> ceQuery)
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.
-
-
-
Method Detail
-
startLearning
void startLearning()
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.
-
refineHypothesis
boolean refineHypothesis(DefaultQuery<I,D> ceQuery)
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 ofstartLearning()
should be illegal.- Parameters:
ceQuery
- 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
M getHypothesisModel()
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
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
startLearning()
.- Returns:
- the current hypothesis model.
-
-