skip to main content
article
Free Access

Verifying programs which operate on data structures

Published:01 April 1975Publication History
Skip Abstract Section

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.

References

  1. 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 ScholarGoogle Scholar
  2. 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 ScholarGoogle Scholar
  3. 3 Dijkstra, E. W., "Notes on Structured Programming," Structured Programming, Academic Press, New York, 1972.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 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 ScholarGoogle Scholar
  5. 5 Foley, M., and C. A. R. Hoare, "Proof of a recursive program: Quicksort," Computer Journal 14, 4, 391-5 (November 1971).]]Google ScholarGoogle ScholarCross RefCross Ref
  6. 6 Hoare, C. A. R., "Notes on Data Structuring," Structured Programming, Academic Press, New York, 1972.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7 Hoare, C. A. R., "Proof of Correctness of Data Representations," Acta Informatica 1, 271-281 (1972).]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8 King, J. C., A Program Verifier, Computer Science Department, Carnegie-Mellon University, Pittsburgh, September 1969]]Google ScholarGoogle Scholar
  9. 9 Knuth, D. E., The Art of Computer Programming, Vol. I, Addison-Wesley, Reading, Mass., 1968.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. 11 Morris, J. H., Verification-Oriented Language Design, Computer Science Technical Report No. 7, University of California, Berkeley, December]]Google ScholarGoogle Scholar
  12. 12 Poupon, J., and B. Wegbreit, #Covering Functions, Center for Research in Computing Technology, Harvard University, Cambridge, September 1972.]]Google ScholarGoogle Scholar
  13. 13 Wirth, N., The Programming Language Pascal (Revised Report), E. T. H., Zurich, November 1972.]]Google ScholarGoogle Scholar

Index Terms

  1. Verifying programs which operate on data structures

                      Recommendations

                      Comments

                      Login options

                      Check if you have access through your login credentials or your institution to get full access on this article.

                      Sign in

                      Full Access

                      PDF Format

                      View or Download as a PDF file.

                      PDF

                      eReader

                      View online with eReader.

                      eReader