ABSTRACT
Automated refactoring tools are an essential part of a software developer's toolbox. They are most useful for gradually improving large existing code bases and it is essential that they work reliably, since even a simple refactoring may affect many different parts of a program, and the programmer should not have to inspect every individual change to ensure that the transformation went as expected. Even extensively tested industrial-strength refactoring engines, however, are fraught with many bugs that lead to incorrect, non-behaviour preserving transformations. We argue that software refactoring tools are a prime candidate for mechanical verification, offering significant challenges but also the prospect of tangible benefits for real-world software development.
- Gavin M. Bierman, Matthew J. Parkinson, and Andrew M. Pitts. MJ: An imperative core calculus for Java and Java with effects. Technical Report 563, University of Cambridge, 2003.Google Scholar
- Sandrine Blazy, Zaynah Dargaye, and Xavier Leroy. Formal verification of a C compiler front-end. In FM 2006: International Symposium on Formal Methods, volume 4085 of LNCS, pages 460--475. Springer, 2006. Google ScholarDigital Library
- Torbjörn Ekman, Ran Ettinger, Max Schäfer, and Mathieu Verbaere. Refactoring bugs, 2008. http://progtools.comlab.ox.ac.uk/refactoring/bugreports.Google Scholar
- Torbjörn Ekman and Görel Hedin. The JastAdd Extensible Java Compiler. In OOPSLA, 2007. Google ScholarDigital Library
- Torbjörn Ekman, Max Schäfer, and Mathieu Verbaere. Refactoring is not (yet) about transformation. In Second Workshop on Refactoring Tools (WRT), 2008. Google ScholarDigital Library
- H.-Christian Estler, Thomas Ruhroth, and Heike Wehrheim. Modelchecking Correctness of Refactorings -- Some Experiments. Electronic Notes in Theoretical Computer Science, 187:3--17, 2007. Google ScholarDigital Library
- Rodney Farrow. Automatic generation of fixed-point-finding evaluators for circular, but well-defined, attribute grammars. In CC, pages 85--98, 1986. Google ScholarDigital Library
- Alejandra Garrido and José Meseguer. Formal Specification and Verification of Java Refactorings. In SCAM, 2006. Google ScholarDigital Library
- James Gosling, Bill Joy, Guy Steele, and Gilad Bracha. The Java Language Specification. 2005. Google ScholarDigital Library
- Görel Hedin. Reference Attributed Grammars. Informatica, (24):301--317, 2000.Google Scholar
- Gérard P. Huet. The Zipper. J. Funct. Program., 7(5):549--554, 1997. Google ScholarDigital Library
- Atsushi Igarashi and Benjamin C. Pierce. On inner classes. Inf. and Comp., 177(1):56--89, 2002. Google ScholarDigital Library
- Gerwin Klein and Tobias Nipkow. A machine-checked model for a Java-like language, virtual machine, and compiler. ACM Trans. Program. Lang. Syst., 28(4):619--695, 2006. Google ScholarDigital Library
- Günter Kniesel and Helge Koch. Static composition of refactorings. Science of Computer Programming, 52(1-3):9--51, 2004. Google ScholarDigital Library
- Donald E. Knuth. Semantics of context-free languages. Mathematical Systems Theory, 2:127--146, 1968. Correction: Mathematical Systems Theory, 5:95--96, 1971.Google ScholarCross Ref
- Sorin Lerner, Todd Millstein, Erika Rice, and Craig Chambers. Automated soundness proofs for dataflow analyses and transformations via local rules. SIGPLAN Not., 40(1):364--377, 2005. Google ScholarDigital Library
- Xavier Leroy. Formal certification of a compiler back-end. In POPL, pages 42--54, 2006. Google ScholarDigital Library
- Eva Magnusson and Görel Hedin. Circular Reference Attributed Grammars. Sci. Comput. Program., 68(1):21--37, 2007. Google ScholarDigital Library
- The Maude System. http://maude.cs.uiuc.edu.Google Scholar
- Max Schäfer, Torbjörn Ekman, and Oege de Moor. Formalising and Verifying Reference Attribute Grammars in Coq (Technical Report). http://progtools.comlab.ox.ac.uk/projects/refactoring/formalising-rags, 2008.Google Scholar
- Max Schäfer, Torbjörn Ekman, and Oege de Moor. Sound and Extensible Renaming for Java. In Gregor Kiczales, editor, OOPSLA. ACM Press, 2008. Google ScholarDigital Library
- Generic Programming with Strafunski. http://www.cs.vu.nl/Strafunski.Google Scholar
- Stratego/XT. http://www.program-transformation. org/Stratego.Google Scholar
- Nik Sultana and Simon Thompson. Mechanical Verification of Refactorings. In PEPM. ACM SIGPLAN, January 2008. Google ScholarDigital Library
- Mathieu Verbaere. A Language to Script Refactoring Transformations. D.Phil. thesis, Oxford University Computing Laboratory, 2008.Google Scholar
- Philip Wadler. The Expression Problem. Message to Java-genericity mailing list, 1998.Google Scholar
Index Terms
- Challenge proposal: verification of refactorings
Recommendations
Refactoring is not (yet) about transformation
WRT '08: Proceedings of the 2nd Workshop on Refactoring ToolsIn order to ensure correctness, refactorings have to check extensive preconditions before performing the transformation. These preconditions usually involve subtle analyses of the program to be refactored, and as long as there is no good support for ...
Specifying and implementing refactorings
OOPSLA '10: Proceedings of the ACM international conference on Object oriented programming systems languages and applicationsModern IDEs for object-oriented languages like Java provide support for a basic set of simple automated refactorings whose behaviour is easy to describe intuitively. It is, however, surprisingly difficult to specify their behaviour in detail. In ...
Sound and extensible renaming for java
OOPSLA '08: Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applicationsDescriptive names are crucial to understand code. However, good names are notoriously hard to choose and manually changing a globally visible name can be a maintenance nightmare. Hence, tool support for automated renaming is an essential aid for ...
Comments