Rewriting Object Models With Cycles and Nested Collections

A Model-Based Metaprogramming Problem
  • Markus Lepper
  • Baltasar Trancòn y Widemann
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8802)


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.


Model Transformation Collection Type User Code Declarative Programming Meta Tool 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Baldan, P., Bertolissi, C., Cirstea, H., Kirchner, C.: A rewriting calculus for cyclic higher-order term graphs. Mathematical Structures in Computer Science (2006),
  2. 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), CrossRefGoogle Scholar
  3. 3.
    Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley (1994)Google Scholar
  4. 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)CrossRefGoogle Scholar
  5. 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. 6.
    Martí-Oliet, N., Meseguer, J.: Rewriting logic as a logical and semantic framework. Tech. rep., SRI International (1993)Google Scholar
  7. 7.
    Metatools homepage,
  8. 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. 9.
    Parnas, D.L.: Software aspects of strategic defense systems. Comm. ACM 28(12) (1985)Google Scholar
  10. 10.
    Spivey, J.: The Z Notation: a reference manual. Prentice Hall (1988),
  11. 11.
    Stallman, R.M.: GNU Compiler Collection Internals. Free Software FoundationGoogle Scholar
  12. 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. 13.
    Visser, J.: Visitor combination and traversal control. ACM Sigplan Notices, OOPSLA 2001 36(11) (2001)Google Scholar
  14. 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)CrossRefGoogle Scholar
  15. 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

Copyright information

© Springer-Verlag Berlin Heidelberg 2014

Authors and Affiliations

  • Markus Lepper
    • 1
  • Baltasar Trancòn y Widemann
    • 1
    • 2
  1. 1.<semantics /> GmbHBerlinGermany
  2. 2.Ilmenau University of TechnologyIlmenauGermany

Personalised recommendations