java.lang.Object
dev.civl.gmc.dpor.DporNode<STATE,TRANSITION>
- Type Parameters:
STATE-TRANSITION-
Wraps a STATE object with transition caching and persistent data used in the
DPOR search
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcacheTraceStep(TRANSITION transition, TraceStepIF<STATE> traceStep) Accepts a transition and the trace step that it entails and caches this association.intgetId()intgetState()getTraceStepCache(TRANSITION transition) voidsetStackPosition(int stackPosition) Set the stack position field of theDporNode.
-
Constructor Details
-
DporNode
- Parameters:
state- The state this node will storeid- An identifier unique to this node
-
-
Method Details
-
setStackPosition
public void setStackPosition(int stackPosition) Set the stack position field of the
DporNode.The "stack position" field is intended to be used by a depth-first search algorithm, to mark that a state is currently on the depth-first search stack.
The bottom element in the stack will have an index 0.
- Parameters:
value- The value assigned to the stack position filed.
-
getStackPosition
public int getStackPosition()- Returns:
- the position of this node as an entry in
DporSearchStackor -1 if it is not on the stack.
-
getTraceStepCache
- Returns:
- the cached trace step
transitionentails if we have explored it already, otherwisenull.
-
cacheTraceStep
Accepts a transition and the trace step that it entails and caches this association. -
getState
- Returns:
- the STATE this
DporNodewraps.
-
getId
public int getId()- Returns:
- the node id which is unique to every node.
-