CellIF.java
package edu.udel.cis.vsl.tass.dynamic.IF.cell;
/**
* A static variable (an instance of VariableIF) is an element of a model and
* exists independent of any execution of the model. A "cell" (also known as a
* "dynamic variable") is an object that is created during an execution. Some
* dynamic variables may be thought of as "instances" of a certain static
* variable. For example, a static global variable (i.e., a process variable or
* a shared variable) will be instantiated precisely once as a dynamic variable.
* Hence dynamic global variables correspond 1-1 with static global variables
* and exist for the entire life of the execution. (This is not exactly true for
* global array variables as will be explained below.)
*
* A local variable, on the other hand, is only instantiated when the containing
* function is called, may be instantiated multiple times, and multiple
* instances may exist simultaneously (thanks to recursion). A dynamic local
* variable exists only as long as its containing frame is on the call stack,
* i.e., until the function returns.
*
* There are also heap-allocated variable which are created by executing an
* allocation statement and destroyed by executing a deallocate (free)
* statement. These variables do not correspond to any static variable.
*
* A "literal" cell represents the memory region used to store a literal value
* occurring in program code. This is especially useful for literal arrays,
* recrods, and other objects. These cells are not modifiable, i.e., whatever
* value they are assigned at initialization will remain through the entire
* execution. An attempt to modify them will result in an error.
*
* An environment associates values to dynamic variables.
*
* @author siegel
*
*/
public interface CellIF {
public enum DynamicScope {
LITERAL, SHARED, PROCESS, LOCAL, HEAP
}
DynamicScope scope();
String toString();
}