Abstract
Software transformations in the Nuthatch style are described as walks over trees (possibly graphs) that proceed in programmer-defined steps which may observe join points of the walk, may observe and affect state associated with the walk, may rewrite the walked tree, may contribute to a built tree, and must walk somewhere, typically along one branch or another. The approach blends well with OO programming. We have implemented the approach in the Nuthatch/J library for Java.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Aho, A.V., Ullman, J.D.: Translations on a Context-Free Grammar. Information and Control 19(5), 439–475 (1971)
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)
Bravenboer, M., van Dam, A., Olmos, K., Visser, E.: Program Transformation with Scoped Dynamic Rewrite Rules. Fundamenta Informaticae 69(1-2), 123–178 (2006)
Bravenboer, M., Kalleberg, K.T., Vermaas, R., Visser, E.: Stratego/XT 0.17. A language and toolset for program transformation. Sci. Comput. Program. 72(1-2), 52–70 (2008)
Comon, H., Dauchet, M., Gilleron, R., Löding, C., Jacquemard, F., Lugiez, D., Tison, S., Tommasi, M.: Tree Automata Techniques and Applications (2007), http://www.grappa.univ-lille3.fr/tata (release October 12, 2007)
Cordy, J.R.: The TXL source transformation language. Sci. Comput. Program. 61(3), 190–210 (2006)
George, L., Wider, A., Scheidgen, M.: Type-Safe Model Transformation Languages as Internal DSLs in Scala. In: Hu, Z., de Lara, J. (eds.) ICMT 2012. LNCS, vol. 7307, pp. 160–175. Springer, Heidelberg (2012)
Huet, G.: The Zipper. J. Funct. Program. 7(5), 549–554 (1997)
Jouault, F., Allilaire, F., Bézivin, J., Kurtev, I.: ATL: A model transformation tool. Sci. Comput. Program. 72(1-2), 31–39 (2008)
Kalleberg, K.T., Visser, E.: Combining Aspect-Oriented and Strategic Programming. In: Workshop on Rule-Based Programming (RULE 2005). ENTCS, vol. 147, pp. 5–30 (2006)
Kalleberg, K.T., Visser, E.: Strategic Graph Rewriting: Transforming and Traversing Terms with References. In: 6th Intl. Workshop on Reduction Strategies in Rewriting and Programming (WRS 2006) (2006), online publication
Kalleberg, K.T., Visser, E.: Fusing a Transformation Language with an Open Compiler. In: 7th Workshop on Language Descriptions, Tools and Applications (LDTA 2007). ENTCS, pp. 18–31. Elsevier (2007)
Klint, P., van der Storm, T., Vinju, J.J.: Rascal: A Domain Specific Language for Source Code Analysis and Manipulation. In: 9th IEEE Intl. Working Conf. on Source Code Analysis and Manipulation (SCAM 2009), pp. 168–177. IEEE CS (2009)
Lämmel, R.: The Sketch of a Polymorphic Symphony. In: Reduction Strategies in Rewriting and Programming (WRS 2002). ENTCS, vol. 70, pp. 135–155 (2002)
Lämmel, R., Peyton Jones, S.L.: Scrap your boilerplate: a practical design pattern for generic programming. In: ACM SIGPLAN Intl. Workshop on Types in Languages Design and Implementation (TLDI 2003), pp. 26–37. ACM (2003)
Lämmel, R., Thompson, S., Kaiser, M.: Programming errors in traversal programs over structured data. Sci. Comput. Program (2012) (in press), doi:10.1016/j.scico.2011.11.006
Lämmel, R., Visser, E., Visser, J.: Strategic programming meets adaptive programming. In: 2nd Intl. Conf. on Aspect-Oriented Software Development (AOSD 2003), pp. 168–177 (2003)
Lämmel, R., Visser, J.: A Strafunski Application Letter. In: Dahl, V. (ed.) PADL 2003. LNCS, vol. 2562, pp. 357–375. Springer, Heidelberg (2002)
Lieberherr, K.J., Patt-Shamir, B., Orleans, D.: Traversals of object structures: Specification and Efficient Implementation. ACM Transactions on Programming Languages and Systems 26(2), 370–412 (2004)
Mens, T., Van Gorp, P.: A taxonomy of model transformation. ENTCS, vol. 152, pp. 125–142 (2006)
Moreau, P.E., Reilles, A.: Rules and Strategies in Java. In: Reduction Strategies in Rewriting and Programming (WRS 2007). ENTCS, vol. 204, pp. 71–82 (2008)
Palsberg, J., Jay, C.B.: The Essence of the Visitor Pattern. In: 22nd Intl. Computer Software and Applications Conf (COMPSAC 1998), pp. 9–15. IEEE Computer Society (1998)
Ren, D., Erwig, M.: A generic recursion toolbox for Haskell or: scrap your boilerplate systematically. In: Proceedings of the ACM SIGPLAN Workshop on Haskell, pp. 13–24. ACM (2006)
Reynolds, J.C.: The Discoveries of Continuations. Lisp and Symbolic Computation 6(3-4), 233–248 (1993)
Sloane, A.M.: Lightweight Language Processing in Kiama. In: Fernandes, J.M., Lämmel, R., Visser, J., Saraiva, J. (eds.) GTTSE 2009. LNCS, vol. 6491, pp. 408–425. Springer, Heidelberg (2011)
Tisi, M., MartĂnez, S., Jouault, F., Cabot, J.: Refining Models with Rule-based Model Transformations. Tech. Rep. 7582, INRIA (2011)
Veldhuizen, T.L.: Expression templates. C++ Report 7(5), 26–31 (1995), reprinted in C++ Gems, ed. Stanley Lippman
Viera, M., Swierstra, S.D., Lempsink, E.: Haskell, do you read me?: constructing and composing efficient top-down parsers at runtime. In: 1st ACM SIGPLAN Symposium on Haskell (Haskell 2008), pp. 63–74. ACM (2008)
Visser, E., Benaissa, Z., Tolmach, A.: Building program optimizers with rewriting strategies. In: 3rd ACM SIGPLAN Intl. Conf. on Functional Programming, ICFP 1998, pp. 13–26. ACM Press (1998)
Visser, J.: Visitor combination and traversal control. In: 16th ACM SIGPLAN Conf. on Object Oriented Programming, OOPSLA 2001, pp. 270–282. ACM (2001)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Bagge, A.H., Lämmel, R. (2013). Walk Your Tree Any Way You Want. In: Duddy, K., Kappel, G. (eds) Theory and Practice of Model Transformations. ICMT 2013. Lecture Notes in Computer Science, vol 7909. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-38883-5_3
Download citation
DOI: https://doi.org/10.1007/978-3-642-38883-5_3
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-38882-8
Online ISBN: 978-3-642-38883-5
eBook Packages: Computer ScienceComputer Science (R0)