Class TSTraversal


  • public final class TSTraversal
    extends Object
    • Method Detail

      • breadthFirst

        public static <S,​I,​T,​D> void breadthFirst​(TransitionSystem<S,​? super I,​T> ts,
                                                                    Collection<? extends I> inputs,
                                                                    TSTraversalVisitor<S,​I,​T,​D> visitor)
        Traverses the given transition system in a breadth-first fashion. The traversal is steered by the specified visitor.
        Type Parameters:
        S - state type
        I - input symbol type
        T - transition type
        D - (user) data type
        Parameters:
        ts - the transition system
        inputs - the input alphabet
        visitor - the visitor
      • breadthFirst

        public static <S,​I,​T,​D> boolean breadthFirst​(TransitionSystem<S,​? super I,​T> ts,
                                                                       int limit,
                                                                       Collection<? extends I> inputs,
                                                                       TSTraversalVisitor<S,​I,​T,​D> visitor)
        Traverses the given transition system in a breadth-first fashion. The traversal is steered by the specified visitor.
        Type Parameters:
        S - state type
        I - input symbol type
        T - transition type
        D - (user) data type
        Parameters:
        ts - the transition system
        limit - the upper bound on the number of states to be visited
        inputs - the input alphabet
        visitor - the visitor
        Returns:
        false if the number of explored states reached limit, true otherwise
      • breadthFirstOrder

        public static <S,​I> Iterable<S> breadthFirstOrder​(TransitionSystem<S,​I,​?> ts,
                                                                Collection<? extends I> inputs)
        Returns an Iterable for the (reachable) states of the given transition system in breadth-first order.
        Type Parameters:
        S - state type
        I - input symbol type
        Parameters:
        ts - the transition system
        inputs - the inputs which should be considered for the traversal
        Returns:
        an Iterable for the (reachable) states of the given transition system in breadth-first order
      • breadthFirstIterator

        public static <S,​I> Iterator<S> breadthFirstIterator​(TransitionSystem<S,​I,​?> ts,
                                                                   Collection<? extends I> inputs)
        Returns an Iterator for the (reachable) states of the given transition system in breadth-first order.
        Type Parameters:
        S - state type
        I - input symbol type
        Parameters:
        ts - the transition system
        inputs - the inputs which should be considered for the traversal
        Returns:
        an Iterator for the (reachable) states of the given transition system in breadth-first order
      • depthFirst

        public static <S,​I,​T,​D> void depthFirst​(TransitionSystem<S,​I,​T> ts,
                                                                  Collection<? extends I> inputs,
                                                                  TSTraversalVisitor<S,​I,​T,​D> visitor)
        Traverses the given transition system in a depth-first fashion. The traversal is steered by the specified visitor.
        Type Parameters:
        S - state type
        I - input symbol type
        T - transition type
        D - (user) data type
        Parameters:
        ts - the transition system
        inputs - the input alphabet
        visitor - the visitor
      • depthFirst

        public static <S,​I,​T,​D> boolean depthFirst​(TransitionSystem<S,​? super I,​T> ts,
                                                                     int limit,
                                                                     Collection<? extends I> inputs,
                                                                     TSTraversalVisitor<S,​I,​T,​D> visitor)
        Traverses the given transition system in a depth-first fashion. The traversal is steered by the specified visitor.
        Type Parameters:
        S - state type
        I - input symbol type
        T - transition type
        D - (user) data type
        Parameters:
        ts - the transition system
        limit - the upper bound on the number of states to be visited
        inputs - the input alphabet
        visitor - the visitor
        Returns:
        false if the number of explored states reached limit, true otherwise
      • depthFirstOrder

        public static <S,​I> Iterable<S> depthFirstOrder​(TransitionSystem<S,​I,​?> ts,
                                                              Collection<? extends I> inputs)
        Returns an Iterable for the (reachable) states of the given transition system in depth-first order.
        Type Parameters:
        S - state type
        I - input symbol type
        Parameters:
        ts - the transition system
        inputs - the inputs which should be considered for the traversal
        Returns:
        an Iterable for the (reachable) states of the given transition system in depth-first order
      • depthFirstIterator

        public static <S,​I> Iterator<S> depthFirstIterator​(TransitionSystem<S,​I,​?> ts,
                                                                 Collection<? extends I> inputs)
        Returns an Iterator for the (reachable) states of the given transition system in depth-first order.
        Type Parameters:
        S - state type
        I - input symbol type
        Parameters:
        ts - the transition system
        inputs - the inputs which should be considered for the traversal
        Returns:
        an Iterator for the (reachable) states of the given transition system in depth-first order
      • traverse

        public static <S,​I,​T,​D> void traverse​(TraversalOrder order,
                                                                TransitionSystem<S,​? super I,​T> ts,
                                                                Collection<? extends I> inputs,
                                                                TSTraversalVisitor<S,​I,​T,​D> visitor)
        Traverses the given transition system in a given order. The traversal is steered by the specified visitor.
        Type Parameters:
        S - state type
        I - input symbol type
        T - transition type
        D - (user) data type
        Parameters:
        order - the order in which the states should be traversed
        ts - the transition system
        inputs - the input alphabet
        visitor - the visitor
      • traverse

        public static <S,​I,​T,​D> boolean traverse​(TraversalOrder order,
                                                                   TransitionSystem<S,​? super I,​T> ts,
                                                                   int limit,
                                                                   Collection<? extends I> inputs,
                                                                   TSTraversalVisitor<S,​I,​T,​D> visitor)
        Traverses the given transition system in a given order. The traversal is steered by the specified visitor.
        Type Parameters:
        S - state type
        I - input symbol type
        T - transition type
        D - (user) data type
        Parameters:
        order - the order in which the states should be traversed
        ts - the transition system
        limit - the upper bound on the number of states to be visited
        inputs - the input alphabet
        visitor - the visitor
        Returns:
        false if the number of explored states reached limit, true otherwise