Next: 8.2.3 History
Up: 8.2 Transformation Strategies
Previous: 8.2.1 State Hierarchy
Contents
Index
Most of the state properties are statically coded in multiple parts of
the Java classes. For example, the property of default states are
implemented in these functions:
- The initModel function changes the state of the model to
its default leaf states. Those default leaf states are computed
statically. For example, if states number 4 and 6 are
the default leaf states, the following statements are statically
coded in function initModel: addInState(4);
addInState(6). Method private boolean addInState(int s)
simply adds a state to the current state list of the model. If the
model is already in state s, the function returns false. Since the current state list of the model is empty when it
is being initialized, this function always returns true when
invoked by initModel.
- The default states are statically coded in function changeState, which changes the model from one state to another.
If the new state is not a leaf state or it is orthogonal to other
states in the path from the
to the of the
transition, default leaf states are generated according to the
model structure. SCC invokes the SVM simulator to decide those
default leaf states as if the model were being simulated. The
default leaf states which need to be added for each transition do
not vary in different simulations or executions.
State properties concerning transition priorities ([ITF], OTF and RTO) are statically interpreted. The transitions are
sorted according to the algorithm in section
2.2.5. Those transitions are coded in the Java
classes in the same order with a switch-case structure. The first
enabled transition at run-time is always the one with the highest
total priority. This sorting of a submodel's transitions does not
vary, because the importing model is not allowed to modify its global
option InnerTransitionFirst (which is default to 0).
Orthogonal components are also statically coded in the classes. For a
transition going out of an orthogonal component, code is generated to
eliminate all other orthogonal components of the same parent. For a
transition going into an orthogonal component, the default leaf states
of other orthogonal components of the same parent are added to the
current state list. SCC hard-codes this information in the Java code
to improve performance.
Next: 8.2.3 History
Up: 8.2 Transformation Strategies
Previous: 8.2.1 State Hierarchy
Contents
Index
Thomas Huining Feng
2004-04-28