Abstract
Adding appropriate strictness information to recursive function definitions we achieve a uniform treatment of lazy and eager evaluation strategies. By restriction to first-order functions over basic types we develop a pure stack implementation that avoids a heap even for lazy arguments. We present algebraic definitions of denotational, operational, and stack-machine semantics and prove their equivalence by means of structural induction.
Similar content being viewed by others
References
Bakker J. (1976). Least fixed points revisited. Theoret. Comput. Sci. 2:155–181
Brus, T., van Eekelen, M., van Leer, M., Plasmeijer, R.: Clean: a language for functional graph rewriting. In: Proceedings of the ACM Symposium on Functional Programming Languages and Computer Architecture (FPCA ’87), Lecture Notes in Computer Science, vol. 274, pp. 364–384. Springer, Berlin Heidelberg New York (1987)
Cadiou, J.: Recursive definitions of partial functions and their computation. Ph.D. Thesis, Stanford University (1972)
Chitil O. (1997). The ς–semantics: a comprehensive semantics for functional programs. Fundam Inform 31:253–294
Clavel, M., Durán, F., Eker, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Talcott, C.: The Maude 2.0 system. In: Proceedings of the Rewriting Techniques and Applications (RTA ’03), Lecture Notes in Computer Science, vol. 2706, pp. 258–263. Springer, Berlin Heidelberg New York (2003)
Diaconescu, R., Futatsugi, K., Ishisone, M., Sawada, T., Nakagawa, A.: An overview of CafeOBJ. In: Proceedings of the Second International Workshop on Rewriting Logic and its Applications (WRLA ’98), Electronic Notes in Theoretical Computer Science, vol. 15, pp. 75–88. Elsevier (1998).http://www.elsevier.nl/locate/entcs/volume15.html
Goguen, J., Kirchner, C., Kirchner, H., Mégrelis, A., Meseguer, J.: An introduction to OBJ3. In: Proceedings of the Workshop on Conditional Term Rewriting Systems, Lecture Notes in Computer Science, vol. 308, pp. 258–263. Springer, Berlin Heidelberg New York (1988)
Goguen J., Thatcher J., Wagner E., Wright J. (1977). Initial algebra semantics and continuous algebras. J. ACM 24(1):68–95
Greibach S. (1975). Theory of Program Structures. No. 36 in Lecture Notes in Computer Science. Springer, Berlin Heidelberg New York
Henderson P. (1980). Functional Programming. International Series in Computer Science. Prentice-Hall, Englewood Cliffs
Indermark, K., Noll, T.: Algebraic Correctness Proofs for Compiling Recursive Function Definitions with Strictness Information. No. 2004–08 in Aachener Informatik–Bericht. RWTH Aachen University (2004). Available online at http://sunsite.informatik.rwth-aachen.de/Publications/AIB/2004/
Kleene, S.: Introduction to Metamathematics. North-Holland, (1952)
Landin P. (1964). The mechanical evaluation of expressions. Comput. J. 6(4):308–320
Manna Z., Vuillemin J. (1972). Fixpoint approach to the theory of computation. Commun. ACM 15(7):528–536
McCarthy J. (1960). Recursive functions of symbolic expressions and their computation by machine, part I. Commun ACM 3:184–195
McCarthy, J., Painter, J.: Correctness of a compiler for arithmetic expressions. In: Proceedings Symposium in Applied Mathematics, Mathematical Aspects of Computer Science 19, 33–41 (1967)
Noll, T.: On the first-order equivalence of call-by-name and call-by-value. In: Proceedings of the Colloquium on Trees in Algebra and Programming (CAAP ’94), no. 787 in Lecture Notes in Computer Science, pp. 246–260. Springer, Berlin Heidelberg New York (1994)
Noll, T.: Klassen applikativer Programmschemata und ihre Berechnungsstärke in German. Ph.D. Thesis, RWTH Aachen University (1995).
Samelson K., Bauer F. (1960). Sequential formula translation. Comm. ACM 3(2):76–83
Schlör, R.: Korrektheit der Übersetzung rekursiver Funktionsdefinitionen in Stackcode in German. Master’s Thesis, RWTH Aachen University (1987).
Scott, D.: Outline of a mathematical theory of computation. In: Proceedings of the Fourth Annual Princeton Conference on Information Sciences and Systems, vol. 3, pp. 169–176 (1970)
Scott, D., Strachey, C.: Towards a mathematical semantics for computer languages. In: Proceedings of the Symposium on Computers and Automata, pp. 19–46. Wiley, New York (1972)
Tarski A. (1955). A lattice-theoretical fixpoint theorem and its applications. Pac. J. Math. 5:285–309
Thompson S. (1999). Haskell, 2nd edn. Addison-Wesley, Reading
Wadler P. (1996). Lazy versus strict. ACM Comput. Surv. 28(2):318–320
Winskel G. (1993). The Formal Semantics of Programming Languages. MIT Press, Cambridge
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Indermark, K., Noll, T. Algebraic Correctness Proofs for Compiling Recursive Function Definitions with Strictness Information. Acta Informatica 43, 1–43 (2006). https://doi.org/10.1007/s00236-006-0013-0
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00236-006-0013-0