Interface TSTraversalVisitor<S,​I,​T,​D>

  • Type Parameters:
    S - state class
    I - input symbol class
    T - transition class
    D - 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 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 processed
        holder - 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 started
        data - 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 state
        srcData - the user data associated with the source state
        input - the input that is being processed
        transition - the transition that is being processed
        tgtState - the target state
        tgtHolder - 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 state
        srcData - the user data associated with the source state
        input - the input that is being processed
        transition - the transition that is being processed
        tgtState - the target state
        tgtData - the user data associated with the target state
      • finishExploration

        default void finishExploration​(S state,
                                       D data)
        Called when the exploration of a state is finished.
        Parameters:
        state - the state whose exploration is being finished
        data - the user data associated with this state