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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Kraus, A.K.A., Koch, N.: Model-driven generation of web applications in UWE. In: Model-Driven Web Engineering (MDWE 2007), Como, Italy (July 2007)
AndroMDA.org. AndroMDA documentation (2007), http://galaxy.andromda.org
Bézivin, J.: On the unification power of models. Software and System Modeling 4(2), 171–188 (2005)
Bézivin, J.: Model Driven Engineering: An Emerging Technical Space. In: Lämmel, R., Saraiva, J., Visser, J. (eds.) GTTSE 2005. LNCS, vol. 4143, pp. 36–64. Springer, Heidelberg (2006)
Bravenboer, M., Kalleberg, K.T., Vermaas, R., Visser, E.: Stratego/XT 0.16. Components for transformation systems. In: Partial Evaluation and Program Manipulation (PEPM 2006), Charleston, South Carolina. ACM, New York (2006)
Bravenboer, M., van Dam, A., Olmos, K., Visser, E.: Program transformation with scoped dynamic rewrite rules. Fund. Informaticae 69(1–2), 123–178 (2006)
Czarnecki, K., Helsen, S.: Feature-based survey of model transformation approaches. IBM Systems Journal 45(3), 621–645 (2006)
Efftinge, S., Friese, P.: openArchitectureWare (2007), http://www.eclipse.org/gmt/oaw
Jouault, F., Bézivin, J.: KM3: a DSL for metamodel specification. In: Gorrieri, R., Wehrheim, H. (eds.) FMOODS 2006. LNCS, vol. 4037, pp. 171–185. Springer, Heidelberg (2006)
Jouault, F., Bézivin, J., Kurtev, I.: TCS: a DSL for the specification of textual concrete syntaxes in model engineering. In: Generative programming and component engineering (GPCE 2006), pp. 249–254. ACM Press, New York (2006)
Jouault, F., Kurtev, I.: Transforming Models with ATL. In: Bruel, J.-M. (ed.) MoDELS 2005. LNCS, vol. 3844, pp. 128–138. Springer, Heidelberg (2006)
Kurtev, I., Bézivin, J., Jouault, F., Valduriez, P.: Model-based DSL frameworks. In: Companion to OOPSLA 2006, pp. 602–616. ACM Press, New York (2006)
Brambilla, P.F.M., Comai, S., Matera, M.: Designing web applications with WebML and WebRatio. In: Rossi, G., et al. (eds.) Web Engineering: Modelling and Implementing Web Applications. Human-Computer Interaction Series. Springer, Heidelberg (2007)
Mens, T., van Gorp, P.: A taxonomy of model transformation. In: Graph and Model Transformation (GraMoT 2005), vol. 152, pp. 125–142 (March 2006)
Pastor, V.P.O., Fons, J.: OOWS: A method to develop web applications from web-oriented conceptual models. In: Web Oriented Software Technology (IWWOST 2003), pp. 65–70 (2003)
Object Management Group (OMG). Meta object facility (MOF) core specification. OMG available specification. Version 2.0 (January 2006), http://www.omg.org
Cáceres, B.V.P., Marcos, E.: A MDA-Based approach for web information system development. In: Proceedings of Workshop in Software Model Engineering (2003)
Pierre-Alain Muller, F.F., Studer, P., Bézivin, J.: Platform independent web application modeling and development with Netsilon. Software and Systems Modeling 4(4), 424–442 (2005)
The Apache Foundation. Velocity User Guide (2007), http://velocity.apache.org/engine/devel/user-guide.html
van Deursen, A., Klint, P., Tip, F.: Origin tracking. Journal of Symbolic Computation 15(5/6), 523–545 (1993)
Visser, E.: Syntax Definition for Language Prototyping. PhD thesis, University of Amsterdam (September 1997)
Visser, E.: Meta-programming with Concrete Object Syntax. In: Batory, D., Consel, C., Taha, W. (eds.) GPCE 2002. LNCS, vol. 2487, Springer, Heidelberg (2002)
Visser, E.: Program Transformation with Stratego/XT. In: Lengauer, C., Batory, D., Consel, C., Odersky, M. (eds.) Domain-Specific Program Generation. LNCS, vol. 3016, pp. 216–238. Springer, Heidelberg (2004)
Visser, E.: WebDSL: A case study in domain-specific language engineering. In: Generative and Transformational Techniques in Software Engineering (GTTSE 2007). LNCS. Springer, Heidelberg (2008)
Voelter, M., Groher, I.: Handling variability in model transformations and generators. In: Domain-Specific Modeling (DSM 2007) (2007)
Warmer, J.B., Kleppe, A.G.: Building a flexible software factory using partial domain specific models. In: Domain-Specific Modeling (DSM 2006), Portland, Oregon, USA, pp. 15–22 (October 2006)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Hemel, Z., Kats, L.C.L., Visser, E. (2008). Code Generation by Model Transformation . In: Vallecillo, A., Gray, J., Pierantonio, A. (eds) Theory and Practice of Model Transformations. ICMT 2008. Lecture Notes in Computer Science, vol 5063. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-69927-9_13
Download citation
DOI: https://doi.org/10.1007/978-3-540-69927-9_13
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-69926-2
Online ISBN: 978-3-540-69927-9
eBook Packages: Computer ScienceComputer Science (R0)