The Statecharts semantics implemented by SCION is based on the paper "Big-Step Semantics", by Shahram Esmaeilsabzali, Nancy A. Day, Joanne M. Atlee, and Jianwei Niu. This work attempts to categorize the semantic aspects of a number of Statecharts variants, and describe the space of possible semantic options for each of these aspects. SCION chooses a particular configuration of the available options for each of these semantic aspects. This document provides a summary description of each of these semantic aspects, as well as the semantic choice selected by SCION, and for comparison, where possible, the choice made by the "Algorithm for SCXML Interpretation" described in the SCXML draft specification. This document is not meant to stand on its own, but rather assumes the reader has read "Big-Step Semantics", which fully describes all semantic aspects and their associated options.
This document is fairly technical and abstract, and it is primarily intended as a reference. For a more readable and higher-level overview of the similarities and differences between SCION and SCXML semantics, see [SCION vs. SCXML Comparison].
Description: Given a set of enabled transitions, this semantic aspect specifies how many transition occurrences can appear in a small-step.
SCION : Same as SCXML
Description: In what order are selected transitions executed?
SCXML: Explicitly defined, based on document order (which defines a total ordering on execution order of states and transitions).
SCION : Same as SCXML
Description: This defines what happens when you have a transition originating in a descendant of an orthogonal state, and targeting a descendant of the same orthogonal state, in a different orthogonal component.
SCXML: Undefined in SCXML semantics.
SCION: Arena Orthogonal
Description: This describes the following conditions (see Figure 9 in "Big-Step Semantics"):
SCXML: Non-preemptive, in a very specific way: it will select transitions based on document order, until it reaches a transition that preempts later transitions, in which case it will not select them.
Description: Specifies when the sequence of small-steps of a big-step ends (i.e., when the model becomes stable, and is ready to sense the environment for new inputs).
SCION: Same as SCXML
Description: How to obtain the value of a variable when it is accessed in a variable condition or in the right-hand-side of an assignment.
SCION : Small-step
Description: When can a generated event in a model be sensed by the event triggers of the transitions in its big-step?
SCXML: Event can be sensed in the next small-step. Exactly one event can be sensed at a time. If multiple internal events are sent in the same small-step, then those events are added to a queue of events, and they will be dequeued one at a time, such that each subsequent small-step will sense the event at the head of the queue.
SCION: Next small-step
Description: When can the system receive interface events (external events)?
SCION : Same
Description: How to choose from a set of selected transitions?
SCXML: Uses a specific algorithm: sorts states in document order, then selects transitions by hierarchy of source state (inner-first priority). If multiple selected transitions on the source state, then document order is used.
SCION: First, uses Source-Child priority; if there are still conflicts, then uses document order where lower document order has higher priority.
Like the "Algorithm for SCXML Interpretation" described in the SCXML specification, these semantic choices are realized in a general step algorithm. Where possible, the pseudocode is annotated to indicate where specific semantic choices have been made.
SCION provides implementations of this step algorithm in CoffeeScript and Python.