5.9SEJun 15, 2016
TUnit - Unit Testing For Template-based Code GeneratorsCarsten Kolassa, Markus Look, Klaus Müller et al.
Template-based code generator development as part of model-drivendevelopment (MDD) demands for strong mechanisms and tools that support developers to improve robustness, i.e., the desired code is generated for the specified inputs. Although different testing methods have been proposed,a method for testing only parts of template-based code generators that can be employed in the early stage of development is lacking. Thus, in this paper we present an approach and an implementation based on JUnit to test template-based code generators. Rather than testing a complete code generator,it facilitates partial testing by supporting the execution of templates with a mocked environment. This eases testing of code generators in early stages of development as well as testing new orchanged parts of a code generator. To test the source code generated by the templates under test, different methods are presented including string comparisons, API-based assertions, and abstract syntax tree based assertions.
7.9SEJun 2, 2016
An Extended Symbol Table Infrastructure to Manage the Composition of Output-Specific Generator InformationPedram Mir Seyed Nazari, Alexander Roth, Bernhard Rumpe
Code generation is regarded as an essential part of model-driven development (MDD) to systematically transform the abstract models to concrete code. One current challenges of templatebased code generation is that output-specific information, i.e., information about the generated source code, is not explicitly modeled and, thus, not accessible during code generation. Existing approaches try to either parse the generated output or store it in a data structure before writing into a file. In this paper, we propose a first approach to explicitly model parts of the generated output. These modeled parts are stored in a symbol for efficient management. During code generation this information can be accessed to ensure that the composition of the overall generated source code is valid. We achieve this goal by creating a domain model of relevant generator output information, extending the symbol table to store this information, and adapt the overall code generation process.
14.9SESep 15, 2015
A Comparison of Mechanisms for Integrating Handwritten and Generated Code for Object-Oriented Programming LanguagesTimo Greifenberg, Katrin Hölldobler, Carsten Kolassa et al.
Code generation from models is a core activity in model-driven development (MDD). For complex systems it is usually impossible to generate the entire software system from models alone. Thus, MDD requires mechanisms for integrating generated and handwritten code. Applying such mechanisms without considering their effects can cause issues in projects with many model and code artifacts, where a sound integration for generated and handwritten code is necessary. We provide an overview of mechanisms for integrating generated and handwritten code for object-oriented languages. In addition to that, we define and apply criteria to compare these mechanisms. The results are intended to help MDD tool developers in choosing an appropriate integration mechanism.
12.3SESep 8, 2015
Towards Product Lining Model-Driven Development Code GeneratorsAlexander Roth, Bernhard Rumpe
A code generator systematically transforms compact models to detailed code. Today, code generation is regarded as an integral part of model-driven development (MDD). Despite its relevance, the development of code generators is an inherently complex task and common methodologies and architectures are lacking. Additionally, reuse and extension of existing code generators only exist on individual parts. A systematic development and reuse based on a code generator product line is still in its infancy. Thus, the aim of this paper is to identify the mechanism necessary for a code generator product line by (a) analyzing the common product line development approach and (b) mapping those to a code generator specific infrastructure. As a first step towards realizing a code generator product line infrastructure, we present a component-based implementation approach based on ideas of variability-aware module systems and point out further research challenges.
6.9SEAug 25, 2014
Staged Evolution with Quality Gates for Model LibrariesAlexander Roth, Andreas Ganser, Horst Lichter et al.
Model evolution is widely considered as a subject under research. Despite its role in research, common purpose concepts, approaches, solutions, and methodologies are missing. Limiting the scope to model libraries makes model evolution and related quality concerns manageable, as we show below. In this paper, we put forward our quality staged model evolution theory for model libraries. It is founded on evolution graphs, which offer a structure for model evolution in model libraries through evolution steps. These evolution steps eventually form a sequence, which can be partitioned into stages by quality gates. Each quality gate is defined by a lightweight quality model and respective characteristics fostering reusability.
4.0SEAug 25, 2014
Proactive Quality Guidance for Model Evolution in Model LibrariesAndreas Ganser, Horst Lichter, Alexander Roth et al.
Model evolution in model libraries differs from general model evolution. It limits the scope to the manageable and allows to develop clear concepts, approaches, solutions, and methodologies. Looking at model quality in evolving model libraries, we focus on quality concerns related to reusability. In this paper, we put forward our proactive quality guidance approach for model evolution in model libraries. It uses an editing-time assessment linked to a lightweight quality model, corresponding metrics, and simplified reviews. All of which help to guide model evolution by means of quality gates fostering model reusability.