Code Generation by Model Transformation

  • Authors:
  • Zef Hemel;Lennart C. L. Kats;Eelco Visser

  • Affiliations:
  • Software Engineering Research Group, Delft University of Technology, The Netherlands;Software Engineering Research Group, Delft University of Technology, The Netherlands;Software Engineering Research Group, Delft University of Technology, The Netherlands

  • Venue:
  • ICMT '08 Proceedings of the 1st international conference on Theory and Practice of Model Transformations
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

The realization of model-driven software development requires effective techniques for implementing code generators. In this paper, we present a case study of code generation by model transformationwith Stratego, a high-level transformation language based on the paradigm of rewrite rules with programmable strategies that integrates model-to-model, model-to-code, and code-to-code transformations. The use of concrete object syntaxguarantees syntactic correctness of code patterns, and enables the subsequent transformation of generated code. The composability of strategies supports two dimensions of transformation modularity. Verticalmodularity is achieved by designing a generator as a pipeline of model-to-model transformations that gradually transforms a high-level input model to an implementation. Horizontalmodularity is achieved by supporting the definition of plugins which implement all aspects of a language feature. We discuss the application of these techniques in the implementation of WebDSL, a domain-specific language for dynamic web applications with a rich data model.