• DocumentCode
    2872799
  • Title

    Formal Specification and Verification of Java Refactorings

  • Author

    Garrido, Alejandra ; Meseguer, José

  • Author_Institution
    University of Illinois at Urbana-Champaign, USA
  • fYear
    2006
  • fDate
    Sept. 2006
  • Firstpage
    165
  • Lastpage
    174
  • Abstract
    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.
  • Keywords
    Computer languages; Conferences; Documentation; Equations; Formal specifications; Java; Libraries; Logic;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Source Code Analysis and Manipulation, 2006. SCAM '06. Sixth IEEE International Workshop on
  • Conference_Location
    Philadelphia, PA, USA
  • Print_ISBN
    0-7695-2353-6
  • Type

    conf

  • DOI
    10.1109/SCAM.2006.16
  • Filename
    4026866