java.lang.Object
dev.civl.gmc.seq.StackEntry<STATE,TRANSITION>
- All Implemented Interfaces:
Iterator<TRANSITION>
The stack entry that is going to be pushed onto the stack during the search.
The stack entry also serves as the iterator of the ample set or ample set
complement of the source
state.-
Constructor Summary
ConstructorsConstructorDescriptionStackEntry(SequentialNode<STATE> node, Collection<TRANSITION> transitions, int offset) -
Method Summary
Modifier and TypeMethodDescriptionintgetNode()intIf this step is preemptible, this method returns the PID of the process that executed the previous transition.getState()intgetTid()booleanhasNext()booleanIs this step preemptible, i.e., does the set of outgoing transitions include at least one transition from the previous process as well as at least one transition from another process?next()peek()voidsetMinimumSuccessorStackIndex(int minimumSuccessorStackIndex) voidsetPreemptionPid(int pid) Sets this entry to be preemptible, with the givenpidto be the PID of the previous process.source()Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
StackEntry
- Parameters:
node- The node that wraps the source state.transitions- The ample set or ample set complement of the source state.offset- the ID number that should be associated to the first transition in the sequence.
-
-
Method Details
-
peek
- Returns:
- the current transition but not move the
transitionIterator.
-
next
-
getTid
public int getTid() -
getNode
-
getTransitionIterator
-
source
-
hasNext
public boolean hasNext() -
getState
-
getMinimumSuccessorStackIndex
public int getMinimumSuccessorStackIndex() -
setMinimumSuccessorStackIndex
public void setMinimumSuccessorStackIndex(int minimumSuccessorStackIndex) -
getTransitions
-
isPreemptible
public boolean isPreemptible()Is this step preemptible, i.e., does the set of outgoing transitions include at least one transition from the previous process as well as at least one transition from another process?- Returns:
trueiff this step is preemptible
-
getPreemptionPid
public int getPreemptionPid()If this step is preemptible, this method returns the PID of the process that executed the previous transition. Otherwise the value returned is -1.- Returns:
- previous process PID, if this step is preemptible, else -1
-
setPreemptionPid
public void setPreemptionPid(int pid) Sets this entry to be preemptible, with the givenpidto be the PID of the previous process.
-