The complexity of verifying functional programs

  • Hardi Hungar
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 665)


The set of finite interpretations in which a formula is valid is called the spectrum of the formula. For some program logics, the classes of spectra form complete subclasses of well known complexity classes. For various imperative and functional programming languages we know the complexity classes corresponding to the classes of spectra of partial correctness formulae. This means that for those formulae we know how hard it is to decide the sets of finite models.

For some imperative languages it has already been shown that constructing formal proofs for valid formulae is of the same order of complexity. In this paper we prove the same result, i.e. that proofs can be constructed efficiently, for functional languages where recursive functions of arbitrary finite type are allowed.

Since denotational semantics translates imperative programs into functional terms, the proof system for functional programs gives one for imperative programs as well. Choosing the right denotational semantics, we can show the effiency of the resulting verification method for Clarke's language L4.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Clarke, E. M., Programming languages for which it is impossible to obtain good Hoare axiom systems, JACM 26 (1979) 129–147.Google Scholar
  2. 2.
    Cook, S. A., Soundness and completeness of an axiom system for program verification, SIAM J. Comp. 7 (1978) 70–90.Google Scholar
  3. 3.
    Clarke, E. M., German, S. M. and Halpern, J. Y., Effective axiomatizations of Hoare logics, JACM 30 (1983) 612–636.Google Scholar
  4. 4.
    German, S. M., Clarke, E. M. and Halpern, J. Y., Reasoning about procedures as parameters in the language L4, Inf. and Comp. 83 (1989) 265–359. (Earlier version: 1st LiCS (1986) 11–25)Google Scholar
  5. 5.
    Goerdt, A., A Hoare calculus for functions defined by recursion on higher types, In: Proc. Logics of Programs 1985, LNCS 193, 106–117.Google Scholar
  6. 6.
    Goerdt, A., Hoare calculi for higher type control structures and their completeness in the sense of Cook, MFCS 88, LNCS 324 (1988) 329–338.Google Scholar
  7. 7.
    Goerdt, A. Hoare logic for lambda-terms as basis of Hoare logic for imperative languages, Proc. 2nd LiCS (1987) 293–299.Google Scholar
  8. 8.
    Goerdt, A. Characterizing complexity classes by general recursive definitions in higher types, in: E. Börger and H. Kleine-Büning, CSL '88, Proceedings, LNCS 385 (1988).Google Scholar
  9. 9.
    Grabowski, M. und Hungar, H. On the existence of effective Hoare logics, Proc. 3rd LiCS (1988) 428–435.Google Scholar
  10. 10.
    Harel, D. and Peleg, D., On static logics, dynamic logics, and complexity classes, Inf. and Contr. 60 (1984) 86–102.Google Scholar
  11. 11.
    Hungar, H., Complexity of proving program correctness, Proc. Theoretical Aspects of Computer Software 1991, LNCS 526, 459–474.Google Scholar
  12. 12.
    Jones, N. D. and Muchnik, S. S., Even simple programs are hard to analyze, JACM 24 (1977) 338–350.Google Scholar
  13. 13.
    Jones, N. D. and Muchnik, S. S., The complexity of finite memory programs with recursion, JACM 25 (1978) 312–321.Google Scholar
  14. 14.
    Kfoury, A. J., Tiuryn, J. and Urzyczyn, P. The hierarchie of finitely typed functions, 2nd LiCS (1987) 225–235.Google Scholar
  15. 15.
    Langmaack, H., On correct procedure parameter transmission in higher programming languages, Acta Inf. 2 (1973) 110–142.Google Scholar
  16. 16.
    Olderog, E.-R. A characterization of Hoare's logic for programs with PASCAL-like procedures, 15th SToC (1983) 320–329.Google Scholar
  17. 17.
    Plotkin, G. D., LCF considered as a programming language, TCS 5 (1977) 223–255.Google Scholar
  18. 18.
    Tiuryn, J. and Urzyczyn, P., Some relationships between logics of programs and complexity theory, TCS 60 (1988) 83–108. (Earlier version: 24th FoCS (1983) 180–184)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1993

Authors and Affiliations

  • Hardi Hungar
    • 1
  1. 1.Computer Science DepartmentUniversity OldenburgOldenburgGermany

Personalised recommendations