Acta Informatica

, Volume 43, Issue 1, pp 1–43

Algebraic Correctness Proofs for Compiling Recursive Function Definitions with Strictness Information

Original Article


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.


Functional languages Evaluation strategies Compiler correctness Formal semantics Stack implementation 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Bakker J. (1976). Least fixed points revisited. Theoret. Comput. Sci. 2:155–181MATHCrossRefMathSciNetGoogle Scholar
  2. 2.
    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)Google Scholar
  3. 3.
    Cadiou, J.: Recursive definitions of partial functions and their computation. Ph.D. Thesis, Stanford University (1972)Google Scholar
  4. 4.
    Chitil O. (1997). The ς–semantics: a comprehensive semantics for functional programs. Fundam Inform 31:253–294MATHMathSciNetGoogle Scholar
  5. 5.
    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)Google Scholar
  6. 6.
    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). Scholar
  7. 7.
    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)Google Scholar
  8. 8.
    Goguen J., Thatcher J., Wagner E., Wright J. (1977). Initial algebra semantics and continuous algebras. J. ACM 24(1):68–95MATHCrossRefMathSciNetGoogle Scholar
  9. 9.
    Greibach S. (1975). Theory of Program Structures. No. 36 in Lecture Notes in Computer Science. Springer, Berlin Heidelberg New YorkGoogle Scholar
  10. 10.
    Henderson P. (1980). Functional Programming. International Series in Computer Science. Prentice-Hall, Englewood CliffsGoogle Scholar
  11. 11.
    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 Scholar
  12. 12.
    Kleene, S.: Introduction to Metamathematics. North-Holland, (1952)Google Scholar
  13. 13.
    Landin P. (1964). The mechanical evaluation of expressions. Comput. J. 6(4):308–320MATHGoogle Scholar
  14. 14.
    Manna Z., Vuillemin J. (1972). Fixpoint approach to the theory of computation. Commun. ACM 15(7):528–536MATHCrossRefMathSciNetGoogle Scholar
  15. 15.
    McCarthy J. (1960). Recursive functions of symbolic expressions and their computation by machine, part I. Commun ACM 3:184–195MATHCrossRefGoogle Scholar
  16. 16.
    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)Google Scholar
  17. 17.
    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)Google Scholar
  18. 18.
    Noll, T.: Klassen applikativer Programmschemata und ihre Berechnungsstärke in German. Ph.D. Thesis, RWTH Aachen University (1995).Google Scholar
  19. 19.
    Samelson K., Bauer F. (1960). Sequential formula translation. Comm. ACM 3(2):76–83CrossRefMathSciNetGoogle Scholar
  20. 20.
    Schlör, R.: Korrektheit der Übersetzung rekursiver Funktionsdefinitionen in Stackcode in German. Master’s Thesis, RWTH Aachen University (1987).Google Scholar
  21. 21.
    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)Google Scholar
  22. 22.
    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)Google Scholar
  23. 23.
    Tarski A. (1955). A lattice-theoretical fixpoint theorem and its applications. Pac. J. Math. 5:285–309MATHMathSciNetGoogle Scholar
  24. 24.
    Thompson S. (1999). Haskell, 2nd edn. Addison-Wesley, ReadingGoogle Scholar
  25. 25.
    Wadler P. (1996). Lazy versus strict. ACM Comput. Surv. 28(2):318–320CrossRefGoogle Scholar
  26. 26.
    Winskel G. (1993). The Formal Semantics of Programming Languages. MIT Press, CambridgeMATHGoogle Scholar

Copyright information

© Springer-Verlag 2006

Authors and Affiliations

  1. 1.Lehrstuhl für Informatik 2RWTH Aachen UniversityAachenGermany

Personalised recommendations