TY - GEN
T1 - Formal specification and verification of Java refactorings
AU - Garrido, Alejandra
AU - Meseguer, José
N1 - Copyright:
Copyright 2008 Elsevier B.V., All rights reserved.
PY - 2006
Y1 - 2006
N2 - There is an extensive literature about refactorings of object-oriented programs, and many refactoring tools for the Java programming language. However, except for a few studies, in practice it is difficult to find precise formal specifications of the preconditions and mechanisms of automated refactorings. Moreover, there is usually no formal proof that a refactoring is correct, i.e., that it preserves the behavior of the program. We present an equational semantics based approach to Java refactoring. Specifically, we use an executable Java formal semantics in the Maude language to: (i) formally specify three useful Java refactorings; and (ii) give detailed proofs of correctness for two of those refactorings, showing that they are behavior-preserving transformations. Besides the obvious benefits of providing rigorous specifications for refactoring tool builders and rigorous correctness guarantees, our approach has the additional advantage of its executability: our formal refactoring specifications can be used directly to refactor Java programs and yield a provably correct Java refactoring tool.
AB - There is an extensive literature about refactorings of object-oriented programs, and many refactoring tools for the Java programming language. However, except for a few studies, in practice it is difficult to find precise formal specifications of the preconditions and mechanisms of automated refactorings. Moreover, there is usually no formal proof that a refactoring is correct, i.e., that it preserves the behavior of the program. We present an equational semantics based approach to Java refactoring. Specifically, we use an executable Java formal semantics in the Maude language to: (i) formally specify three useful Java refactorings; and (ii) give detailed proofs of correctness for two of those refactorings, showing that they are behavior-preserving transformations. Besides the obvious benefits of providing rigorous specifications for refactoring tool builders and rigorous correctness guarantees, our approach has the additional advantage of its executability: our formal refactoring specifications can be used directly to refactor Java programs and yield a provably correct Java refactoring tool.
UR - http://www.scopus.com/inward/record.url?scp=34948815670&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=34948815670&partnerID=8YFLogxK
U2 - 10.1109/SCAM.2006.16
DO - 10.1109/SCAM.2006.16
M3 - Conference contribution
AN - SCOPUS:34948815670
SN - 0769523536
SN - 9780769523538
T3 - Proceedings - Sixth IEEE International Workshop on Source Code Analysis and Manipulation, SCAM 2006
SP - 165
EP - 174
BT - Proceedings - Sixth IEEE International Workshop on Source Code Analysis and Manipulation, SCAM 2006
T2 - 6th IEEE International Workshop on Source Code Analysis and Manipulation, SCAM 2006
Y2 - 27 September 2006 through 29 September 2006
ER -