Package org.svvrl.goal.core.aut
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
insteadA
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.
-
Constructor Details
-
DFSTraverser
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
Deprecated.Returns the automaton to be traversed.- Returns:
- the automaton to be traversed
-
isVisited
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
Deprecated.Invoked when a state is visited at the first time. Throws aFinishedException
if the depth-first search should stop here.- Parameters:
prefix
- a path from the root to the current statecurr
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 FinishedExceptionDeprecated.Invoked when returning from the depth-first search of a successor.- Parameters:
prefix
- the path from the root to the current statecurr
curr
- the current statesucc
- the successor ofcurr
- Throws:
FinishedException
- if the depth-first search should stop here
-
onAllSuccessorsReturned
Deprecated.Invoked after the depth-first search of all successors of a state returns.- Parameters:
prefix
- the path from the root to the current states
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 FinishedExceptionDeprecated.Invoked when a visited state is encountered.- Parameters:
prefix
- a path from the root to the current statecurr
curr
- the current state which is the last state inprefix
visited
- the state that has been visited. It must be a successor ofcurr
.- Throws:
FinishedException
- if the depth-first search should stop here
-
getDFSPredecessor
Deprecated.Returns the predecessor in this depth-first search traversal.- Parameters:
s
- a state- Returns:
- the predecessor in this depth-first search
-
getDFSNumber
Deprecated.Returns the DFS number of a state.- Parameters:
s
- a state- Returns:
- the DFS number of the state
-
getVisitedStates
Deprecated.Returns the states visited in this depth-first search.- Returns:
- a set of states visited in this depth-first search
-
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
Deprecated.Performs the depth-first search from a set of states.- Parameters:
inits
- a set of states where this depth-first search starts
-
dfs
Deprecated.Performs the depth-first search from a specified state.- Parameters:
s
- a state where this depth-first search starts
-