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
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
backtrackTransition(S srcState, D srcData, I input, T transition, S tgtState, D tgtData)
Called when an edge is backtracked.default void
finishExploration(S state, D data)
Called when the exploration of a state is finished.default TSTraversalAction
processInitial(S initialState, Holder<D> holder)
Called when the initial states of the transition system are processed.default TSTraversalAction
processTransition(S srcState, D srcData, I input, T transition, S tgtState, Holder<D> tgtHolder)
Called when an edge is processed.default boolean
startExploration(S state, D data)
Called when the exploration of a state is started.
-
-
-
Method Detail
-
processInitial
default TSTraversalAction processInitial(S initialState, Holder<D> holder)
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
default boolean startExploration(S state, D data)
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,false
otherwise
-
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
-
-