Differential precondition checking: a language-independent, reusable analysis for refactoring engines

One of the most difficult parts of building automated refactorings is ensuring that they preserve behavior. This paper proposes a new technique to check for behavior preservation; we call this technique differential precondition checking. It is simple yet expressive enough to implement the most common refactorings, and the core algorithm runs in linear time. However, the main advantage is that a differential precondition checker can be placed in a library and reused in refactoring tools for many different languages; the core algorithm can be implemented in a way that is completely language independent. We have implemented a differential precondition checker and used it in refactoring tools for Fortran (Photran), PHP, and BC.

[1]  Michael D. Ernst,et al.  Refactoring sequential Java code for concurrency via concurrent libraries , 2009, 2009 IEEE 31st International Conference on Software Engineering.

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

[3]  Tom Mens,et al.  Design preservation over subsequent releases of a software product: a case study of Baan ERP: Practice Articles , 2005 .

[4]  Oege de Moor,et al.  Specifying and implementing refactorings , 2010, OOPSLA.

[5]  Tom Mens,et al.  Formalizing refactorings with graph transformations , 2005, J. Softw. Maintenance Res. Pract..

[6]  Frank Tip,et al.  Correct Refactoring of Concurrent Java Code , 2010, ECOOP.

[7]  Max Schaefer,et al.  Stepping Stones over the Refactoring Rubicon – Lightweight Language Extensions to Easily Realise Refactorings , 2009 .

[8]  Andrew P. Black,et al.  How we refactor, and how we know it , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[9]  Amer Diwan,et al.  Program Metamorphosis , 2009, ECOOP.

[10]  Torbjörn Ekman,et al.  Stepping Stones over the Refactoring Rubicon , 2009, ECOOP.

[11]  Torbjörn Ekman,et al.  Sound and extensible renaming for java , 2008, OOPSLA.

[12]  Jeffrey Overbey,et al.  Generating Rewritable Abstract Syntax Trees , 2009, SLE.

[13]  Ken Kennedy,et al.  Optimizing Compilers for Modern Architectures: A Dependence-based Approach , 2001 .

[14]  Darko Marinov,et al.  Automated testing of refactoring engines , 2007, ESEC-FSE '07.

[15]  Oege de Moor,et al.  JunGL: a scripting language for refactoring , 2006, ICSE.

[16]  Jeffrey Overbey,et al.  Differential precondition checking: A lightweight, reusable analysis for refactoring tools , 2011, 2011 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011).

[17]  Ralph E. Johnson,et al.  A collection of refactoring specifications for fortran 95 , 2010, FORF.