You are on page 1of 1

Nikhil Narang

EE 599: Cyber-Physical System Design

Discussion 3 The STATEMATE Semantics of Statecharts

Problem Definition

In The STATEMATE Semantics of Statecharts, Harel, et al. describe how the language of statecharts has
no official semantics. In fact, it turns out that there are nearly 20 variants of semantics that had been
proposed at the time the paper was published. Harel, et al. also explains some of the requirements of an
effective semantics, which must be clear and simple, allowing users to understand how statecharts work
in an intuitive way while hiding the details of any mathematical definitions. Furthermore, STATEMATE
addresses the controversy of whether changes made in a given step should take effect in the current step
or in the next one.

Proposed Approaches

The paper outlines a few key principles of the STATEMATE semantics: (1) reactions to external and
internal events are sensed after the completion of the step, (2) events live for the duration of one step, (3)
calculations during a step are based on the inputs at the beginning of the step, (4) a maximal subset of
non-conflicting transitions and SRs is always executed, (5) a step takes zero time, and (6) the time
interval between two steps is not part of the step semantics. The paper also outlines some basic definitions
that revolve around a configuration, the maximal set of states the system can be in simultaneously. Given
a root state R, a configuration C will have the following rules: (1) C contains R, (2) if C contains an OR
state A, it must contain exactly one of As substates, (3) if C contains an AND state A, it must contain all
of As substates, and (4) the only states in C are those required by the previous rules. Transitions are
fundamental to the STATEMATE semantics because they allow a system to change its status. Compound
Transitions are the maximal chain of transition segments that are executable simultaneously as a single
transition. However, an issue arises when two compound transitions are in conflict. In the case that one
CT has priority over another, the higher priority transition is taken.

The paper also describes a basic step algorithm that takes the status of the system, the current time, and a
list of changes from the environment since the last step as inputs and outputs a new system status. From a
high level perspective, the algorithm involves three steps: (1) step preparation add external events to list
of internally generated events and execute any actions implied by the changes, (2) compute the content of
the next step compute the set of enabled CTs and resolve any conflicts, and (3) execute all compound
transitions and state reactions execute actions associated with enabled SRs and transition states
associated with enabled CTs.

Strengths, Novel Ideas

The paper presents a structured semantic for designing and modelling reactive systems, so the entire paper
is quite novel. It also resolves the controversy presented in the problem definition by assuring that
changes that occur in a step will be reflected in the next step.

Weaknesses, Possible Limitations

The paper identifies when race conditions might occur, when the value of an element is modified more
than once or is modified and used at a single point of time, but it does not appear to offer an effective
solution to resolving such conditions. It is worth clarifying whether the semantics should be responsible
for resolving race conditions in the first place, or whether the burden is on the user instead.

You might also like