Package de.learnlib.algorithm.lstar
Class AbstractAutomatonLStar<A,I,D,S,T,SP,TP,AI extends net.automatalib.automaton.MutableDeterministic<S,I,T,SP,TP> & net.automatalib.alphabet.SupportsGrowingAlphabet<I>>
- java.lang.Object
-
- de.learnlib.algorithm.lstar.AbstractLStar<A,I,D>
-
- de.learnlib.algorithm.lstar.AbstractAutomatonLStar<A,I,D,S,T,SP,TP,AI>
-
- Type Parameters:
A- automaton type, must be a subclass ofMutableDeterministicI- input symbol typeD- output domain typeSP- state property typeTP- transition property type
- All Implemented Interfaces:
GlobalSuffixLearner<A,I,D>,LearningAlgorithm<A,I,D>,ObservationTableFeature<I,D>,OTLearner<A,I,D>,Resumable<AutomatonLStarState<I,D,AI,S>>,net.automatalib.alphabet.SupportsGrowingAlphabet<I>
- Direct Known Subclasses:
AbstractExtensibleAutomatonLStar
public abstract class AbstractAutomatonLStar<A,I,D,S,T,SP,TP,AI extends net.automatalib.automaton.MutableDeterministic<S,I,T,SP,TP> & net.automatalib.alphabet.SupportsGrowingAlphabet<I>> extends AbstractLStar<A,I,D> implements Resumable<AutomatonLStarState<I,D,AI,S>>
Abstract base class for algorithms that produce (subclasses of)MutableDeterministicautomata.This class provides the L*-style hypothesis construction. Implementing classes solely have to specify how state and transition properties should be derived.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.learnlib.algorithm.GlobalSuffixLearner
GlobalSuffixLearner.GlobalSuffixLearnerDFA<I extends Object>, GlobalSuffixLearner.GlobalSuffixLearnerMealy<I extends Object,O extends Object>
-
Nested classes/interfaces inherited from interface de.learnlib.algorithm.LearningAlgorithm
LearningAlgorithm.DFALearner<I extends Object>, LearningAlgorithm.MealyLearner<I extends Object,O extends Object>, LearningAlgorithm.MooreLearner<I extends Object,O extends Object>, LearningAlgorithm.NFALearner<I extends Object>
-
Nested classes/interfaces inherited from interface de.learnlib.datastructure.observationtable.OTLearner
OTLearner.OTLearnerDFA<I extends Object>, OTLearner.OTLearnerMealy<I extends Object,O extends Object>, OTLearner.OTLearnerMoore<I extends Object,O extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description protected AIinternalHypprotected net.automatalib.common.util.array.ArrayStorage<de.learnlib.algorithm.lstar.AbstractAutomatonLStar.StateInfo<S,I>>stateInfos-
Fields inherited from class de.learnlib.algorithm.lstar.AbstractLStar
alphabet, oracle, table
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractAutomatonLStar(net.automatalib.alphabet.Alphabet<I> alphabet, MembershipOracle<I,D> oracle, AI internalHyp)Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddAlphabetSymbol(I symbol)protected ScreateState(boolean initial, Row<I> row)protected voiddoRefineHypothesis(DefaultQuery<I,D> ceQuery)protected voidrefineHypothesisInternal(DefaultQuery<I,D> ceQuery)voidresume(AutomatonLStarState<I,D,AI,S> state)protected voidsetTransition(S from, I input, S to, Row<I> fromRow, int inputIdx)voidstartLearning()protected abstract SPstateProperty(ObservationTable<I,D> table, Row<I> stateRow)Derives a state property from the corresponding row.AutomatonLStarState<I,D,AI,S>suspend()protected abstract TPtransitionProperty(ObservationTable<I,D> table, Row<I> stateRow, int inputIdx)Derives a transition property from the corresponding transition.protected voidupdateInternalHypothesis()Performs the L*-style hypothesis construction.-
Methods inherited from class de.learnlib.algorithm.lstar.AbstractLStar
addGlobalSuffixes, analyzeInconsistency, completeConsistentTable, getGlobalSuffixes, getObservationTable, hypothesisOutput, incorporateCounterExample, initialPrefixes, initialSuffixes, refineHypothesis, selectClosingRows
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.learnlib.algorithm.LearningAlgorithm
getHypothesisModel
-
-
-
-
Constructor Detail
-
AbstractAutomatonLStar
protected AbstractAutomatonLStar(net.automatalib.alphabet.Alphabet<I> alphabet, MembershipOracle<I,D> oracle, AI internalHyp)
Constructor.- Parameters:
alphabet- the learning alphabetoracle- the learning oracleinternalHyp- the internal hypothesis object to write data to
-
-
Method Detail
-
startLearning
public final void startLearning()
- Specified by:
startLearningin interfaceLearningAlgorithm<A,I,D>- Overrides:
startLearningin classAbstractLStar<A,I,D>
-
updateInternalHypothesis
protected void updateInternalHypothesis()
Performs the L*-style hypothesis construction. For creating states and transitions, thestateProperty(ObservationTable, Row)andtransitionProperty(ObservationTable, Row, int)methods are used to derive the respective properties.
-
stateProperty
protected abstract SP stateProperty(ObservationTable<I,D> table, Row<I> stateRow)
Derives a state property from the corresponding row.- Parameters:
table- the current observation tablestateRow- the row for which the state is created- Returns:
- the state property of the corresponding state
-
transitionProperty
protected abstract TP transitionProperty(ObservationTable<I,D> table, Row<I> stateRow, int inputIdx)
Derives 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).- 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
-
doRefineHypothesis
protected final void doRefineHypothesis(DefaultQuery<I,D> ceQuery)
- Overrides:
doRefineHypothesisin classAbstractLStar<A,I,D>
-
refineHypothesisInternal
protected void refineHypothesisInternal(DefaultQuery<I,D> ceQuery)
-
addAlphabetSymbol
public void addAlphabetSymbol(I symbol)
- Specified by:
addAlphabetSymbolin interfacenet.automatalib.alphabet.SupportsGrowingAlphabet<A>- Overrides:
addAlphabetSymbolin classAbstractLStar<A,I,D>
-
suspend
public AutomatonLStarState<I,D,AI,S> suspend()
-
-