The Use of Proof in the Location of Programming Errors

Overview

The use of mathematical proof to show that a computer program meets its specification has a long history in Computer Science (e.g. [Naur 66, Morris and Jones 84]). Considerable time and effort has been invested by academics in creating computer-based tools to support the process of proving programs correct (e.g. [Paulson 94, Gordon and Melham 93]). However the technique and tools are only used in very specialised situations in industry where instead programmers generally rely on testing and responding to bug reports from users to assess the extent to which a program meets its specification. This has resulted in widespread problems with the reliability of computer systems. There are several reasons why there is such poor uptake of the use of proof in industry. One reason is that the final proof will tell you if the program is correct, but failing to find a proof does not apparently help in locating errors. Many cases have been reported where the process of attempting a proof by hand has highlighted an error, for instance Paulson's discovery of new attacks against security protocols [Paulson 98]. Anecdotal evidence suggests that errors are located by examining and reflecting on the process of the failed proof attempt. Another reason for the poor uptake is that such proofs can be very difficult and require experts to produce - this has led to a great deal of research into automating the proof process using computers (e.g. [Bundy 91]). Sadly, a downside of the automation process is that when a proof is not found virtually no information is available which can be used even as a starting point for locating errors - the program generally simply reporting that no proof was found.

This leads me to believe that we need a better understanding of the connection between bugs in programs and the failure of their correctness proofs. This would allow us to build the process of reflecting upon the failed proof in order to find an error into our automated proof tools making them more attractive to actual programmers.

My work focuses on functional programs produced by novice programmers. Functional programs are good subjects for the application of proof techniques and so provide a firm foundation for testing my hypothesis about the relation between programmer errors and proof failure. It is also relatively easy to obtain a large corpus of novice programs many of which contain errors.

People

Funding

Publications

Code and Theories

Lambda-Clam Theories used for the work described in the IJCAR 2004 Paper

Links

Bibliography

Bundy, 91
A. Bundy, A Science of Reasoning, in J.-L. Lassez and G. Plotkin (eds), Computational Logic: Essays in Honor of Alan Robinson, pp. 178-198, MIT Press, 1991.
Gordon and Melham, 93
M. J. C. Gordon and T. F. Melham. Introduction to HOL: A theorem proving environment for higher order logic. Cambridge University Press, 1993.
Morris and Jones, 84
F. L. Morris and C. B. Jones. An Early Program Proof by Alan Turing. Annals of the History of Computing, 6:139-143, 1984.
Naur, 66
P. Naur. Proof of algorithms by general snapshots. BIT, 6:310-316, 1966. Mathematical Proofs
Paulson, 94
L. C. Paulson. Isabelle: a Generic Theorem Prover. Springer-Verlag Berlin and Heidelberg GmbH & Co. 1994.
Paulson, 98
L. C. Paulson. The Inductive Approach to Verifying Cryptographic Protocols, Journal of Computer Security, 6:85-128, 1998.