Module net.automatalib.util
Interface TSTraversalVisitor<S,I,T,D>
- Type Parameters:
S- state classI- input symbol classT- transition classD- user data class
- All Known Implementing Classes:
TSCopyVisitor
public interface TSTraversalVisitor<S,I,T,D>
Visitor interface for transition system traversals.
This interface declares methods that are called upon basic transition system traversal actions.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidCalled when an edge is backtracked.default voidfinishExploration(S state, D data) Called when the exploration of a state is finished.default TSTraversalActionprocessInitial(S initialState, Holder<D> holder) Called when the initial states of the transition system are processed.default TSTraversalActionCalled when an edge is processed.default booleanstartExploration(S state, D data) Called when the exploration of a state is started.
-
Method Details
-
processInitial
Called when the initial states of the transition system are processed.- Parameters:
initialState- the state that is processedholder- a writable reference whose (node-specific) data is passed to the corresponding methods during traversal- Returns:
- the action to perform
-
startExploration
Called when the exploration of a state is started.- Parameters:
state- the state whose exploration is about to be starteddata- the user data associated with this state- Returns:
true, if the state should be explored,falseotherwise
-
processTransition
default TSTraversalAction processTransition(S srcState, D srcData, I input, T transition, S tgtState, Holder<D> tgtHolder) Called when an edge is processed.- Parameters:
srcState- the source statesrcData- the user data associated with the source stateinput- the input that is being processedtransition- the transition that is being processedtgtState- the target statetgtHolder- a writable reference to provide user data that should be associated with the target state- Returns:
- the action to perform
-
backtrackTransition
default void backtrackTransition(S srcState, D srcData, I input, T transition, S tgtState, D tgtData) Called when an edge is backtracked. This typically happens only in depth-first style traversals.- Parameters:
srcState- the source statesrcData- the user data associated with the source stateinput- the input that is being processedtransition- the transition that is being processedtgtState- the target statetgtData- the user data associated with the target state
-
finishExploration
Called when the exploration of a state is finished.- Parameters:
state- the state whose exploration is being finisheddata- the user data associated with this state
-