Skip to main content

Rewriting Object Models With Cycles and Nested Collections

A Model-Based Metaprogramming Problem

  • Conference paper
Leveraging Applications of Formal Methods, Verification and Validation. Technologies for Mastering Change (ISoLA 2014)

Abstract

Metaprogramming with classical compiler technology is similar to model-based code generation. We discuss a particular tool, umod, that generates complex data model implementations in Java, and a particular aspect of its support for declarative programming: The rewriting of data models in object-oriented style, based on the visitor pattern, with support for arbitrary reference graphs and nested collection-valued fields. We demonstrate that concerns of both compiler theory and model-based development apply, and that the distinction is overshadowed by a general commitment to semantic rigour.

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. Baldan, P., Bertolissi, C., Cirstea, H., Kirchner, C.: A rewriting calculus for cyclic higher-order term graphs. Mathematical Structures in Computer Science (2006), https://hal.inria.fr/inria-00110872/en/

  2. Balland, E., Brauner, P., Kopetz, R., Moreau, P.-E., Reilles, A.: Tom: Piggybacking rewriting on java. In: Baader, F. (ed.) RTA 2007. LNCS, vol. 4533, pp. 36–47. Springer, Heidelberg (2007), http://hal.inria.fr/inria-00142045

    Chapter  Google Scholar 

  3. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley (1994)

    Google Scholar 

  4. Lepper, M., Trancón y Widemann, B.: Optimization of visitor performance by reflection-based analysis. In: Cabot, J., Visser, E. (eds.) ICMT 2011. LNCS, vol. 6707, pp. 15–30. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  5. Lepper, M., Trancón y Widemann, B.: Solving the TTC 2011 compiler optimization task with metatools. In: Van Gorp, P., Mazanek, S., Rose, L. (eds.) Transformation Tool Contest 2011. EPTCS, vol. 74, pp. 70–115 (2011)

    Google Scholar 

  6. MartĂ­-Oliet, N., Meseguer, J.: Rewriting logic as a logical and semantic framework. Tech. rep., SRI International (1993)

    Google Scholar 

  7. Metatools homepage, http://www.bandm.eu/metatools/

  8. Palsberg, J., Jay, C.B.: The essence of the visitor pattern. In: Proc. COMPSAC, pp. 9–15. IEEE Computer Society (1998)

    Google Scholar 

  9. Parnas, D.L.: Software aspects of strategic defense systems. Comm. ACM 28(12) (1985)

    Google Scholar 

  10. Spivey, J.: The Z Notation: a reference manual. Prentice Hall (1988), http://spivey.oriel.ox.ac.uk/~mike/zrm/

  11. Stallman, R.M.: GNU Compiler Collection Internals. Free Software Foundation

    Google Scholar 

  12. Trancón y Widemann, B., Lepper, M., Wieland, J.: Automatic construction of XML-based tools, seen as meta-programming. Automated Software Engineering 10(1), 22–38 (2003)

    Google Scholar 

  13. Visser, J.: Visitor combination and traversal control. ACM Sigplan Notices, OOPSLA 2001 36(11) (2001)

    Google Scholar 

  14. Trancón y Widemann, B., Lepper, M.: Paisley: Pattern Matching à la Carte. In: Hu, Z., de Lara, J. (eds.) ICMT 2012. LNCS, vol. 7307, pp. 240–247. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  15. Trancón y Widemann, B., Lepper, M.: Towards (co)algebraic semantics for the object-oriented rewriter pattern. In: Seisenberger, M. (ed.) CALCO Early Ideas (2014)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Lepper, M., Trancòn y Widemann, B. (2014). Rewriting Object Models With Cycles and Nested Collections. In: Margaria, T., Steffen, B. (eds) Leveraging Applications of Formal Methods, Verification and Validation. Technologies for Mastering Change. ISoLA 2014. Lecture Notes in Computer Science, vol 8802. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-45234-9_31

Download citation

  • DOI: https://doi.org/10.1007/978-3-662-45234-9_31

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-662-45233-2

  • Online ISBN: 978-3-662-45234-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics