Skip to main content
Log in

Algebraic Correctness Proofs for Compiling Recursive Function Definitions with Strictness Information

  • Original Article
  • Published:
Acta Informatica Aims and scope Submit manuscript

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.

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

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Bakker J. (1976). Least fixed points revisited. Theoret. Comput. Sci. 2:155–181

    Article  MATH  MathSciNet  Google Scholar 

  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)

  3. Cadiou, J.: Recursive definitions of partial functions and their computation. Ph.D. Thesis, Stanford University (1972)

  4. Chitil O. (1997). The ς–semantics: a comprehensive semantics for functional programs. Fundam Inform 31:253–294

    MATH  MathSciNet  Google Scholar 

  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)

  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).http://www.elsevier.nl/locate/entcs/volume15.html

  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)

  8. Goguen J., Thatcher J., Wagner E., Wright J. (1977). Initial algebra semantics and continuous algebras. J. ACM 24(1):68–95

    Article  MATH  MathSciNet  Google Scholar 

  9. Greibach S. (1975). Theory of Program Structures. No. 36 in Lecture Notes in Computer Science. Springer, Berlin Heidelberg New York

    Google Scholar 

  10. Henderson P. (1980). Functional Programming. International Series in Computer Science. Prentice-Hall, Englewood Cliffs

    Google Scholar 

  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 http://sunsite.informatik.rwth-aachen.de/Publications/AIB/2004/

  12. Kleene, S.: Introduction to Metamathematics. North-Holland, (1952)

  13. Landin P. (1964). The mechanical evaluation of expressions. Comput. J. 6(4):308–320

    MATH  Google Scholar 

  14. Manna Z., Vuillemin J. (1972). Fixpoint approach to the theory of computation. Commun. ACM 15(7):528–536

    Article  MATH  MathSciNet  Google Scholar 

  15. McCarthy J. (1960). Recursive functions of symbolic expressions and their computation by machine, part I. Commun ACM 3:184–195

    Article  MATH  Google Scholar 

  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)

  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)

  18. Noll, T.: Klassen applikativer Programmschemata und ihre Berechnungsstärke in German. Ph.D. Thesis, RWTH Aachen University (1995).

  19. Samelson K., Bauer F. (1960). Sequential formula translation. Comm. ACM 3(2):76–83

    Article  MathSciNet  Google Scholar 

  20. Schlör, R.: Korrektheit der Übersetzung rekursiver Funktionsdefinitionen in Stackcode in German. Master’s Thesis, RWTH Aachen University (1987).

  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)

  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)

  23. Tarski A. (1955). A lattice-theoretical fixpoint theorem and its applications. Pac. J. Math. 5:285–309

    MATH  MathSciNet  Google Scholar 

  24. Thompson S. (1999). Haskell, 2nd edn. Addison-Wesley, Reading

    Google Scholar 

  25. Wadler P. (1996). Lazy versus strict. ACM Comput. Surv. 28(2):318–320

    Article  Google Scholar 

  26. Winskel G. (1993). The Formal Semantics of Programming Languages. MIT Press, Cambridge

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Klaus Indermark.

Rights and permissions

Reprints 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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00236-006-0013-0

Keywords

Navigation