meta model, to actual code generation is executed two times. In the first run, it is started
at the end, i.e. with code generation, and worked successively to the beginning. In this
way, the students see the result at the beginning (the source code generated) and can
easily derive the necessity and capability of the upstream components. This derivation
of requirements for upstream components is achieved by extending the initial task. At
the end of the first run, a complete execution chain exists from modeling with an UML
modeling tool, to several transformation steps, to the generation and formatting of the
source code to be generated. The second phase is aimed at extending the generator with
additional features, such as other UML diagram types, e.g. state transition diagrams.
Contrary to the first run, it is proceeded in the other direction, i.e. the extensions are
made starting from the output of the UML modeling tool, to the meta model, to code
generation by templates.
Due to this double treatment of basic components of a code generator, in-depth
understanding of the functioning of a generator is obtained, which by far exceeds the
understanding obtained from learning a concrete tool. While the first run (from the
back to the front) focuses on understanding the individual components, the second run
(extension) concentrates on their interaction.
The lecture will then be completed by transferring the knowledge learnt to a con-
crete generator tool within the framework of a simple exercise and by a presentation.
Particular attention shall be paid to the concrete implementation of the individual com-
ponents.
Contribution of the Paper. The paper presents a successful approach to conveying
fundamental knowledge in the field of model-driven software development. Doing this,
it will be focused on the understanding of fundamentals rather than on learning a con-
crete tool. Concrete approaches, such as those applied within the framework of the
MDA initiative, will not be conveyed. However, they may be referred to partly in the
final presentations of the students.
Structure of the Paper. First the tools used shall be presented and reasons for their
selection shall be given. Then, the workflow covered by the lecture shall be described
in detail, based on simple, but continuously growing requirements on the system. Each
learning step, will be clearly motivated by an concrete example or extension. At the end
the paper will be concluded by a summary.
2 Used Tools
Due to the relatively short time (two contact hour) for the implementation of an own
code generator, it was assured that the technologies/tools used are largely known to the
students or that their use is not associated with an excessive learning expenditure. For
instance, it is done without the use of a descriptive language for formulating constraints.
Instead, the constraints are formulated in a procedural manner. At these points, it will
also be referred to the fact that other, often more comfortable, but also more complex
solutions exist. Understanding of the generator, however, is not limited by these simpli-
fications. They enable the student to concentrate on the most important points.
57