Towards generic refactoring

We define a challenging and meaningful benchmark for genericity in language processing, namely the notion of generic program refactoring. We provide the first implementation of the benchmark based on functional strategic programming in Haskell. We use the basic refactoring of abstraction extraction as the running example. Our implementation comes as a functional programming framework with hot spots for the language-specific ingredients for refactoring, e.g., means for abstraction construction and destruction, and recognisers for name analysis. The language-parametric framework can be instantiated for various, rather different languages, e.g., Java, Prolog, Haskell, or XML schema.

[1]  Erik Poll,et al.  Algebra of Programming by Richard Bird and Oege de Moor, Prentice Hall, 1996 (dated 1997). , 1999 .

[2]  Olivier Danvy,et al.  Lambda-dropping: transforming recursive equations into programs with block structure , 1997, Theor. Comput. Sci..

[3]  Leon Sterling,et al.  A Notion of Map between Logic Programs , 1990, ICLP.

[4]  Ralph E. Johnson,et al.  A Refactoring Tool for Smalltalk , 1997, Theory Pract. Object Syst..

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

[6]  Jean-Marie Favre,et al.  Preprocessors from an abstract point of view , 1996, 1996 Proceedings of International Conference on Software Maintenance.

[7]  F. Bellegarde Notes for pipelines of transformations for ML , 1995 .

[8]  Daniel M. Yellin,et al.  Composable attribute grammars: support for modularity in translator design and implementation , 1992, POPL '92.

[9]  Ralf Lämmel,et al.  Grammar Adaptation , 2001, FME.

[10]  Helmut A. Partsch,et al.  Specification and transformation of programs , 1990 .

[11]  Gregor Kiczales,et al.  Aspect-oriented programming , 2001, ESEC/FSE-9.

[12]  Thomas Johnsson,et al.  Lambda Lifting: Treansforming Programs to Recursive Equations , 1985, FPCA.

[13]  Wolfgang Lohmann Format Evolution , 2001 .

[14]  Ralf Lämmel Reuse by Program Transformation , 1999, Scottish Functional Programming Workshop.

[15]  Alberto Pettorossi,et al.  Rules and strategies for transforming functional and logic programs , 1996, CSUR.

[16]  Helmuth Partsch,et al.  Specification and Transformation of Programs - A Formal Approach to Software Development , 1990, Texts and Monographs in Computer Science.

[17]  Eugenio Moggi,et al.  Notions of Computation and Monads , 1991, Inf. Comput..

[18]  Simon J. Thompson Refactoring Functional Programs , 2004, Advanced Functional Programming.

[19]  William F. Opdyke,et al.  Refactoring object-oriented frameworks , 1992 .

[20]  Ivan Moore,et al.  Automatic inheritance hierarchy restructuring and method refactoring , 1996, OOPSLA '96.

[21]  Peter D. Mosses Action Semantics , 1986, ADT.

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

[23]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[24]  Ralf Lämmel,et al.  Declarative Aspect-Oriented Programming , 1999, PEPM.

[25]  Peter Pepper,et al.  Lr Parsing = Grammar Transformation + Ll Parsing Making Lr Parsing More Understandable and More Eecient , 1999 .

[26]  Karl Lieberherr,et al.  Adaptive Object-Oriented Software: The Demeter Method with Propagation Patterns , 1995 .

[27]  Mark P. Jones,et al.  Type Classes with Functional Dependencies , 2000, ESOP.

[28]  Eelco Visser,et al.  Language Independent Traversals for Program Transformation , 2000 .

[29]  Philip Wadler,et al.  The essence of functional programming , 1992, POPL '92.

[30]  Frank Pfenning,et al.  Higher-order abstract syntax , 1988, PLDI '88.

[31]  Volker Riediger,et al.  Folding: an approach to enable program understanding of preprocessed languages , 2001, Proceedings Eighth Working Conference on Reverse Engineering.