Abstract
In order to prove the correctness of a computer program, one must be able to characterize the data in the program. Proofs by the inductive assertion method require the construction of concise, precise assertions to describe the data. This paper presents some techniques for characterizing data structures which can be used to build adequate assertions. New primitive relations are introduced for describing intra-structural relationships. These primitives form the basis for two important concepts: The invariant of a structure is a concise characterization of a structural class. A representation function is a mapping from a structure to a corresponding abstract data object; this concept provides a means for expressing relationships between a structure and other data, and among the values of a structure over time. By means of verification lemmas, these concepts can be integrated into proofs of correctness, and the proofs as well as the assertions can be dramatically simplified. An example program is presented which demonstrates the use of these concepts in constructing the assertions, and the resulting proof of correctness is outlined.
- 1 Burstall, R. M., "Some Techniques for Proving Correctness of Programs which Alter Data Structures," Machine Intelligence 7, D. Michie (ed.), American Elsevier, New York, 1972.]]Google Scholar
- 2 Burstall, R. M., and R. Topor, Mechanizing Program Correctness by Symbolic Interpretation (Work in progress), Department of Machine Intelligence and Perception, University of Edinburgh, November 1972.]]Google Scholar
- 3 Dijkstra, E. W., "Notes on Structured Programming," Structured Programming, Academic Press, New York, 1972.]] Google ScholarDigital Library
- 4 Floyd, R. W., "Assigning meanings to programs," Proceedings of a Symposium in Applied Mathematics, American Mathematical Society, J. T. Schwartz (ed.), Providence, 1967.]]Google Scholar
- 5 Foley, M., and C. A. R. Hoare, "Proof of a recursive program: Quicksort," Computer Journal 14, 4, 391-5 (November 1971).]]Google ScholarCross Ref
- 6 Hoare, C. A. R., "Notes on Data Structuring," Structured Programming, Academic Press, New York, 1972.]] Google ScholarDigital Library
- 7 Hoare, C. A. R., "Proof of Correctness of Data Representations," Acta Informatica 1, 271-281 (1972).]]Google ScholarDigital Library
- 8 King, J. C., A Program Verifier, Computer Science Department, Carnegie-Mellon University, Pittsburgh, September 1969]]Google Scholar
- 9 Knuth, D. E., The Art of Computer Programming, Vol. I, Addison-Wesley, Reading, Mass., 1968.]] Google ScholarDigital Library
- 10 Laventhal, M. S., Verification of Programs Operating on Structured Data, Technical Report MAC-TR-124, Project MAC, M.I.T., Cambridge, March 1974.]] Google ScholarDigital Library
- 11 Morris, J. H., Verification-Oriented Language Design, Computer Science Technical Report No. 7, University of California, Berkeley, December]]Google Scholar
- 12 Poupon, J., and B. Wegbreit, #Covering Functions, Center for Research in Computing Technology, Harvard University, Cambridge, September 1972.]]Google Scholar
- 13 Wirth, N., The Programming Language Pascal (Revised Report), E. T. H., Zurich, November 1972.]]Google Scholar
Index Terms
- Verifying programs which operate on data structures
Recommendations
Verifying programs which operate on data structures
Proceedings of the international conference on Reliable softwareIn order to prove the correctness of a computer program, one must be able to characterize the data in the program. Proofs by the inductive assertion method require the construction of concise, precise assertions to describe the data. This paper presents ...
Verifying Definite Iteration Over Data Structures
Methods are presented for verifying loops which iterate over elements of data structures. This verification is done in the functional style developed by Mills and others, in which code is verified against the function that the code is intended to ...
Abstraction and verification in Alphard: Defining and specifying iteration and generators
Proceedings of an ACM conference on Language design for reliable softwareThe Alphard form provides the programmer with a great deal of control over the implementation of abstract data types. In this paper we extend the abstraction techniques from simple data representation and function definition to the iteration statement, ...
Comments