An essential part of model-driven development to systematically generate concrete source code from abstract input models are code generators. Regardless of their importance, abstract input models are not always suited to describe the output in a concise and precise way. Hence, customizations and adaptations of the code generator and the generated products are needed. Existing approaches mainly regard the code generation process as their primary concern and require the set up of an additional infrastructure in order to manage the customizations and adaptations. Thus, the goal of this paper is to propose an extension for template-based code generators to enable customizations and adaptations within a code generator that also respects referential integrity and reuses existing data structures for efficient management. First, we present a classification of common code generator customization and adaptation approaches (guided and unguided approaches) to identify the main concepts and elements of the approaches. Then, using the derived information relevant to manage guided and unguided approaches, we reuse the existing data structure (symbol table) to manage the customizations and adaptations. We achieve this by associating all relevant information directly with a template. This approach enables dynamic management of customizations and adaptations at run-time of the code generator and allow for statically checking before code generation. Our main contribution is an approach to combine guided and unguided customization approaches with a symbol table for efficient management.
['Pedram Mir Seyed Nazari', 'Alexander Roth', 'Bernhard Rumpe']
Management of guided and unguided code generator customizations by using a symbol table