Skip to main content

Abstract

Automatic code generation is a key feature of model-driven approaches to software engineering. In previous publications on this topic, we showed that constructing code generators in a model-driven way provides a lot of advantages. We presented Genesys, a code generation framework which supports the model-driven construction of code generators based on service-oriented principles. With this methodology, concepts like bootstrapping and reuse of existing components enable a fast evolution of the code generation library. Furthermore, the robustness of the code generators profits from the application of formal methods. In this paper, we will show in detail how code generators are constructed with Genesys, in a tutorial-like fashion. As an example, we will build a code generator for HTML documentation from scratch.

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. Jörges, S., Margaria, T., Steffen, B.: Genesys: Service-Oriented Construction of Property Conform Code Generators. Innovations in Systems and Software Engineering 4(4), 361–384 (2008)

    Article  Google Scholar 

  2. Steffen, B., Margaria, T., Nagel, R., Jörges, S., Kubczak, C.: Model-Driven Development with the jABC. In: Bin, E., Ziv, A., Ur, S. (eds.) HVC 2006. LNCS, vol. 4383, pp. 92–108. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  3. Margaria, T., Steffen, B.: Service Engineering: Linking Business and IT. IEEE Computer 39(10), 45–55 (2006)

    Article  Google Scholar 

  4. Technische Universität Dortmund: jABC Website (2009), http://www.jabc.de

  5. Clarke, E.M., Grumberg, O., Peled, D.: Model Checking. MIT Press, Cambridge (2001)

    Book  Google Scholar 

  6. Margaria, T., Steffen, B.: Agile IT: Thinking in User-Centric Models. In: Proc. ISoLA 2008. CCIS, vol. 17, pp. 493–505. Springer, Heidelberg (2008)

    Google Scholar 

  7. Object Management Group: Model Driven Architecture, http://www.omg.org/mda/

  8. Technische Universität Dortmund: Common SIBs Website (2010), http://www.jabc.de/sib

  9. Terence Parr: StringTemplate Website (2009), http://www.stringtemplate.org/

  10. Technische Universität Dortmund: jABC SIBs Website (2009), http://www.jabc.de/sib

  11. Oracle: JAX-WS Reference Implementation (2010), https://jax-ws.dev.java.net/

  12. Eclipse Foundation: JET, part of Eclipses Model To Text (M2T) component (2010), http://www.eclipse.org/modeling/m2t/?project=jet#jet

  13. Rose, L.M., Paige, R.F., Kolovos, D.S., Polack, F.: The Epsilon Generation Language. In: Schieferdecker, I., Hartman, A. (eds.) ECMDA-FA 2008. LNCS, vol. 5095, pp. 1–16. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  14. Oldevik, J., Neple, T., Grønmo, R., Aagedal, J.Ø., Berre, A.J.: Toward Standardised Model to Text Transformations. In: Hartman, A., Kreische, D. (eds.) ECMDA-FA 2005. LNCS, vol. 3748, pp. 239–253. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  15. Apache Software Foundation: Velocity Website (2007), http://velocity.apache.org/

  16. openArchitecureWare Team: openArchitectureWare Website (2009), http://www.openarchitectureware.org/

  17. AndroMDA Team: AndroMDA Website (2009), http://www.andromda.org/

  18. Eclipse Foundation: XPand, part of Eclipses Model To Text (M2T) component (2010), http://www.eclipse.org/modeling/m2t/?project=xpand#xpand

  19. Apache Software Foundation: Apache Ant Project (2010), http://ant.apache.org/

  20. Hoare, C.A.R.: The Verifying Compiler: A Grand Challenge for Computing Research. J. ACM 50(1), 63–69 (2003)

    Article  MATH  Google Scholar 

  21. Necula, G.C.: Proof-Carrying Code. In: Proc. POPL 1997, pp. 106–119. ACM Press, New York (1997)

    Google Scholar 

  22. Denney, E., Fischer, B.: Extending Source Code Generators for Evidence-based Software Certification. In: Proc. ISOLA 2006, pp. 138–145 (2006)

    Google Scholar 

  23. Goos, G., Zimmermann, W.: Verification of Compilers. In: Olderog, E.-R., Steffen, B. (eds.) Correct System Design. LNCS, vol. 1710, pp. 201–230. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  24. Necula, G.C.: Translation Validation for an Optimizing Compiler. ACM SIGPLAN Notices 35(5), 83–94 (2000)

    Article  Google Scholar 

  25. Stürmer, I., Weinberg, D., Conrad, M.: Overview of existing safeguarding techniques for automatically generated code. In: Proc. SEAS 2005, pp. 1–6. ACM Press, New York (2005)

    Google Scholar 

  26. Coglio, A., Green, C.: A Constructive Approach to Correctness, Exemplified by a Generator for Certified Java Card Applets. In: Meyer, B., Woodcock, J. (eds.) VSTTE 2005. LNCS, vol. 4171, pp. 57–63. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  27. Eclipse Foundation: Eclipse Modeling Project (2009), http://www.eclipse.org/modeling/

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Jörges, S., Steffen, B., Margaria, T. (2011). Building Code Generators with Genesys: A Tutorial Introduction. In: Fernandes, J.M., Lämmel, R., Visser, J., Saraiva, J. (eds) Generative and Transformational Techniques in Software Engineering III. GTTSE 2009. Lecture Notes in Computer Science, vol 6491. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-18023-1_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-18023-1_10

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-18022-4

  • Online ISBN: 978-3-642-18023-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics