The Elusive Software Refinery: a case study in program development

In this study we develop a three-valued digital logic simulator using a combination of the Z specification language and Morgan’s refinement calculus. This development is illuminating in several ways. First, the simulator—which has been implemented in Occam and used as the basis of a distributed simulator—is a reasonably complex, self-contained program whose formal development reflects the application of refinement to a “real-world” programming task. Second, in the course of our development we demonstrate the benefits of using a subset of the Z notation within the refinement calculus to provide compound types and functions to help structure the specification. This approach allows a natural style of program development to be made mathematically rigorous. Third, we demonstrate the ability to prove useful properties about programs that have been developed using refinement techniques. In our case, we calculate an upper bound on the size of the simulator’s event queue and prove our calculation correct. In total, our development indicates that current specification and refinement techniques can provide a very powerful tool for the practising software engineer.

[1]  Kenneth R. Wood Distributing gate-level digital timing simulation over arrays of transputers , 1991, Concurr. Pract. Exp..

[2]  Edsger W. Dijkstra,et al.  A Discipline of Programming , 1976 .

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

[4]  J. Michael Spivey,et al.  The Z notation - a reference manual , 1992, Prentice Hall International Series in Computer Science.

[5]  Joseph M. Morris,et al.  A Theoretical Basis for Stepwise Refinement and the Programming Calculus , 1987, Sci. Comput. Program..

[6]  Gordon Russell,et al.  Advanced simulation and test methodologies for VLSI design , 1989 .

[7]  C. A. R. Hoare,et al.  An axiomatic basis for computer programming , 1969, CACM.

[8]  David Gries,et al.  The Science of Programming , 1981, Text and Monographs in Computer Science.

[9]  Carroll Morgan,et al.  The Refinement Calculus , 1994, NATO ASI PDC.

[10]  Melvin A. Breuer,et al.  Diagnosis and Reliable Design of Digital Systems , 1977 .