• DocumentCode
    2879646
  • Title

    Program Repair as Sound Optimization of Broken Programs

  • Author

    Fischer, Bernd ; Saabas, Ando ; Uustalu, Tarmo

  • Author_Institution
    Sch. of Electron. & Comput. Sci., Univ. of Southampton, Southampton, UK
  • fYear
    2009
  • fDate
    29-31 July 2009
  • Firstpage
    165
  • Lastpage
    173
  • Abstract
    We present a new, semantics-based approach to mechanical program repair where the intended meaning of broken programs (i.e., programs that may abort under a given, error-admitting language semantics) can be defined by a special, error-compensating semantics. Program repair can then become a compile-time, mechanical program transformation based on a program analysis. It turns a given program into one whose evaluations under the error-admitting semantics agree with those of the given program under the error-compensating semantics. We present the analysis and transformation as a type system with a transformation component, following the type-systematic approach to program optimization from our earlier work. The type-systematic method allows for simple soundness proofs of the repairs, based on a relational interpretation of the type system, as well as mechanical transformability of program correctness proofs between the Hoare logics for the error-compensating and error-admitting semantics. We first demonstrate our approach on the repair of file-handling programs with missing or superfluous open and close statements. Our framework shows that this repair is strikingly similar to partial redundancy elimination optimization commonly used by compilers. In a second example, we demonstrate the repair of programs operating a queue that can over- and underflow, including mechanical transformation of program correctness proofs.
  • Keywords
    formal logic; optimisation; program compilers; program diagnostics; Hoare logics; broken programs; error-admitting language semantics; error-compensating semantics; file-handling programs; mechanical program repair; partial redundancy elimination optimization; program analysis; program correctness proofs; program optimization; semantics-based approach; sound optimization; type-systematic method; Computer errors; Computer science; Cybernetics; Error correction; Logic; Optimizing compilers; Programming profession; Redundancy; Runtime; Software engineering; mechanical transformation of program correctness proofs; program logics; program optimization soundness; program repair; similarity relations; type systems;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Theoretical Aspects of Software Engineering, 2009. TASE 2009. Third IEEE International Symposium on
  • Conference_Location
    Tianjin
  • Print_ISBN
    978-0-7695-3757-3
  • Type

    conf

  • DOI
    10.1109/TASE.2009.61
  • Filename
    5198499