Module de.learnlib.algorithm.lstar
Class ExtensibleLStarMealy<I,O>
java.lang.Object
de.learnlib.algorithm.lstar.AbstractLStar<A,I,D>
de.learnlib.algorithm.lstar.AbstractAutomatonLStar<A,I,D,S,T,SP,TP,AI>
de.learnlib.algorithm.lstar.AbstractExtensibleAutomatonLStar<MealyMachine<?,I,?,O>,I,Word<O>,Integer,CompactTransition<O>,Void,O,CompactMealy<I,O>>
de.learnlib.algorithm.lstar.mealy.ExtensibleLStarMealy<I,O>
- Type Parameters:
I- input symbol typeO- output symbol type
- All Implemented Interfaces:
AccessSequenceTransformer<I>,GlobalSuffixLearner<MealyMachine<?,,I, ?, O>, I, Word<O>> GlobalSuffixLearner.GlobalSuffixLearnerMealy<I,,O> LearningAlgorithm<MealyMachine<?,,I, ?, O>, I, Word<O>> LearningAlgorithm.MealyLearner<I,,O> ObservationTableFeature<I,,Word<O>> OTLearner<MealyMachine<?,,I, ?, O>, I, Word<O>> OTLearner.OTLearnerMealy<I,,O> LearnerStateTracker,Resumable<AutomatonLStarState<I,,Word<O>, CompactMealy<I, O>, Integer>> SupportsGrowingAlphabet<I>
- Direct Known Subclasses:
MalerPnueliMealy,RivestSchapireMealy
public class ExtensibleLStarMealy<I,O>
extends AbstractExtensibleAutomatonLStar<MealyMachine<?,I,?,O>,I,Word<O>,Integer,CompactTransition<O>,Void,O,CompactMealy<I,O>>
implements OTLearner.OTLearnerMealy<I,O>, GlobalSuffixLearner.GlobalSuffixLearnerMealy<I,O>
A
MealyMachine-based specialization of the extensible L* learner.
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 class de.learnlib.algorithm.lstar.AbstractExtensibleAutomatonLStar
AbstractExtensibleAutomatonLStar.BuilderDefaultsNested classes/interfaces inherited from class de.learnlib.algorithm.lstar.AbstractAutomatonLStar
AbstractAutomatonLStar.StateInfo<S,I> Nested classes/interfaces inherited from interface de.learnlib.algorithm.GlobalSuffixLearner
GlobalSuffixLearner.GlobalSuffixLearnerDFA<I>, GlobalSuffixLearner.GlobalSuffixLearnerMealy<I,O> Nested classes/interfaces inherited from interface de.learnlib.algorithm.LearningAlgorithm
LearningAlgorithm.DFALearner<I>, LearningAlgorithm.MealyLearner<I,O>, LearningAlgorithm.MooreLearner<I, O>, LearningAlgorithm.NFALearner<I> Nested classes/interfaces inherited from interface de.learnlib.datastructure.observationtable.OTLearner
OTLearner.OTLearnerDFA<I>, OTLearner.OTLearnerMealy<I,O>, OTLearner.OTLearnerMoore<I, O> -
Field Summary
Fields inherited from class de.learnlib.algorithm.lstar.AbstractExtensibleAutomatonLStar
cexHandler, closingStrategy, initialPrefixes, initialSuffixesFields inherited from class de.learnlib.algorithm.lstar.AbstractAutomatonLStar
internalHyp, stateInfosFields inherited from class de.learnlib.algorithm.lstar.AbstractLStar
alphabet, oracle, table -
Constructor Summary
ConstructorsConstructorDescriptionExtensibleLStarMealy(Alphabet<I> alphabet, MembershipOracle<I, Word<O>> oracle) Constructor.ExtensibleLStarMealy(Alphabet<I> alphabet, MembershipOracle<I, Word<O>> oracle, List<Word<I>> initialSuffixes, ObservationTableCEXHandler<? super I, ? super Word<O>> cexHandler, ClosingStrategy<? super I, ? super Word<O>> closingStrategy) Constructor.ExtensibleLStarMealy(Alphabet<I> alphabet, MembershipOracle<I, Word<O>> oracle, List<Word<I>> initialPrefixes, List<Word<I>> initialSuffixes, ObservationTableCEXHandler<? super I, ? super Word<O>> cexHandler, ClosingStrategy<? super I, ? super Word<O>> closingStrategy) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAlphabetSymbol(I symbol) MealyMachine<?,I, ?, O> Returns the current hypothesis model.protected SuffixOutput<I,Word<O>> protected VoidstateProperty(ObservationTable<I, Word<O>> table, Row<I> stateRow) Derives a state property from the corresponding row.protected OtransitionProperty(ObservationTable<I, Word<O>> table, Row<I> stateRow, int inputIdx) Derives a transition property from the corresponding transition.protected voidPerforms the L*-style hypothesis construction.protected voidMethods inherited from class de.learnlib.algorithm.lstar.AbstractExtensibleAutomatonLStar
initialPrefixes, initialSuffixes, refineHypothesisInternal, selectClosingRowsMethods inherited from class de.learnlib.algorithm.lstar.AbstractAutomatonLStar
createState, doRefineHypothesis, resume, setTransition, startLearning, suspendMethods inherited from class de.learnlib.algorithm.lstar.AbstractLStar
addGlobalSuffixes, analyzeInconsistency, completeConsistentTable, getGlobalSuffixes, getObservationTable, hasLearningProcessStarted, incorporateCounterExample, refineHypothesis, transformAccessSequenceMethods 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.algorithm.GlobalSuffixLearner
addGlobalSuffixes, getGlobalSuffixesMethods inherited from interface de.learnlib.LearnerStateTracker
requireLearningProcessNotStarted, requireLearningProcessStartedMethods inherited from interface de.learnlib.algorithm.LearningAlgorithm
refineHypothesis, startLearningMethods inherited from interface de.learnlib.datastructure.observationtable.ObservationTableFeature
getObservationTable
-
Constructor Details
-
ExtensibleLStarMealy
Constructor.- Parameters:
alphabet- the learning alphabetoracle- the Mealy oracle
-
ExtensibleLStarMealy
public ExtensibleLStarMealy(Alphabet<I> alphabet, MembershipOracle<I, Word<O>> oracle, List<Word<I>> initialSuffixes, ObservationTableCEXHandler<? super I, ? super Word<O>> cexHandler, ClosingStrategy<? super I, ? super Word<O>> closingStrategy) Constructor.- Parameters:
alphabet- the learning alphabetoracle- the Mealy oracleinitialSuffixes- the list of initial suffixes used in the observation tablecexHandler- the strategy for handling counterexamplesclosingStrategy- the strategy for closing open rows of the observation table
-
ExtensibleLStarMealy
public ExtensibleLStarMealy(Alphabet<I> alphabet, MembershipOracle<I, Word<O>> oracle, List<Word<I>> initialPrefixes, List<Word<I>> initialSuffixes, ObservationTableCEXHandler<? super I, ? super Word<O>> cexHandler, ClosingStrategy<? super I, ? super Word<O>> closingStrategy) Constructor.- Parameters:
alphabet- the learning alphabetoracle- the Mealy oracleinitialPrefixes- the list of initial prefixes used in the observation tableinitialSuffixes- the list of initial suffixes used in the observation tablecexHandler- the strategy for handling counterexamplesclosingStrategy- the strategy for closing open rows of the observation table
-
-
Method Details
-
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.
-
updateInternalHypothesis
protected void updateInternalHypothesis()Description copied from class:AbstractAutomatonLStarPerforms the L*-style hypothesis construction. For creating states and transitions, theAbstractAutomatonLStar.stateProperty(ObservationTable, Row)andAbstractAutomatonLStar.transitionProperty(ObservationTable, Row, int)methods are used to derive the respective properties.- Overrides:
updateInternalHypothesisin classAbstractAutomatonLStar<MealyMachine<?,I, ?, O>, I, Word<O>, Integer, CompactTransition<O>, Void, O, CompactMealy<I, O>>
-
stateProperty
Description copied from class:AbstractAutomatonLStarDerives a state property from the corresponding row.- Specified by:
statePropertyin classAbstractAutomatonLStar<MealyMachine<?,I, ?, O>, I, Word<O>, Integer, CompactTransition<O>, Void, O, CompactMealy<I, O>> - Parameters:
table- the current observation tablestateRow- the row for which the state is created- Returns:
- the state property of the corresponding state
-
transitionProperty
Description copied from class:AbstractAutomatonLStarDerives a transition property from the corresponding transition.Note that not the transition row is passed to this method, but the row for the outgoing state. The transition row can be retrieved using
Row.getSuccessor(int).- Specified by:
transitionPropertyin classAbstractAutomatonLStar<MealyMachine<?,I, ?, O>, I, Word<O>, Integer, CompactTransition<O>, Void, O, CompactMealy<I, O>> - Parameters:
table- the observation tablestateRow- the row for the source stateinputIdx- the index of the input symbol to consider- Returns:
- the transition property of the corresponding transition
-
addAlphabetSymbol
- Specified by:
addAlphabetSymbolin interfaceSupportsGrowingAlphabet<I>- Overrides:
addAlphabetSymbolin classAbstractAutomatonLStar<MealyMachine<?,I, ?, O>, I, Word<O>, Integer, CompactTransition<O>, Void, O, CompactMealy<I, O>>
-
updateOutputs
protected void updateOutputs() -
hypothesisOutput
- Specified by:
hypothesisOutputin classAbstractLStar<MealyMachine<?,I, ?, O>, I, Word<O>>
-