10.1145/174675.177855acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article

Implementation of the typed call-by-value λ-calculus using a stack of regions

Authors Info & Claims
Online:01 February 1994Publication History

ABSTRACT

We present a translation scheme for the polymorphically typed call-by-value λ-calculus. All runtime values, including function closures, are put into regions. The store consists of a stack of regions. Region inference and effect inference are used to infer where regions can be allocated and de-allocated. Recursive functions are handled using a limited form of polymorphic recursion. The translation is proved correct with respect to a store semantics, which models as a region-based run-time system. Experimental results suggest that regions tend to be small, that region allocation is frequent and that overall memory demands are usually modest, even without garbage collection.

References

  1. 1.J. Tiuryn A. J. Kfoury and P. Urzyczyn. Type reconstruction in the presence of polymorphic recursion. A CM Transactions on Programming Languages and Systems, 15(2):290-311, April 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2.Andrew W. Appel. Compiling with Continuations. Cambridge University Press, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3.Henry G. Baker. Unify and conquer (garbage collection, updating, aliasing, ..) in functional languages. In Proceedings of the 1990 ACM Conference on Lisp and Functional Programming, pages 218-226, June 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4.H.G. Baker. List processing in real time on a serial computer. Communications of the A CM, 21(4):280-294, April 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5.David R. Chase, Safety considerations for storage allocation optimizations. In Proceedings of the SIGPLAN '88 Conference on Programming Language Design and Implementation, pages 1- 10, ACM Press, June 22-24 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6.J. M. Lucassen D. K. Gifford, P. Jouvelot and M.A. Sheldon. FX-87 Reference Manual. Technical Report MIT/LCS/TR-407, MIT Laboratory for Computer Science, Sept 1987.Google ScholarGoogle Scholar
  7. 7.L. Damas and R. Milner. Principal type schemes for functional programs. In Proc. 9th Annual ACM Symp. on Principles of Programming Languages, pages 207-212, Jan. 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8.Jo~lle Despeyroux. Proof of translation in natural semantics. In Proc. of the 1st Symp. on Logic in Computer Science, IEEE, Cambridge, USA, 1986.Google ScholarGoogle Scholar
  9. 9.E. W. Dijkstra. Recursive programming. Numerische Math, 2:312-318, 1960. Also in Rosen: "Programming Systems and Languages", McGraw-Hill, 1967. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.Michael Georgeff. Transformations and reduction strategies for typed lambda expressions. A CM Transactions on Programming Languages and Systems, 6(4):603-631, Oct 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 11.Barry Hayes. Using key object opportunism to collect old objects. In Proceedings: Conference on Object-Oriented Programming Systems, Languages and Applications, Sigplan Notices, Vol 26, Number 11, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 12.Fritz Henglein. Type inference with polymorphic recursion. ACM Transactions on Programming Languages and Systems, 15(2):253, April 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13.Paul Hudak. A semantic model of reference counting and its abstraction. In A CM Symposium on List and Functional Programming, pages 351- 363, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 14.Pierre Jouvelot and D.K. Gifford. Algebraic reconstruction of types and effects. In Proceedings of the 18th A CM Symposium on Principles of Programming Languages (POPL), 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 15.Hiroyuki Seki Katsuro Inoue and Hikaru Yagi. Analysis of functional programs to detect runtime garbage cells. A CM Transactions on Programming Languages and Systems, 10(4):555- 578, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16./~ke Wikstr6m. Functional Programming Using Standard ML. Series in Computer Science, Prentice Hall, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 17.A. Kfoury~ J. Tiuryn, and P. Urzyczyn. The undecidability of the semi-unification problem. In Proc. 22nd Annual A CM Syrup. on Theory of Computation (STOC), Baltimore, Maryland, pages 468-476, May 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 18.Donald E. Knuth. Fundamental Algorithms. Volume 1 of The Art of Computer Programming, Addison-Wesley, 1972.Google ScholarGoogle Scholar
  19. 19.Henry Lieberman and Carl Hewitt. A real-time garbage collector based on the lifetimes of objects. Communications of the A CM, 26(6):419- 429, June 1983. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 20.J. M. Lucassen. Types and Effects, towards the integration of functional and imperative programming. PhD thesis, MIT Laboratory for Computer Science, 1987. MIT/LCS/TR-408.Google ScholarGoogle Scholar
  21. 21.J.M. Lucassen and D.K. Gifford. Polymorphic effect systems. In Proceedings of the 1988 A CM Conference on Principles of Programming Languages, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. 22.R. Milner. A theory of type polymorphism in programming. J. Computer and System Sciences, 17:348-375, 1978.Google ScholarGoogle ScholarCross RefCross Ref
  23. 23.Robin Milner and Mads Torte. Co-induction in relational semantics. Theoretical Computer Science, 87:209-220, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. 24.Robin Milner, Mads Torte, and Robert Harper. The Definition of Standard ML. MIT Press, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. 25.F. L. Morris. Advice on structuring compilers and proving them correct. In Proc. A CM Symp. on Principles of Programming Languages, 1973. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. 26.A. Mycroft. Polymorphic type schemes and recursive definitions. In Proc. 6th Int. Conf. on Programming, LNCS 167, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. 27.Laurence C. Paulson. ML for the Working Programmer. Cambridge University Press, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. 28.Cristina Ruggieri and Thomas P. Murtagh. Lifetime analysis of dynamically allocated objects. In Proceedings of the 15th Annual A CM Symposium on Principles of Programming Languages, pages 285-293, January 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. 29.Jean-Pierre Talpin. Theoretical and practical aspects of type and effect inference. Doctoral Dissertation. May 1993. Also available as Research Report EMP/CRI/A-236, Ecole des Mines de Paris.Google ScholarGoogle Scholar
  30. 30.Jean-Pierre Talpin and Pierre Jouvelot. Polymorphic type, region and effect inference. Journal of Functional Programming, 2(3), 1992.Google ScholarGoogle ScholarCross RefCross Ref
  31. 31.Mads Tofte and Jean-Pierre Talpin. A Theory of Stack Allocation in Polymorphicalty Typed Languages. Technical Report DIKU-report 93/15, Department of Computer Science, University of Copenhagen, 1993.Google ScholarGoogle Scholar

Index Terms

  1. Implementation of the typed call-by-value λ-calculus using a stack of regions

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          ACM Conferences cover image
          POPL '94: Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages
          February 1994
          492 pages
          ISBN:0897916360
          DOI:10.1145/174675

          Copyright © 1994 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Online: 1 February 1994
          • Published: 1 February 1994

          Permissions

          Request permissions about this article.

          Request Permissions

          Qualifiers

          • Article

          Acceptance Rates

          POPL '94 Paper Acceptance Rate 39 of 173 submissions, 23%
          Overall Acceptance Rate 1,170 of 5,898 submissions, 20%

          Upcoming Conference

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!