Automated Software Engineering

, Volume 23, Issue 1, pp 77–104

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

  • Jeffrey L. Overbey
  • Ralph E. Johnson
  • Munawar Hafiz
Article

DOI: 10.1007/s10515-014-0176-9

Cite this article as:
Overbey, J.L., Johnson, R.E. & Hafiz, M. Autom Softw Eng (2016) 23: 77. doi:10.1007/s10515-014-0176-9
  • 216 Downloads

Abstract

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.

Keywords

Precondition checking Refactoring Restructuring Static analysis 

Copyright information

© Springer Science+Business Media New York 2014

Authors and Affiliations

  • Jeffrey L. Overbey
    • 1
  • Ralph E. Johnson
    • 2
  • Munawar Hafiz
    • 1
  1. 1.Department of Computer Science and Software EngineeringAuburn UniversityAuburnUSA
  2. 2.Department of Computer ScienceUniversity of Illinois at Urbana-ChampaignChampaignUSA

Personalised recommendations