The application of correctness preserving transformations to software maintenance

The size and complexity of hardware and software systems continues to grow, making the introduction of subtle errors a more likely possibility. A major goal of software engineering is to enable developers to construct systems that operate reliably despite increased size and complexity. One approach to achieving this goal is through formal methods: mathematically based languages, techniques and tools for specifying and verifying complex software systems. The authors apply a theoretical tool (that is supported by many formal methods), the correctness preserving transformation (CPT), to a real software engineering problem: the need for optimization during the maintenance of code. We present four program transformations and a model that forms a framework for proof of correctness. We prove the transformations correct and then apply them to a cryptography application implemented in C++. Our experience shows that CPTs can facilitate generation of more efficient code while guaranteeing the preservation of original behavior.

[1]  Ruth Breu,et al.  Algebraic Specification Techniques in Object Oriented Programming Environments , 1991, Lecture Notes in Computer Science.

[2]  Niklaus Wirth,et al.  Program development by stepwise refinement , 1971, CACM.

[3]  Åke Wikström,et al.  Functional programming using standard ML , 1987, Prentice Hall International Series in Computer Science.

[4]  T. Elgamal A public key cryptosystem and a signature scheme based on discrete logarithms , 1984, CRYPTO 1984.

[5]  Helmuth Partsch,et al.  Specification and Transformation of Programs - A Formal Approach to Software Development , 1990, Texts and Monographs in Computer Science.

[6]  Anthony Hall,et al.  Seven myths of formal methods , 1990, IEEE Software.

[7]  Jonathan P. Bowen,et al.  Seven More Myths of Formal Methods , 1994, FME.

[8]  Edmund M. Clarke,et al.  Formal Methods: State of the Art and Future Directions Working Group Members , 1996 .

[9]  A. Church The calculi of lambda-conversion , 1941 .

[10]  Naima Brown Correctness-Preserving Transformations for the Design of Parallel Programs , 1994, ECOOP Workshop.

[11]  WegnerPeter,et al.  On understanding types, data abstraction, and polymorphism , 1985 .

[12]  Taher El Gamal A public key cryptosystem and a signature scheme based on discrete logarithms , 1984, IEEE Trans. Inf. Theory.

[13]  Robert Laurence Baber The spine of software - designing provably correct software: theory and practice: or a mathematical introduction to the semantics of computer programs , 1986 .

[14]  J. Paul Gibson,et al.  Formal object oriented development of software systems using LOTOS , 1993 .

[15]  Scott Danforth,et al.  Type theories and object-oriented programmimg , 1988, CSUR.

[16]  Niklaus Wirth,et al.  Program development by step-wise refinement , 1971 .

[17]  Mary Jean Harrold,et al.  The effects of optimizing transformations on data-flow adequate test sets , 1991, TAV4.

[18]  Dominique Méry,et al.  Feature Interactions: A Mixed Semantic Model Approach , 1997, IWFM.

[19]  V. Stavridou,et al.  Abstraction and specification in program development , 1988 .