lennart.cl

Code Generation by Model Transformation

A Case Study in Transformation Modularity

Zef Hemel, Lennart C. L. Kats, Eelco Visser. Code Generation by Model Transformation. A Case Study in Transformation Modularity. In International Conference on Model Transformation (ICMT 2008), volume 5063 of Lecture Notes in Computer Science, pages 183—198. Springer, June 2008. (An updated, extended version was published in 2009 in SoSyM.) [pdf] [doi] [bib

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 transformation with 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 syntax guarantees syntactic correctness of code patterns, and enables the subsequent transformation of generated code. The composability of strategies supports two dimensions of transformation modularity. Vertical modularity 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. Horizontal modularity 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.


[back to lennart.cl]