Summary
We consider programming languages which allow procedures to be declared dynamically and to be passed as parameters. The influence of these two features on the decidability of “formal parameter correctness,” “formal recursivity,” and other properties relevant for debugging and optimization has been studied in [5–12]. In this paper we study the feasibility of such decision procedures in those cases where decidability has been proven. Thus this paper presents a complexity-theoretic refinement of some of the recursion-theoretic work from [5–12]. It is divided into two parts.
The main results in part I are:
-
1)
Detecting the presence of “formally recursive” procedures in a program is an NP-complete problem (Theorem 1).
-
2)
Deciding whether or not a program has the “formal most-recentproperty” is a P-space-complete problem (Theorem 2).
In part II [15] we will analyze the complexity of such problems in restricted classes of programs.
Similar content being viewed by others
References
Aho, A., Hopcroft, J., Ullman, J.: The Design and Analysis of Computer Algorithms. Addison- Wesley, 1974
Cook, S.A.: The complexity of theorem-proving procedures. Proc. 3rd Annual ACM Symposium on Theory of Computing. 151–158, 1971
Garey, M.R., Johnson, D.S.: Computers and Intractibility. A Guide to the Theory of NP- completeness. San Francisco, 1979
Greibach, S.A.: Theory of Program Structures: Schemes, Semantics, Verification. (Lecture Notes in Computer Science, vol. 14), 1975
Kandzia, P.: On the most-recent-property of ALGOL-like programs. Automata, Languages, and Programming — 2nd Colloquium. Loeckx, J. (ed.) (Lecture Notes in Computer Science, vol. 14), 1974
Kaufholz, G., Lippe, W.: A note on a paper of H. Langmaack about procedure parameter transmission. Bericht A74/06. Universität des Saarlandes, Saarbrücken, 1974
Langmaack, H.: On correct procedure parameter transmission in higher programming languages. Acta Informat. 2, 110–142 (1973)
Langmaack, H.: On procedures as open subroutines. I. Acta Informat. 2, 311–333 (1973)
Langmaack, H.: On procedures as open subroutines. II. Acta Informat. 3, 227–241 (1974)
Langmaack, H., Lippe, W.M., Wagner, F.: The formal termination problem for programs with finite ALGOL-60 modes. Informat. Proc. Lett. 9, 155–159 (1979)
Lippe, W.: Entscheidbarkeitsprobleme bei der Übersetzung von Programmen mit einparametrigen Prozeduren. 3. Fachtagung über Programmiersprachen. Schlender, B., Frielinghaus, W. (eds.) (Lecture Notes in Computer Science, vol. 7). Berlin-Heidelberg-New York: Springer, 1974
Lippe, W.: Über die Entscheidbarkeit der formalen Erreichbarkeit von Prozeduren bei monadischen Programmen. Doctoral Dissertation. Universität des Saarlandes, Saarbrücken, 1975
Naur, P. (ed.): Revised report on the algorithmic language ALGOL60. Numer. Math. 4, 420–453 (1963)
Savitch, W.J.: Relationships between deterministic and nondeterministic tape complexities. J. Comput. Syst. Sci. 4, 177–192 (1970)
Winklmann, K.: On the complexity of some problems concerning the use of procedures. II. Acta Informat. “To appear”
Author information
Authors and Affiliations
Additional information
Supported by the Purdue Research Foundation and by the National Science Foundation through Grants 327127A1 and MCS8004128
Rights and permissions
About this article
Cite this article
Winklmann, K. On the complexity of some problems concerning the use of procedures. I.. Acta Informatica 18, 299–318 (1982). https://doi.org/10.1007/BF00263196
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF00263196