Skip to main content
Book cover

Workshop on Logic of Programs

Logic of Programs 1981: Logics of Programs pp 94–112Cite as

Correctness of programs with function procedures

extended abstract

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 131))

Abstract

The correctness of programs with programmer-declared functions is investigated. We use the framework of the typed lambda calculus with explicit declaration of (possibly recursive) functions. Its expressions occur in the statements of a simple language with assignment, composition and conditionals. A denotational and an operational semantics for this language are provided, and their equivalence is proved. Next, a proof system for partial correctness is presented, and its soundness is shown. Completeness is then established for the case that only call-by-value is allowed. Allowing call-by-name as well, completeness is shown only for the case that the type structure is restricted, and at the cost of extending the language of the proof system. The completeness problem for the general case remains open. In the technical considerations, an important role is played by a reduction system which essentially allows us to reduce expression evaluation to systematic execution of auxiliary assignments. Termination of this reduction system is shown using Tait's computability technique. Complete proofs will appear in the full version of the paper.

This is a preview of subscription content, log in via an institution.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. APT, K.R., Ten years of Hoare's logic, a survey, in Proc. 5th Scandinavian Logic Symposium (F.V. Jensen, B.H. Mayoh, K.K. Møller, eds.), pp 1–44, Aalborg University Press, 1979 (revised version to appear in ACM TOPLAS).

    Google Scholar 

  2. ASHCROFT, E.A., M. CLINT & C.A.R. HOARE, Remarks on program proving: jumps and functions, Acta Informatica, 6, p. 317, 1976.

    Article  Google Scholar 

  3. DE BAKKER, J.W., Least fixed points revisited, Theoretical Computer Science, 2, pp. 155–181, 1976.

    Article  Google Scholar 

  4. DE BAKKER, J.W., Mathematical Theory of Program Correctness, Prentice-Hall International, 1980.

    Google Scholar 

  5. BARENDREGT, H.P., The Lambda Calculus, its Syntax and Semantics, North-Holland, 1981.

    Google Scholar 

  6. DE BRUIN, A., On the existence of Cook semantics, Report IW 163/81, Mathematisch Centrum, 1981.

    Google Scholar 

  7. CLARKE, E.M., Programming language constructs for which it is impossible to obtain good Hoare-like axiom systems, J. ACM, 26, pp. 129–147, 1979.

    Article  Google Scholar 

  8. CLINT, M. & C.A.R. HOARE, Program proving: jumps and functions, Acta Informatica, 1, pp. 214–224, 1972.

    Article  Google Scholar 

  9. COOK, S.A., Soundness and completeness of an axiom system for program verification, SIAM J. on Comp., 7, pp. 70–90, 1978.

    Article  Google Scholar 

  10. GORDON, M., R. MILNER & C. WADSWORTH, Edinburgh LCF, Lecture Notes in Computer Science 78, Springer, 1979.

    Google Scholar 

  11. GORELICK, G.A., A complete axiomatic system for proving assertions about recursive and non-recursive programs, Technical Report 75, Dept. of Comp. Science, University of Toronto, 1975.

    Google Scholar 

  12. HENNESSY, M.C.B., The semantics of call-by-value and call-by-name in a nondeterministic environment, SIAM J. on Comp., 9, pp. 67–84, 1980.

    Article  Google Scholar 

  13. HENNESSY, M.C.B. & E.A. ASHCROFT, A mathematical semantics for a nondeterministic typed lambda calculus, Theoretical Comp. Science, 11, pp. 227–246, 1980.

    Article  Google Scholar 

  14. HOARE, C.A.R., An axiomatic basis for computer programming, CACM, 12, pp. 576–580, 1969.

    Google Scholar 

  15. JONES, N.D. & S.S. MUCHNIK, Even simple programs are hard to analyze, JACM, 24, pp. 338–350, 1977.

    Article  Google Scholar 

  16. KLOP, J.W., Combinatory Reduction Systems, Mathematical Centre Tracts 127, Mathematisch Centrum, 1980.

    Google Scholar 

  17. LANGMAACK, H. & E.R. OLDEROG. Present-day Hoare-like systems for programming languages with procedures: power, limits, and most likely extensions, in Proc. 7th Coll. Automata, Languages and Programming (J.W. de Bakker & J. van Leeuwen, eds), Lecture Notes in Computer Scence 85, Springer, 1980.

    Google Scholar 

  18. LIPTON, R.J., A necessary and sufficient condition for the existence of Hoare logics, in Proc. IEEE Symposium Foundations of Computer Science, pp. 1–6, 1977.

    Google Scholar 

  19. O'DONNELL, M., A critique on the foundations of Hoare-style programming logics, Technical Report, Purdue University, 1980.

    Google Scholar 

  20. PLOTKIN, G.D., LCF considered as a programming language, Theoretical Comp. Science, 5, pp. 223–256, 1977.

    Article  Google Scholar 

  21. REYNOLDS, J.C., On the relation between direct and continuation semantics, in Proc. 2nd Coll. Automata, Languages and Programming (J. Loeckx, ed.), pp. 141–156, Lecture Notes in Computer Science 14, Springer, 1974.

    Google Scholar 

  22. TAIT, W.W., Intentional interpretation of functionals of finite type I, J. Symbolic Logic, 32, pp. 198–212, 1967.

    Google Scholar 

  23. TROELSTRA, A.S. et al., Metamathematical Investigation of Intuitionistic Arithmetic and Analysis, Lect. Notes in Mathematics 344, Springer, 1973.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Dexter Kozen

Rights and permissions

Reprints and permissions

Copyright information

© 1982 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

de Bakker, J.W., Klop, J.W., Meyer, JJ. (1982). Correctness of programs with function procedures. In: Kozen, D. (eds) Logics of Programs. Logic of Programs 1981. Lecture Notes in Computer Science, vol 131. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0025776

Download citation

  • DOI: https://doi.org/10.1007/BFb0025776

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-11212-9

  • Online ISBN: 978-3-540-39047-3

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics