Class DFSTraverser

java.lang.Object
org.svvrl.goal.core.aut.DFSTraverser
Direct Known Subclasses:
DoubleDFSTraverser

public class DFSTraverser
extends java.lang.Object
Deprecated.
use DFS instead
A DFSTraverser can traverse an automaton by depth-first search. The implementation is based on recursive calls. Note that if the automaton has disconnected states, those states may not be traversed.
Author:
Ming-Hsien Tsai
  • Constructor Summary

    Constructors 
    Constructor Description
    DFSTraverser​(Automaton aut)
    Deprecated.
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    void dfs()
    Deprecated.
    Performs the depth-first search from initial states.
    void dfs​(State s)
    Deprecated.
    Performs the depth-first search from a specified state.
    void dfs​(StateSet inits)
    Deprecated.
    Performs the depth-first search from a set of states.
    protected Automaton getAutomaton()
    Deprecated.
    Returns the automaton to be traversed.
    int getDFSNumber​(State s)
    Deprecated.
    Returns the DFS number of a state.
    State getDFSPredecessor​(State s)
    Deprecated.
    Returns the predecessor in this depth-first search traversal.
    StateSet getUnvisitedStates()
    Deprecated.
    Returns the states not visited in this depth-first search.
    StateSet getVisitedStates()
    Deprecated.
    Returns the states visited in this depth-first search.
    protected boolean isVisited​(State s)
    Deprecated.
    Checks if a state has been visited or not.
    protected void onAllSuccessorsReturned​(StateList prefix, State s)
    Deprecated.
    Invoked after the depth-first search of all successors of a state returns.
    protected void onSuccessorReturned​(StateList prefix, State curr, State succ)
    Deprecated.
    Invoked when returning from the depth-first search of a successor.
    protected void onVisitedStateFound​(StateList prefix, State curr, State visited)
    Deprecated.
    Invoked when a visited state is encountered.
    protected void onVisitState​(StateList prefix, State curr)
    Deprecated.
    Invoked when a state is visited at the first time.
    void reset()
    Deprecated.
    Resets the DFS traverser for the next DFS traversal.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DFSTraverser

      public DFSTraverser​(Automaton aut)
      Deprecated.
      Constructor.
      Parameters:
      aut - the automaton to be traversed
  • Method Details

    • reset

      public void reset()
      Deprecated.
      Resets the DFS traverser for the next DFS traversal.
    • getAutomaton

      protected Automaton getAutomaton()
      Deprecated.
      Returns the automaton to be traversed.
      Returns:
      the automaton to be traversed
    • isVisited

      protected boolean isVisited​(State s)
      Deprecated.
      Checks if a state has been visited or not.
      Parameters:
      s - a state to be checked
      Returns:
      true if the state has been visited by this depth-first search
    • onVisitState

      protected void onVisitState​(StateList prefix, State curr) throws FinishedException
      Deprecated.
      Invoked when a state is visited at the first time. Throws a FinishedException if the depth-first search should stop here.
      Parameters:
      prefix - a path from the root to the current state curr
      curr - the current state to be visited
      Throws:
      FinishedException - if the depth-first search should stop here
    • onSuccessorReturned

      protected void onSuccessorReturned​(StateList prefix, State curr, State succ) throws FinishedException
      Deprecated.
      Invoked when returning from the depth-first search of a successor.
      Parameters:
      prefix - the path from the root to the current state curr
      curr - the current state
      succ - the successor of curr
      Throws:
      FinishedException - if the depth-first search should stop here
    • onAllSuccessorsReturned

      protected void onAllSuccessorsReturned​(StateList prefix, State s) throws FinishedException
      Deprecated.
      Invoked after the depth-first search of all successors of a state returns.
      Parameters:
      prefix - the path from the root to the current state s
      s - the current state
      Throws:
      FinishedException - if the depth-first search should stop here
    • onVisitedStateFound

      protected void onVisitedStateFound​(StateList prefix, State curr, State visited) throws FinishedException
      Deprecated.
      Invoked when a visited state is encountered.
      Parameters:
      prefix - a path from the root to the current state curr
      curr - the current state which is the last state in prefix
      visited - the state that has been visited. It must be a successor of curr.
      Throws:
      FinishedException - if the depth-first search should stop here
    • getDFSPredecessor

      public State getDFSPredecessor​(State s)
      Deprecated.
      Returns the predecessor in this depth-first search traversal.
      Parameters:
      s - a state
      Returns:
      the predecessor in this depth-first search
    • getDFSNumber

      public int getDFSNumber​(State s)
      Deprecated.
      Returns the DFS number of a state.
      Parameters:
      s - a state
      Returns:
      the DFS number of the state
    • getVisitedStates

      public StateSet getVisitedStates()
      Deprecated.
      Returns the states visited in this depth-first search.
      Returns:
      a set of states visited in this depth-first search
    • getUnvisitedStates

      public StateSet getUnvisitedStates()
      Deprecated.
      Returns the states not visited in this depth-first search.
      Returns:
      a set of states unvisited in this depth-first search
    • dfs

      public void dfs()
      Deprecated.
      Performs the depth-first search from initial states.
    • dfs

      public void dfs​(StateSet inits)
      Deprecated.
      Performs the depth-first search from a set of states.
      Parameters:
      inits - a set of states where this depth-first search starts
    • dfs

      public void dfs​(State s)
      Deprecated.
      Performs the depth-first search from a specified state.
      Parameters:
      s - a state where this depth-first search starts