Ákos Frohner, Zoltán Porkoláb
Department of General Computer Science,
University Eötvös Loránd, Budapest
E-mail:
Akos.Frohner@elte.hu,
Zoltan.Porkolab@elte.hu,
Creating a generic, object-oriented, component-based, transactional business system, which covers the whole lifecycle, is possible only with integration of commercial tools, component technologies, recently developed class libraries and using code generators. Most of the recently used tools for development techniques are focusing only of one the layers of the model from the code generation point of view. As a consequence the inter-layer connections are lost in the generated code.
We describe a code generator technique, which uses an analysis model as a starting point and generates the following model layers or sub-models directly:
To allow modifications at each level we give an algorithm to re-generate the sub-models. The formally described graph transformation preserves the modifications made in the sub-model and merges the changes from the analysis model.
Based on the experiences with 4GL systems it is obvious the need to provide customisation in the generated code as well. The source code can be geenrated in the same manner as the sub-models are generated and re-generated.
The sub-model generation algorithm can be implemented as a transformation on the model graph, but one does not have this clean architecture if the target graph is projected into source code. Although it is possible to reverse engineer source code into model graphs, but it is a never ending battle to follow the changes of the target languages in these tools.
We intend to delegate the actual graph transformations on the source code level to the most appropriate tools, to the compilers itself, thus we offer a multi-paradigm approach [1]. We let the developer to choose the best solution for her or his target language and problem domain: