|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.henshin.statespace.impl.StateSpaceIndexImpl org.eclipse.emf.henshin.statespace.impl.BasicStateSpaceManager
public class BasicStateSpaceManager
Basic StateSpaceManager
implementation.
Field Summary | |
---|---|
protected Stack<StateExplorer> |
explorers
State exploration helpers. |
protected boolean |
ignoreDuplicateTransitions
Flag indicating whether duplicate transitions with the same label should be ignored. |
protected int |
maxStateDistance
Maximum state distance. |
protected StateDistanceMonitor |
stateDistanceMonitor
State distance monitor. |
protected Object |
stateSpaceLock
A lock used when accessing the state space. |
Fields inherited from interface org.eclipse.emf.henshin.statespace.StateSpaceManager |
---|
DEBUG_ENFORCE_DETERMINISM |
Constructor Summary | |
---|---|
BasicStateSpaceManager(StateSpace stateSpace)
Default constructor. |
Method Summary | |
---|---|
protected StateExplorer |
acquireExplorer()
|
void |
clearCache()
Clear all caches of the state space index. |
State |
createInitialState(Model model)
Create a new initial state to the state space. |
protected State |
createOpenState(Model model,
int hash,
State derivedFrom,
int[] location)
Create a new open state in the state space. |
protected Model |
deriveModel(State state,
boolean fromInitial)
|
protected List<State> |
exploreState(State state,
boolean generateLocation)
Explore a given state. |
List<State> |
exploreStates(List<State> states,
boolean generateLocation)
Explore a state. |
protected State |
findState(Model model,
int hashCode,
Collection<State> states)
|
int |
getNumThreads()
Get the number of threads used by this state manager. |
int |
getStateDistance(State state)
Get the distance of a state to an initial state. |
protected boolean |
isOpen(State state)
|
List<State> |
mergeTerminalStates()
Merge all terminal states |
protected void |
refreshHelpers()
|
protected void |
releaseExplorer(StateExplorer explorer)
|
List<State> |
removeState(State state)
Remove a state from the state space. |
void |
resetStateSpace(boolean removeInitial)
Reset the state space managed by this instance. |
protected static int[] |
shiftedLocation(State base,
int index)
|
void |
shutdown()
Shutdown this state space manager. |
Methods inherited from class org.eclipse.emf.henshin.statespace.impl.StateSpaceIndexImpl |
---|
addToCache, addToIndex, getCachedModel, getModel, getState, getState, getStateSpace, removeFromIndex, resetIndex |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.emf.henshin.statespace.StateSpaceIndex |
---|
getCachedModel, getModel, getState, getStateSpace |
Field Detail |
---|
protected final Stack<StateExplorer> explorers
protected final Object stateSpaceLock
protected StateDistanceMonitor stateDistanceMonitor
protected int maxStateDistance
protected boolean ignoreDuplicateTransitions
Constructor Detail |
---|
public BasicStateSpaceManager(StateSpace stateSpace)
stateSpace
- State space.Method Detail |
---|
protected void refreshHelpers()
protected boolean isOpen(State state) throws StateSpaceException
StateSpaceException
protected final State createOpenState(Model model, int hash, State derivedFrom, int[] location)
model
- Its model.hash
- The model's hash code.
public final State createInitialState(Model model) throws StateSpaceException
StateSpaceManager
createInitialState
in interface StateSpaceManager
model
- Model of the initial state.
StateSpaceException
- If the state space contains errors.public final List<State> removeState(State state) throws StateSpaceException
StateSpaceManager
removeState
in interface StateSpaceManager
state
- State to be removed.
StateSpaceException
- If the state space contains errors.public List<State> mergeTerminalStates() throws StateSpaceException
StateSpaceManager
mergeTerminalStates
in interface StateSpaceManager
StateSpaceException
- If the state space contains errors.public final void resetStateSpace(boolean removeInitial) throws StateSpaceException
StateSpaceManager
resetStateSpace
in interface StateSpaceManager
StateSpaceException
- On errors.protected State findState(Model model, int hashCode, Collection<State> states) throws StateSpaceException
StateSpaceException
public int getStateDistance(State state)
getStateDistance
in interface StateSpaceManager
state
- The state.
protected Model deriveModel(State state, boolean fromInitial) throws StateSpaceException
deriveModel
in class StateSpaceIndexImpl
StateSpaceException
public List<State> exploreStates(List<State> states, boolean generateLocation) throws StateSpaceException
StateSpaceManager
exploreStates
in interface StateSpaceManager
StateSpaceException
- If the state space contains errors.protected List<State> exploreState(State state, boolean generateLocation) throws StateSpaceException
state
- State to be explored.generateLocation
- Whether to generate locations for the new state.
StateSpaceException
- On errors.protected StateExplorer acquireExplorer()
protected void releaseExplorer(StateExplorer explorer)
protected static int[] shiftedLocation(State base, int index)
public int getNumThreads()
StateSpaceManager
getNumThreads
in interface StateSpaceManager
public void shutdown()
StateSpaceManager
shutdown
in interface StateSpaceManager
public void clearCache()
StateSpaceIndex
clearCache
in interface StateSpaceIndex
clearCache
in class StateSpaceIndexImpl
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |