next up previous contents
Next: 1.1.3 Macros and Importation Up: 1.1 Overview of DCharts Previous: 1.1.1 Transition Priorities   Contents

1.1.2 Importation

A model designed in DCharts can also be used as a component (or submodel) of another larger model. When this happens, the designer of the larger model explicitly imports the component by placing it in one of the leaf states of the larger model (so that the leaf state becomes non-leaf). All the states in the component become substates of that leaf state (known as importation state), and transitions between those states defined in the component are preserved.

Importation is done dynamically. An imported model is loaded only when information about it is needed. For example, a transition from state A to state B is fired, where B is an importation state. If the imported model has not been loaded at that time, the simulator/executor loads it and does the importation dynamically. Once imported, the importation state becomes non-leaf and non-importation state. There is no means to delete the imported model from the model where it is imported, unless the user rolls the whole model back to a previous snapshot taken at the time when the imported model has not been loaded yet. Rollback support is optionally supported by the SVMDCP (SVM Distributed CheckPointing) sub-project, which currently only supports rollback of the Java code generated by SCC.

A recursive DCharts model imports itself directly of indirectly. A theoretically infinite state hierarchy is created in this way. In practice, dynamically importation is always done finite times in a single simulation or execution, so the state hierarchy of the run-time model is manageable.

Because of the closure under importation property of DCharts, it is always possible to flatten a non-recursive model with importation by statically importing all its components.


next up previous contents
Next: 1.1.3 Macros and Importation Up: 1.1 Overview of DCharts Previous: 1.1.1 Transition Priorities   Contents
Thomas Huining Feng
2004-04-05