Skip to main content

Code Generation by Model Transformation

A Case Study in Transformation Modularity

  • Conference paper
Theory and Practice of Model Transformations (ICMT 2008)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 5063))

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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)

    Google Scholar 

  2. AndroMDA.org. AndroMDA documentation (2007), http://galaxy.andromda.org

  3. Bézivin, J.: On the unification power of models. Software and System Modeling 4(2), 171–188 (2005)

    Article  Google Scholar 

  4. 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)

    Chapter  Google Scholar 

  5. 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)

    Google Scholar 

  6. Bravenboer, M., van Dam, A., Olmos, K., Visser, E.: Program transformation with scoped dynamic rewrite rules. Fund. Informaticae 69(1–2), 123–178 (2006)

    MATH  Google Scholar 

  7. Czarnecki, K., Helsen, S.: Feature-based survey of model transformation approaches. IBM Systems Journal 45(3), 621–645 (2006)

    Article  Google Scholar 

  8. Efftinge, S., Friese, P.: openArchitectureWare (2007), http://www.eclipse.org/gmt/oaw

  9. 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)

    Chapter  Google Scholar 

  10. 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)

    Chapter  Google Scholar 

  11. Jouault, F., Kurtev, I.: Transforming Models with ATL. In: Bruel, J.-M. (ed.) MoDELS 2005. LNCS, vol. 3844, pp. 128–138. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  12. 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)

    Chapter  Google Scholar 

  13. 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)

    Google Scholar 

  14. Mens, T., van Gorp, P.: A taxonomy of model transformation. In: Graph and Model Transformation (GraMoT 2005), vol. 152, pp. 125–142 (March 2006)

    Google Scholar 

  15. 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)

    Google Scholar 

  16. Object Management Group (OMG). Meta object facility (MOF) core specification. OMG available specification. Version 2.0 (January 2006), http://www.omg.org

  17. 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)

    Google Scholar 

  18. 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)

    Article  Google Scholar 

  19. The Apache Foundation. Velocity User Guide (2007), http://velocity.apache.org/engine/devel/user-guide.html

  20. van Deursen, A., Klint, P., Tip, F.: Origin tracking. Journal of Symbolic Computation 15(5/6), 523–545 (1993)

    MATH  Google Scholar 

  21. Visser, E.: Syntax Definition for Language Prototyping. PhD thesis, University of Amsterdam (September 1997)

    Google Scholar 

  22. Visser, E.: Meta-programming with Concrete Object Syntax. In: Batory, D., Consel, C., Taha, W. (eds.) GPCE 2002. LNCS, vol. 2487, Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  23. 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)

    Google Scholar 

  24. 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)

    Google Scholar 

  25. Voelter, M., Groher, I.: Handling variability in model transformations and generators. In: Domain-Specific Modeling (DSM 2007) (2007)

    Google Scholar 

  26. 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)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Antonio Vallecillo Jeff Gray Alfonso Pierantonio

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics