Program Transformation Mechanics. A Classification of Mechanisms for Program Transformation with a Survey of Existing Transformation Systems

Transformation techniques are spreading from application in compilers to general use in generative programming and document processing. Since transformation requires operations such as pattern matching, generic structure traversal, and querying, which are not normally provided by general-purpose programming languages, many tools have been developed to provide higher-level support for the implementation of transformations. These tools come in many flavors each with their own merits and based on different paradigms, which makes comparison difficult. In this paper, we consider transformation from the point of view of mechanics and develop a classification of transformation mechanisms that provides a reference for comparing tools developed for different applications, using different implementations, and in different programming paradigms. To do so we distinguish three fundamental aspects of transformation mechanisms: scope, direction, and stages. We apply this classification in a discussion of design patterns for transformation, characterization of several typical transformations, and a systematic comparison of eleven representative transformation tools.

[1]  Krzysztof Czarnecki,et al.  Generative Programming , 2001, ECOOP Workshops.

[2]  Paul Klint,et al.  Term rewriting with traversal functions , 2003, TSEM.

[3]  Hans Petter Langtangen,et al.  Modern Software Tools for Scientific Computing , 1997, Birkhäuser Boston.

[4]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[5]  Kevin A. Schneider,et al.  Grammar programming in TXL , 2002, Proceedings. Second IEEE International Workshop on Source Code Analysis and Manipulation.

[6]  Yannis Smaragdakis,et al.  JTS: tools for implementing domain-specific languages , 1998, Proceedings. Fifth International Conference on Software Reuse (Cat. No.98TB100203).

[7]  S. E. Keller,et al.  Tree transformation techniques and experiences , 1984, SIGPLAN '84.

[8]  Eelco Visser,et al.  A Survey of Strategies in Program Transformation Systems , 2001, WRS.

[9]  Terence J. Harmer,et al.  The TAMPR Program Transformation System: Simplifying the Development of Numerical Software , 1997, SciTools.

[10]  Shigeru Chiba,et al.  OpenJava: A Class-Based Macro System for Java , 1999, Reflection and Software Engineering.

[11]  Eelco Visser,et al.  Building program optimizers with rewriting strategies , 1998, ICFP '98.

[12]  Ralf Lämmel,et al.  Typed Combinators for Generic Traversal , 2002, PADL.

[13]  Simon L. Peyton Jones,et al.  Scrap your boilerplate: a practical design pattern for generic programming , 2003, TLDI '03.

[14]  Paul Klint,et al.  Efficient annotated terms , 2000, Softw. Pract. Exp..

[15]  James Clark,et al.  XSL Transformations (XSLT) Version 1.0 , 1999 .

[16]  Arie van Deursen,et al.  Language Prototyping: An Algebraic Specification Approach , 1996, AMAST Series in Computing.

[17]  J. M. Boyle,et al.  Abstract programming and program transformation—an approach to reusing programs , 1989 .

[18]  Eelco Visser Scoped Dynamic Rewrite Rules , 2001, Electron. Notes Theor. Comput. Sci..

[19]  Eelco Visser,et al.  Rewriting Strategies for Instruction Selection , 2002, RTA.

[20]  Donald E. Knuth,et al.  Semantics of context-free languages , 1968, Mathematical systems theory.

[21]  Eelco Visser,et al.  The Essence of Strategic Programming , 2002 .

[22]  Eelco Visser,et al.  Meta-programming with Concrete Object Syntax , 2002, GPCE.

[23]  Shigeru Chiba,et al.  A metaobject protocol for C++ , 1995, OOPSLA.

[24]  Kevin A. Schneider,et al.  Software engineering by source transformation - experience with TXL , 2001, Proceedings First IEEE International Workshop on Source Code Analysis and Manipulation.

[25]  Richard J. Rodger,et al.  Jostraca: a Template Engine for Generative Programming , 2002 .

[26]  Henry Tirri,et al.  ALCHEMIST; A General Purpose Transformation Generator , 1996, Softw. Pract. Exp..

[27]  Joost Visser Visitor combination and traversal control , 2001, OOPSLA '01.

[28]  Steven J. DeRose,et al.  XML Path Language (XPath) Version 1.0 , 1999 .

[29]  Steven S. Muchnick,et al.  Advanced Compiler Design and Implementation , 1997 .

[30]  S. Doaitse Swierstra,et al.  Attribute grammars in the functional style , 1998, Systems Implementation 2000.

[31]  Görel Hedin,et al.  JastAdd - a Java-based system for implementing front ends , 2001, Electron. Notes Theor. Comput. Sci..