Skip to main content

Polynomial recursion analysis in pascal like programs

  • Conference paper
  • First Online:
Theoretical Aspects of Computer Software (TACS 1991)

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

Included in the following conference series:

Abstract

Besides being of theoretical interest the knowledge about a procedure's calling behavior is valuable for an optimizing compiler. It is well known, however, that such properties like recursivity or reachability of procedures are unfortunately undecidable for programs in ALGOL-like languages and are still worse than P-Space Complete in the ISO-Pascal case.

We extend this language hierarchy (with respect to parameter restrictions) at the lower end to Wirth's Pascal and show that there the recursivity problem for procedures is decidable within polynomial time. In order to establish this (rather unexpected) result we

  1. 1.

    reduce recursivity of a procedure to a reachability problem — with both properties being defined on an infinite tree representation of the program;

  2. 2.

    show the equivalence between reachability in such an infinite tree on the one hand and reachability in the finite graph representation on the other hand;

  3. 3.

    solve then the reachability problem in this graph in O(ns) of a program with n procedures as vertices and s call statements as edges.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

8 References

  1. D. Armbruster: A Polynomial Determination of the Most-Recent Property. Theoretical Computer Science 56, 3–15, 1988.

    Google Scholar 

  2. D. Armbruster: Entscheidbarkeit und Bestimmung der Rekursivität von Prozeduren. Dissertation, University of Stuttgart, 1985.

    Google Scholar 

  3. ISO/TC79/SC5N: Specification for Computer Language Pascal. Third draft proposal, 1981-11-04.

    Google Scholar 

  4. H. Langmaack: On Correct Procedure Parameter Transmission in Higher Programming Languages. Acta Informatica 2, 110–142, 1973.

    Google Scholar 

  5. A. R. Meyer: Complexity of Program Flow Analysis for Strictness..., private comminication, August 1985.

    Google Scholar 

  6. D. A. Patterson: Reduced Instruction Set Computers. Comm. of the ACM 28, 1, 8–21, 1985.

    Google Scholar 

  7. K. Walter: Recursion Analysis for Compiler Optimization. Comm. of the ACM 19, 9, 514–516, Sept. 1976.

    Google Scholar 

  8. K. Winklmann: On the Complexity of Some Problems Concerning the Use of Procedures I. Acta Informatica 18, 299–318, 1982.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Takayasu Ito Albert R. Meyer

Rights and permissions

Reprints and permissions

Copyright information

© 1991 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Armbruster, D. (1991). Polynomial recursion analysis in pascal like programs. In: Ito, T., Meyer, A.R. (eds) Theoretical Aspects of Computer Software. TACS 1991. Lecture Notes in Computer Science, vol 526. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-54415-1_58

Download citation

  • DOI: https://doi.org/10.1007/3-540-54415-1_58

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

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

  • Online ISBN: 978-3-540-47617-7

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics