Location of Repository

Refactorings are source-to-source behaviour-preserving program transformations that are used for improving program structure. Programmers refactor code to adapt it when new functionality is added or when the code is being repaired -- refactoring serves to keep the code ``clean'' and more maintainable. Refactoring can also be used as an exploratory technique for understanding source code. The process of refactoring has been automated through the implementation of tools; these tools assist programmers by handling the consistent application of behaviour-preserving changes to the code. It is desirable that the implementations of refactorings are correct: bugs might otherwise be introduced in refactored programs. The correctness, i.e. behaviour-preservation, of refactoring is traditionally probed by testing the refactored program and not the refactoring implementation directly. Recently, automated testing techniques have been used to test implementations of refactorings directly, but the coverage of testing is partial at best. The verification of refactorings is more challenging but determines whether a refactoring is behaviour-preserving for all possible programs. We study the verification of refactorings using the proof assistant Isabelle/HOL for untyped and typed lambda-calculi. Some of the issues encountered during verification are technical rather than purely theoretical: they relate to the embedding of the programming language in the proof environment. The reasons for our choice of techniques are discussed. We also discuss other practical considerations such as the readability of mechanised refactorings, and the avoidance of computationally expensive refactorings

Topics:
QA76

OAI identifier:
oai:kar.kent.ac.uk:23975

Provided by:
Kent Academic Repository

Downloaded from
http://kar.kent.ac.uk/23975/1/HOLNik.pdf

- (2007). A Head-to-Head Comparison of de Bruijn Indices and Names’,
- (1999). A new approach to abstract syntax involving binders,
- (2004). A survey of software refactoring’,
- (2004). Algebraic Reasoning for Object-Oriented Programming’,
- (2007). Automated testing of refactoring engines,
- (1978). Can programming be liberated from the von Neumann style?: a functional style and its algebra of programs’,
- (2006). Changing programs correctly: Refactoring with speciﬁcations,
- (2006). Changing software correctly,
- (2007). Coinductive Veriﬁcation of Program Optimizations Using Similarity Relations’,
- (1990). Explicit substitutions,
- (1996). Five axioms of alpha-conversion,
- (2006). Formal Speciﬁcation and Veriﬁcation of Java Refactorings’,
- (2005). Formalizing refactorings with graph transformations’,
- (2000). From LCF to HOL: a short history’, Proof, language and interaction: essays in honour of Robin Milner,
- (2004). Functional pearl: i am not a number–i am a free variable’,
- (1994). Functional Programming and Input/Output, Cambridge Univ Pr.
- (1993). Introduction to HOL: a theorem proving environment for higher order logic,
- (1994). Isabelle: A Generic Theorem Prover,
- (2002). Isabelle/HOL: A Proof Assistant for Higher-Order Logic,
- (1997). Lambda Calculi Plus Letrec, Vrije Universiteit, Faculteit der Wiskunde en Informatica.
- (1994). Lambda Calculi: A Guide for Computer Scientists,
- (1994). Lambda Calculi: A Guide for Computer Scientists, Clarendon Press.
- (1968). Lambda-Calculus Models of Programming Languages,
- (1972). Lambda-calculus notation with nameless dummies: a tool for automatic formula manipulation with application to the Church-Rosser theorem’,
- (2005). Latex sugar for isabelle documents, Distributed with the Isabelle system.
- (2001). Logic and Automation for Algebra of Programming, Master’s thesis,
- (1987). Logic and Computation: interactive proof with Cambridge LCF,
- (2005). Mechanized metatheory for the masses: The POPLmark challenge’,
- (2007). Mechanized metatheory model-checking,
- (2004). Obfuscation of Abstract Data Types, PhD thesis,
- (2005). Point-free Program Transformation’,
- (2005). Program Refactoring in the Presence of Preprocessor Directives,
- (1991). Program Restructuring as an Aid to Software Maintenance, PhD thesis,
- (2000). Proof General: A generic tool for proof development’, Tools and Algorithms for the Construction and Analysis of Systems (TACAS)
- (2003). Proofs, Programs and Executable Specifications in Higher Order Logic,
- (1993). Pure type systems formalized, in
- (2006). Refactoring Haskell Programs,
- (1992). Refactoring Object-Oriented Frameworks, PhD thesis,
- (2005). Refactoring Towards a Layered Architecture’,
- (2007). Refactoring via Program Slicing and Sliding, PhD thesis,
- (2004). Refactorings as Formal Reﬁnements,
- (1992). Semantics of Programming Languages: Structures and Techniques,
- (2002). Software restructuring: implementing a code abstraction transformation’,
- (2004). Static composition of refactorings’,
- (2007). Testing Erlang Refactorings with QuickCheck,
- (1997). The Deﬁnition of Standard ML,
- (2001). The early history of automated deduction’,
- (1981). The Lambda Calculus, its Syntax and Semantics, NorthHolland.
- (1990). The lazy lambda calculus’,
- (2007). Towards a mechanized metatheory of standard ML’,
- (2004). Transformation in HaRe,
- (2007). Using CafeOBJ to Mechanise Refactoring Proofs and Application’,
- (2003). Verifying CPS transformations in Isabelle/HOL,

To submit an update or takedown request for this paper, please submit an Update/Correction/Removal Request.