Complete Code Generation from UML State Machine

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 hint 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.

[1]  Nicholas Nethercote,et al.  Valgrind: a framework for heavyweight dynamic binary instrumentation , 2007, PLDI '07.

[2]  Darin Goldstein,et al.  Quantum modeling , 2003, SPIE Defense + Commercial Sensing.

[3]  Sabine Glesner,et al.  Formal Verification of Java Code Generation from UML Models , 2005 .

[4]  Bran Selic,et al.  Papyrus: A UML2 Tool for Domain-Specific Language Modeling , 2007, Model-Based Engineering of Embedded Real-Time Systems.

[5]  Timothy Lethbridge,et al.  Enhanced code generation from UML composite state machines , 2014, 2014 2nd International Conference on Model-Driven Engineering and Software Development (MODELSWARD).

[6]  Timothy C. Lethbridge,et al.  Perceptions of Software Modeling: A Survey of Software Practitioners , 2010 .

[7]  Alexander Knapp Semantics of UML State Machines , 1999 .

[8]  Randy H. Katz,et al.  Contemporary Logic Design , 2004 .

[9]  Bruce Powel Douglass Real-time UML - developing efficient objects for embedded systems , 1997, Addison-Wesley object technology series.

[10]  David R. Butenhof Programming with POSIX threads , 1993 .

[11]  Jiro Tanaka,et al.  Mapping UML statecharts to java code , 2004, IASTED Conf. on Software Engineering.

[12]  Benoît Combemale,et al.  The Relevance of Model-Driven Engineering Thirty Years from Now , 2014, MoDELS.

[13]  Mark Rouncefield,et al.  Model-driven engineering practices in industry: Social, organizational and managerial factors that lead to success or failure , 2014, Sci. Comput. Program..

[14]  Anna Derezińska,et al.  Code Generation and Execution Framework for UML 2.0 Classes and State Machines , 2007 .

[15]  Volker Spinke,et al.  An object-oriented implementation of concurrent and hierarchical state machines , 2013, Inf. Softw. Technol..

[16]  Erik Proper,et al.  The Enterprise Architect , 2009 .

[17]  Pierre Boulet,et al.  An Optimized Compilation of UML State Machines , 2012, 2012 IEEE 15th International Symposium on Object/Component/Service-Oriented Real-Time Distributed Computing.

[18]  Alexander Knapp,et al.  Interactive Verification of UML State Machines , 2004, ICFEM.

[19]  Eladio Domínguez,et al.  A systematic review of code generation proposals from state machine specifications , 2012, Inf. Softw. Technol..