Formal Methods to Aid the Evolution of Software

There is a vast collection of operational software systems which are vitally important to their users, yet are becoming increasingly difficult to maintain, enhance, and keep up to date with rapidly changing requirements. For many of these so-called legacy systems, the option of throwing the system away and rewriting it from scratch is not economically viable. Methods are therefore urgently required which enable these systems to evolve in a controlled manner. The approach described in this paper uses formal proven program transformations, which preserve or refine the semantics of a program while changing its form. These transformations are applied to restructure and simplify the legacy systems and to extract higher-level representations. By using an appropriate sequence of transformations, the extracted representation is guaranteed to be equivalent to the code. The method is based on a formal wide spectrum language, called WSL, with an accompanying formal method. Over the last ten years we have developed a large catalog of proven transformations, together with mechanically verifiable applicability conditions. These have been applied to many software development, reverse engineering, and maintenance problems. In this paper, we focus on the results of using this approach in the reverse engineering of medium scale, industrial software, written mostly in languages such as assembler and JOVIAL. Results from both benchmark algorithms and heavily modified, geriatric software are summarized. We conclude that formal methods have an important practical role in software evolution.

[1]  Martin Ward A Recursion Removal Theorem , 1992, Refine.

[2]  David Gries The Schorr-Waite Graph Marking Algorithm , 1978, Program Construction.

[3]  M. P. Ward,et al.  Program Analysis by Formal Transformation , 1996, Comput. J..

[4]  Arthur G. Duncan,et al.  Abstractions, instantiations, and proofs of marking algorithms , 1977, Artificial Intelligence and Programming Languages.

[5]  Willem P. de Roever,et al.  On Backtracking and Greatest Fixpoints , 1977, ICALP.

[6]  Frank W. Calliss Problems with automatic restructurers , 1988, SIGP.

[7]  Robert A. Kowalski,et al.  Algorithm = logic + control , 1979, CACM.

[8]  Ken Robinson,et al.  Specification statements and refinements , 1987 .

[9]  Michael Griffiths,et al.  Development of the Schorr-Waite Algorithm , 1978, Program Construction.

[10]  Martin P. Ward,et al.  A Multipurpose Backtracking Algorithm , 1994, J. Symb. Comput..

[11]  William M. Waite,et al.  An efficient machine-independent procedure for garbage collection in various list structures , 1967, CACM.

[12]  Helmut A. Partsch,et al.  Specification and transformation of programs , 1990 .

[13]  T. M. Bull An introduction to the WSL program transformer , 1990, Proceedings. Conference on Software Maintenance 1990.

[14]  Friedrich L. Bauer,et al.  Algorithmic Language and Program Development , 1982, Texts and Monographs in Computer Science.

[15]  Erwin Engeler,et al.  Languages with expressions of infinite length , 1966 .

[16]  Carroll Morgan,et al.  Programming from specifications , 1990, Prentice Hall International Series in computer science.

[17]  Martin P. Ward Abstracting a specification from code , 1993, J. Softw. Maintenance Res. Pract..

[18]  H. Partsch,et al.  The CIP Transformation System , 1984 .

[19]  Martin P. Ward Derivation of Data Intensive Algorithms by Formal Transformation: The Schnorr-Waite Graph Marking Algorithm , 1996, IEEE Trans. Software Eng..

[20]  Martin P. Ward Reverse Engineering through Formal Transformation: Knuths 'Polynomial Addition' Algorithm , 1994, Comput. J..

[21]  Martin Ward Proving program refinements and transformations , 1986 .

[22]  Friedrich L. Bauer,et al.  Formal Program Construction by Transformations-Computer-Aided, Intuition-Guided Programming , 1989, IEEE Trans. Software Eng..

[23]  Joseph M. Morris A Proof of the Schorr-Waite Algorithm , 1982 .

[24]  Keith H. Bennett,et al.  A transformation system for maintenance-turning theory into practice , 1992, Proceedings Conference on Software Maintenance 1992.

[25]  Carroll Morgan,et al.  The specification statement , 1988, TOPL.

[26]  Peter Pepper,et al.  Program Transformation and Programming Environments , 1984, NATO ASI Series.

[27]  Richard S. Bird,et al.  Lectures on Constructive Functional Programming , 1989 .

[28]  Donald E. Knuth,et al.  fundamental algorithms , 1969 .

[29]  Martin Ward,et al.  Derivation of a Sorting Algorithm , 1990 .

[30]  Jayme Luiz Szwarcfiter,et al.  A Structured Program to Generate all Topological Sorting Arrangements , 1974, Information Processing Letters.

[31]  E. J. Younger,et al.  Inverse-engineering a simple real-time program , 1994, J. Softw. Maintenance Res. Pract..

[32]  Luke Georghiou Alvey—Britain's strategic computing initiative , 1991 .

[33]  M. P. Ward,et al.  Foundations for a Practical Theory of Program Refinement and Transformation , 1994 .

[34]  Martin Ward Abstracting a Speciication from Code , 1993 .

[35]  H. Yang,et al.  The supporting environment for a reverse engineering system-the Maintainer's Assistant , 1991, Proceedings. Conference on Software Maintenance 1991.