Module dev.civl.gmc

Class DporNode<STATE,TRANSITION>

java.lang.Object
dev.civl.gmc.dpor.DporNode<STATE,TRANSITION>
Type Parameters:
STATE -
TRANSITION -

public class DporNode<STATE,TRANSITION> extends Object
Wraps a STATE object with transition caching and persistent data used in the DPOR search
  • Constructor Details

    • DporNode

      public DporNode(STATE state, int id)
      Parameters:
      state - The state this node will store
      id - 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 DporSearchStack or -1 if it is not on the stack.
    • getTraceStepCache

      public TraceStepIF<STATE> getTraceStepCache(TRANSITION transition)
      Returns:
      the cached trace step transition entails if we have explored it already, otherwise null.
    • cacheTraceStep

      public void cacheTraceStep(TRANSITION transition, TraceStepIF<STATE> traceStep)
      Accepts a transition and the trace step that it entails and caches this association.
    • getState

      public STATE getState()
      Returns:
      the STATE this DporNode wraps.
    • getId

      public int getId()
      Returns:
      the node id which is unique to every node.