Andrea Guerriero CERN, Switzerland and Dipartimento di Informatica e Sistemistica dell' Universita' degli Studi "La Sapienza" di Roma - Italy Fabio Riccardi CERN, Switzerland and Dipartimento di Informatica e Sistemistica dell' Universita' degli Studi "Federico II" di Napoli" - Italy
(No paper submitted)
Abstract
Statecharts are a very powerful language for specifying system's
behaviour as a set of Concurrent Hierarchical Finite State Machines.
They have recently become very popular, and have become an integral
part of the most popular OO Analisys and Design methodologies (Booch,
Rambough, Harel, ...) Neverthanless, tools for implementing them are
extremely scarce, and the programmer is left alone with the burden of
their implementation.
We describe an implementation of the Statechart language that has been integrated in the C++ language, supporting Clusters (states in exclusive-or relationship), Sets (states in a and relationship), Events (triggering state transitions), Actions (executed by the scheduling of Events), and Conditions (to guard the execution of Actions).
The OO features of C++ have been preserved in the Statecharts, as one can derive a machine from a plain C++ object, or from another machine, orthogonally incrementing its state and behaviour, in conformity with the views of the most appreciated methodologies.
This language system has been used for the implementation of the upgraded Run Control system and Event Builder of the CHORUS experiment at CERN, with great benefits in terms of code maintenability and reliability.
Submitter: Fabio Riccardi
Institution: CERN
Address: 1211 Geneva 23, Switzerland
email: Fabio.riccardi@cern.ch
Tel: + 41 22 767 3541
Fax: + 41 22 767 3100
Topic Area: DAQ and Triggering
Title: OO-CHSM: Integrating C++ and Statecharts
Authors: Andrea Guerriero, CERN - Switzerland
Dipartimento di Informatica e Sistemistica dell' Universita`
degli Studi "La Sapienza" di Roma - Italy
Fabio Riccardi, CERN - Switzerland and
Dipartimento di Informatica e Sistemistica dell' Universita`
degli Studi "Federico II" di Napoli "" - Italy