Collapse/Expand State Diagrams

Bx Examples Repository

Title: Collapse/Expand State Diagrams

Version: 0.1

Type:

Sketch.

Overview

The bidirectional HSM2SM transformation translates Hierarchical State Machines into correspondent flattened State Machines (i.e., nested states are not allowed), and viceversa. The transformation is non-bijective because different hierarchical machines can be translated into the same model.

Models

The forward transformation translates the hierarchical state machine in Fig. 1(a) into its flattened version in Fig. 1(b).
Let us suppose now that the designer modifies the target model by means of the changes , which are highlighted in
bold and with thicker lines in Fig. 1(c). More in details, consists of the following modifications:
– a new state Printing is added,
– a new transition print from Active to Printing is added,
– the transition done from Active to Idle is deleted and replaced by a new transition completed,
– a new transition done from Printing to Idle is added, and finally
– a new transition critical error from Out of services to the initial state Off is added.

Because of these modifications, the original source model and the revised target model are not consistent any longer.
Thus the backward transformation can be used to restore the consistency by propagating the changes in . However,
there is not a unique way of updating the source model. In fact, the added transitions in the target may be mapped to either
of the nested states as well as to the container state itself, as illustrated in Fig. 1(d), where the dotted edges represent the alternative transitions.

Fig.1
hsm2sm.jpg

Consistency

Please refer to the paper [1].

Consistency Restoration

Please refer to the paper [1].

Properties [optional section]

Variants [optional section]

References [optional section]

[1] Eramo, R., Pierantonio, A., Rosa, G., Managing uncertainty in bidirectional model transformations, Procs of the International Conference on Software Language Engineering (SLE 2015)

Author(s)

Romina Eramo

Reviewer(s)

Comments

Artefacts [optional section]

The case study is available here.

Unless otherwise stated, the content of this page is licensed under GNU Free Documentation License.