|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IState
An interface for a state.
Method Summary | |
---|---|
IState |
clone(Map<Object,Object> cloneMap)
Deep clone this state. |
void |
enterFunction(int threadId,
IValueArray localValues,
int beginLocationDesc,
int transformationIndex)
Enters a function for a particular thread. |
IValueArray |
exitFunction(int threadId)
Exits a function for particular thread. |
IValueArray |
exitThread(int threadId)
Kills a thread. |
int |
getGlobalCount()
Gets the number of globals. |
IValue |
getGlobalValue(int globalIndex)
Gets a global's value. |
IValueArray |
getGlobalValues()
Gets all global values. |
int |
getLocalCount(int threadId)
Gets the number of locals for a particular thread. |
IValue |
getLocalValue(int threadId,
int localIndex)
Gets a local's value. |
IValueArray |
getLocalValues(int threadId)
Gets local values for a particular thread. |
IValueArray[] |
getLocalValuesStack(int threadId)
Gets local values stack for a particular thread. |
int |
getLocation(int threadId)
Gets a thread's location. |
int[] |
getLocationStack(int threadId)
Gets the location stack for a particular thread. |
int |
getLockCount(int threadId)
Gets the lock count for a particular thread when waiting. |
int |
getStackHeight(int threadId)
Gets the stack height for a particular thread. |
int[] |
getThreadIds()
Gets all the thread ids in this state. |
int |
getTransformationIndex(int threadId)
Gets a thread's transformation index. |
int[] |
getTransformationIndexStack(int threadId)
Gets the transformation index stack for a particular thread. |
boolean |
isThreadAlive(int threadId)
Determines whether a thread is still alive. |
void |
newThread(int threadId,
IValueArray localValues,
int beginLocationDesc)
Creates a new thread. |
int |
removeLockCount(int threadId)
Removes the lock count for a particular thread when waiting. |
void |
setGlobalValue(int globalIndex,
IValue value)
Sets a global's value. |
void |
setLocalValue(int threadId,
int localIndex,
IValue value)
Sets a local's value. |
void |
setLocation(int threadId,
int locationDesc,
int transformationIndex)
Sets a thread's location. |
void |
storeLockCount(int threadId,
int lockCount)
Stores the lock count for a particular thread when waiting. |
void |
validate(IBogorConfiguration bc)
Validates this state wrt. |
Methods inherited from interface edu.ksu.cis.projects.bogor.util.Disposable |
---|
dispose |
Method Detail |
---|
int getGlobalCount()
void setGlobalValue(int globalIndex, IValue value)
globalIndex
- The index of the global. Must be at least zero and at most
less than the number of globals.value
- The new value of the global. Must be non-null.SymbolTable.getGlobalIndexTable()
IValue getGlobalValue(int globalIndex)
globalIndex
- The index of the global. Must be at least zero and at most
less than the number of globals.
SymbolTable.getGlobalIndexTable()
IValueArray getGlobalValues()
int getLocalCount(int threadId)
threadId
- The thread id that is associated to the local. The thread id
must be a valid thread id in this state.
void setLocalValue(int threadId, int localIndex, IValue value)
threadId
- The thread id that is associated to the local. The thread id
must be a valid thread id in this state.localIndex
- The index of the local. Must be at least zero and at most less
than the number of locals.value
- The new value of the local. Must be non-null.FSMSymbolTable.getLocalIndexTable()
IValue getLocalValue(int threadId, int localIndex)
threadId
- The thread id that is associated to the local. The thread id
must be a valid thread id in this state.localIndex
- The index of the local. Must be at least zero and at most less
than the number of locals.
FSMSymbolTable.getLocalIndexTable()
IValueArray getLocalValues(int threadId)
threadId
- The thread id that is associated to the locals. The thread id
must be a valid thread id in this state.
IValueArray[] getLocalValuesStack(int threadId)
threadId
- The thread id that is associated to the locals. The thread id
must be a valid thread id in this state.
void setLocation(int threadId, int locationDesc, int transformationIndex)
threadId
- The thread id that its location to be set. The thread id must
be a valid thread id in this state.locationDesc
- The new location of the thread.transformationIndex
- The transformation index causing the move. It must be a
transformation index of the old location desc.FSMSymbolTable.getLocationDescTable()
int getLocation(int threadId)
threadId
- The thread id that its location is queried. The thread id must
be a valid thread id in this state.
FSMSymbolTable.getLocationDescTable()
int[] getLocationStack(int threadId)
threadId
- The thread id that is associated to the location stack. The
thread id must be a valid thread id in this state.
int getLockCount(int threadId)
threadId
- The thread id that is (must be) waiting.
int getStackHeight(int threadId)
threadId
- The thread id that is associated to the stack. The thread id
must be a valid thread id in this state.
boolean isThreadAlive(int threadId)
threadId
- The thread to be determined.
int[] getThreadIds()
int getTransformationIndex(int threadId)
threadId
- The thread id that its transformation index is queried. The
thread id must be a valid thread id in this state.
int[] getTransformationIndexStack(int threadId)
threadId
- The thread id that is associated to the transformation index
stack. The thread id must be a valid thread id in this state.
IState clone(Map<Object,Object> cloneMap)
cloneMap
- Original values (IValue
) to their clones (
IValue
) mapping. The clone map to solve
circular references in values.
void enterFunction(int threadId, IValueArray localValues, int beginLocationDesc, int transformationIndex)
threadId
- The thread id of the thread that enters a function. The thread
id must be a valid thread id in this state.localValues
- The local values of the function to be entered. Must be
non-null.beginLocationDesc
- The function initial location.FSMSymbolTable.getLocationDescTable()
IValueArray exitFunction(int threadId)
threadId
- The thread id of the thread that enters a function. The thread
id must be a valid thread id in this state.
FSMSymbolTable.getLocationDescTable()
IValueArray exitThread(int threadId)
threadId
- The thread id to be killed. The thread id must be a valid
thread id in this state.
void newThread(int threadId, IValueArray localValues, int beginLocationDesc)
threadId
- The thread id for the new thread. The thread id must not
already be in this state.localValues
- The local values of the new thread. Must be non-null.beginLocationDesc
- The initial location of the new thread.FSMSymbolTable.getLocationDescTable()
int removeLockCount(int threadId)
threadId
- The thread id that is (must be) waiting.
void storeLockCount(int threadId, int lockCount)
threadId
- The thread id that is waiting. The thread id must be a valid
thread id in this state.lockCount
- The number of locks operations. At least zero.void validate(IBogorConfiguration bc)
bc
- The Bogor configuration to validate to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |