IEEE Access (Jan 2024)
Development of a Framework-Independent Code Generator From State Machine Diagrams
Abstract
State machine diagrams offer the advantage of expressing the system clearly and easily to understand because they express the operation of the system in highly readable graphics. In addition, codes can be automatically generated from models created using modeling tools, contributing to the development of high-quality software. Despite these benefits, code generated from the modeling tool’s framework is often inaccessible to domain software, limiting the ability to modify or verify it. Additionally, the additional code generated to perform the various functions of the modeling tool is unnecessary code for the functions of the domain software and affects limited resources such as memory usage. As a solution, this paper proposes a method for developing an automatic model code generator that produces framework-independent code from state machine diagrams. The automatic model code generator uses a state machine diagram as input to automatically generate source code through the steps of extraction model design, extraction model implementation, implementation model creation, and model code generation. The functionality and performance of this method are validated by comparing the code generated using the automatic model code generator with that generated using the modeling tool. The experimental results in the naval combat system environment show no difference in functionality, demonstrating efficient performance concerning resource utilization, including memory usage. Using the method proposed in this paper has the advantage of being able to apply it flexibly by solving the problem of not being able to apply state machine diagrams due to the framework-dependent code of the modeling tool.
Keywords