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.
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
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/
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
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley (1994)
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)
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)
MartĂ-Oliet, N., Meseguer, J.: Rewriting logic as a logical and semantic framework. Tech. rep., SRI International (1993)
Metatools homepage, http://www.bandm.eu/metatools/
Palsberg, J., Jay, C.B.: The essence of the visitor pattern. In: Proc. COMPSAC, pp. 9–15. IEEE Computer Society (1998)
Parnas, D.L.: Software aspects of strategic defense systems. Comm. ACM 28(12) (1985)
Spivey, J.: The Z Notation: a reference manual. Prentice Hall (1988), http://spivey.oriel.ox.ac.uk/~mike/zrm/
Stallman, R.M.: GNU Compiler Collection Internals. Free Software Foundation
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)
Visser, J.: Visitor combination and traversal control. ACM Sigplan Notices, OOPSLA 2001Â 36(11) (2001)
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)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)