Code Generator for UML State Machines

Daniel Michel · 2011

UML state machine diagrams are a widely used tool to model behavior. This is especially true for embedded and real-time software engineering projects. However, transforming complex state machines with multiple state nesting levels from the model to code is a tedious and error-prone task. This thesis introduces a code generator approach that transforms state machine models to code automatically. In contrast to existing tools that are able to do that, however, the generator described here is completely open. This enables the generator to be adapted and extended to meet project-specific requirements. The generated state machines are efficiently implemented and run on an established state machine execution framework, requiring only a minimum of memory to perform their task. Also, they are deterministic in time and are thus ready to be used in projects with hard real-time requirements. The thesis first evaluates different execution frameworks and selects one as target environment. Then, an efficient implementation of state machines is discussed, which consequently is built up as reference implementation for the generator. After an introduction to the generator framework itself, the generator templates and the infrastructure surrounding the generator are presented. Finally, a chapter on the integration of the various tools describes how to enable rapid software development with the generator at hand.

Read the paper · More papers on PaperTik