Comparison of the expressiveness and performance of template-based code generation tools
Abstract
A critical step in model-driven engineering (MDE) is the automatic synthesis of a textual artifact from models. This is a very useful model transformation to generate application code, to serialize the model in persistent storage, generate documentation or reports. Among the various model-to-text (M2T) paradigms, template-based code generation is the most popular in MDE. This is supported by over 70 different tools, whether they are model-based (e.g., Acceleo, EGL) or code-based (JET, Velocity). To help developers in their difficult choice of selecting the M2T tool, we compare the expressiveness power and performance of the nine most popular tools spanning the different technological approaches. We evaluate the expressiveness based on common metamodel patterns and evaluate the performance on a range of models that conform to a metamodel composed by the combination of these patterns. The results show that MDE-based tools are more expressive, but that code-based tools are more performant. Xtend2 offers the best compromise between the expressiveness and the performance.