Management of Guided and Unguided Code Generator Customizations by Using a Symbol Table
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 barely address customizations at run-time of the code generator. 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. First, we present the main elements of guided and unguided customizations and adaptations approaches of code generators. Then, we derive the information relevant to manage guided and unguided approaches and store them in the symbol table. As all relevant information is directly associated with a template, we enable 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.