IEEE Access (Jan 2019)

Automatic Code Generation From UML State Chart Diagrams

  • Sunitha E. V.,
  • Philip Samuel

DOI
https://doi.org/10.1109/ACCESS.2018.2890791
Journal volume & issue
Vol. 7
pp. 8591 – 8608

Abstract

Read online

The fact that event driven systems can be modeled and implemented using unified modeling language (UML) state chart diagrams has led to the development of code generation tools. These are tremendously helpful in making software system designs and can even generate skeletal source code from these designs. The implementation of such automatic code generation from state diagrams is not fully supported by the existing programming languages. The major down side is that there is no one-to-one correspondence between the elements in the state chart diagram and the programming constructs. The existing programming elements cannot effectively implement two main components of the state diagram namely, state hierarchy and concurrency. In this paper, we present a novel design pattern for the implementation of the state diagram which includes hierarchical, concurrent, and history states. The state transitions of parallel states are delegated to the composite state class. The architecture of the code generator and the step by step process of code generation from UML state machine are proposed in the paper. The proposed approach is implemented and compared with similar tools and the results are found to be promising.

Keywords