A unique integer number is assigned to each state of a DCharts model. Internally, the state number is used instead of the name or full path of the state. This has two effects:
A linked list of current leaf states is maintained in each model. It may contain more than one state ID for a model with orthogonal components.
Two states of different models may have the same ID, whether there is an importation relation between those models or not. The Java function to get the current state first checks the leaf states that the main model is currently in. If any of those leaf states is originally (before importation) an importation state, it then further checks the current leaf states of the submodel imported in that state. This is because, unlike SVM, SCC does not merge the imported model with the importing model but it records the imported model as an attribute of the importation state. This lookup process repeats until the bottom of the state hierarchy is reached.
Similarly, all the events are numbered. Those event IDs are the internal representation of the events that trigger transitions. The synthesized code uses a switch-case structure to test acceptable events. Events handled by different models may have the same ID, even if they have different event names in their model descriptions.