Code Generation for Embedded Systems
Chapter written by D. Björklund, J. Lilius and I. Porres,
Turku Center for Computer Science Åbo Akademi University Turku, Finland
The objective of a code generator is to synthesize executable program code from a detailed design model. A detailed design model is a model that contains a complete description of a system using a high level design language. Currently, the Unified Modeling Language (UML) [OMG 03] is the most popular modeling language in software analysis and design. A UML model describes a system to be constructed as a collection of graphical diagrams. Each diagram describes one or more structural and behavioral features of a system, but not how it is implemented. A code generator is then responsible interpreting these diagrams and targeting them to a specific implementation technology such a specific programming language, operating system, database server or middleware. This approach is advocated by the Model Driven Architecture approach defined by the OMG [OMG 01].
The need for code generators is clear: while software modeling provides many known advantages to software development, there are no efficient interpreters or virtual machines for high level design models. Therefore, design models need to be translated into executable program code. Traditionally, this step has been performed manually, but the benefits of automating this task are obvious: a code generator can reduce development time and costs ...