Authors:
Van Cam Pham
;
Ansgar Radermacher
;
Sébastien Gérard
and
Shuai Li
Affiliation:
CEA, LIST and Laboratory of Model Driven Engineering for Embedded Systems, France
Keyword(s):
UML State Machine, Code Generation, Semantics-conformance, Efficiency, Events, C++.
Related
Ontology
Subjects/Areas/Topics:
General-Purpose Modeling Languages and Standards
;
Languages, Tools and Architectures
;
Model Transformation
;
Model-Driven Architecture
;
Model-Driven Software Development
;
Models
;
Paradigm Trends
;
Software Engineering
Abstract:
An event-driven architecture is a useful way to design and implement complex systems. The UML State Machine and its visualizations are a powerful means to the modeling of the logical behavior of such an architecture. In Model Driven Engineering, executable code can be automatically generated from state machines. However, existing generation approaches and tools from UML State Machines are still limited to simple cases, especially when considering concurrency and pseudo states such as history, junction, and event types. This paper provides a pattern and tool for complete and efficient code generation approach from UML State Machine. It extends IF-ELSE-SWITCH constructions of programming languages with concurrency support. The code generated with our approach has been executed with a set of state-machine examples that are part of a test-suite described in the recent OMG standard Precise Semantics Of State Machine. The traced execution results comply with the standard and are a good hin
t that the execution is semantically correct. The generated code is also efficient: it supports multi-thread-based concurrency, and the (static and dynamic) efficiency of generated code is improved compared to considered approaches.
(More)