Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article

Deriving a lazy abstract machine

Published: 01 May 1997 Publication History
  • Get Citation Alerts
  • Abstract

    We derive a simple abstract machine for lazy evaluation of the lambda calculus, starting from Launchbury's natural semantics. Lazy evaluation here means non-strict evaluation with sharing of argument evaluation, i.e. call-by-need. The machine we derive is a lazy version of Krivine's abstract machine, which was originally designed for call-by-name evaluation. We extend it with datatype constructors and base values, so the final machine implements all dynamic aspects of a lazy functional language.

    References

    [1]
    Argo, G. (1989) Improving the Three Instruction Machine. Fourth International Conference on Functional Programming Languages and Computer Architecture, Imperial College, London, pp. 100-112. Addison-Wesley.
    [2]
    Argo, G. (1990) Efficient laziness. PhD thesis, Department of Computing Science, University of Glasgow. Draft Manuscript.
    [3]
    Augustsson, L. (1984) A compiler for Lazy ML. ACM Symposium on Lisp and Functional Programming, Austin, Texas, pp. 218-227. ACM.
    [4]
    Barendregt, H. P. (1984) The Lambda Calculus. Its Syntax and Semantics. (Revised edn.) North-Holland.
    [5]
    Crégut, P. (1990) An abstract machine for the normalization of ¿-terms. ACM Conference on Lisp and Functional Programming, Nice, France, pp. 333-340. ACM.
    [6]
    Crégut, P. (1991) Machines à environnement pour la réduction symbolique et l'évaluation partielle . PhD thesis, Université Paris VII, France.
    [7]
    Curien, P. L. (1988) The ¿¿-calculus: an abstract framework for environment machines. Rapport de Recherche LIENS-88-10, Ecole Normale Supérieure, Paris, France.
    [8]
    Fairbairn, J. and Wray, S. C. (1987) TIM: A simple, lazy abstract machine to execute supercombinators. In: Kahn, G. (ed), Functional Programming Languages and Computer Architecture: Lecture Notes in Computer Science 274, Portland, Oregon, pp. 34-45. Springer-Verlag.
    [9]
    Hannan, J. (1991) Making abstract machines less abstract. In: Hughes, J. (ed), Functional Programming Languages and Computer Architecture: 5th ACM Conference: Lecture Notes in Computer Science 523, Cambridge, MA, pp. 618-635. Springer-Verlag.
    [10]
    Hannan, J. and Miller, D. (1990) From operational semantics to abstract machines: Preliminary results. ACM Conference on Lisp and Functional Programming, Nice, France, pp. 323-332. ACM.
    [11]
    Hannan, J. and Pfenning, F. (1992) Compiler verification in LF. In: Scedrov, A. (ed), Seventh Annual IEEE Symposium on Logic in Computer Science, pp. 407-418. IEEE Press.
    [12]
    Johnsson, T. (1984) Efficient compilation of lazy evaluation. ACM Sigplan Symposium on Compiler Construction, pp. 58-69. (SIGPLAN Notices 19(6)). ACM.
    [13]
    Johnsson, T. (1985) Lambda lifting: Transforming programs to recursive equations. In: Jouannaud, J.-P. (ed), Functional Programming Languages and Computer Architecture: Lecture Notes in Computer Science 201, Nancy, France, pp. 190-205. Springer-Verlag.
    [14]
    Josephs, M. B. (1989) The semantics of lazy functional languages. Theoretical Computer Science 68: 105-111.
    [15]
    Launchbury, J. (1993) A natural semantics for lazy evaluation. Twentieth ACM Symposium on Principles of Programming Languages, Charleston, SC, pp. 144-154. ACM.
    [16]
    Leroy, X. (1990) The Zinc experiment: An economical implementation of the ML language. Rapport Technique 117, INRIA Rocquencourt, France.
    [17]
    Mogensen, T. (1992) Re: Is lambda lifting always necessary? Personal communication.
    [18]
    Peyton Jones, S. L. (1987) The Implementation of Functional Programming Languages. Prentice-Hall.
    [19]
    Peyton Jones, S. L. (1992). Implementing lazy functional languages on stock hardware: the spineless tagless G-machine. J. Functional Programming 2(2): 127-202.
    [20]
    Peyton Jones, S. L. and Launchbury, J. (1991) Unboxed values as first class citizens in a non-strict functional language. In: Hughes, J. (ed), Functional Programming Languages and Computer Architecture, 5th ACM Conference: Lecture Notes in Computer Science 523, Cambridge, MA, pp. 636-666. Springer-Verlag.
    [21]
    Peyton Jones, S. L. and Lester, D. (1992) Implementing Functional Languages. Prentice-Hall.
    [22]
    Sansom, P. M. and Peyton Jones, S. L. (1995) Time and space profiling for non-strict, higher-order functional languages. POPL'95: 22nd ACM Symposium on Principles of Programming Languages, San Francisco, CA, pp. 355-366. ACM.
    [23]
    Sestoft, P. (1991) Analysis and efficient implementation of functional programs. PhD thesis, DIKU, University of Copenhagen, Denmark. (DIKU Research Report 92/6.)
    [24]
    Sestoft, P. (1994) Deriving a lazy abstract machine. Technical Report ID-TR 1994-146, Department of Computer Science, Technical University of Denmark.
    [25]
    Shao, Z. and Appel, A. (1994) Space-efficient closure representations. ACM Conference on Lisp and Functional Programming, Orlando, FL, pp. 150-161.
    [26]
    Wand, M. (1982a) Deriving target code as a representation of continuation semantics. ACM Trans. Programming Languages and Systems 4(3): 496-517.
    [27]
    Wand, M. (1982b) Semantics-directed machine architecture. Ninth ACM Symposium on Principles of Programming Languages, Albuquerque, NM, pp. 234-241. ACM.

    Cited By

    View all
    • (2023)CSI: Haskell - Tracing Lazy Evaluations in a Functional LanguageProceedings of the 35th Symposium on Implementation and Application of Functional Languages10.1145/3652561.3652562(1-13)Online publication date: 29-Aug-2023
    • (2023)Sharing a Perspective on the 𝜆-CalculusProceedings of the 2023 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software10.1145/3622758.3622884(179-190)Online publication date: 18-Oct-2023
    • (2023)Closure Conversion in Little PiecesProceedings of the 25th International Symposium on Principles and Practice of Declarative Programming10.1145/3610612.3610622(1-13)Online publication date: 22-Oct-2023
    • Show More Cited By

    Index Terms

    1. Deriving a lazy abstract machine
      Index terms have been assigned to the content through auto-classification.

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image Journal of Functional Programming
      Journal of Functional Programming  Volume 7, Issue 3
      May 1997
      123 pages

      Publisher

      Cambridge University Press

      United States

      Publication History

      Published: 01 May 1997

      Qualifiers

      • Article

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)0
      • Downloads (Last 6 weeks)0
      Reflects downloads up to 11 Aug 2024

      Other Metrics

      Citations

      Cited By

      View all
      • (2023)CSI: Haskell - Tracing Lazy Evaluations in a Functional LanguageProceedings of the 35th Symposium on Implementation and Application of Functional Languages10.1145/3652561.3652562(1-13)Online publication date: 29-Aug-2023
      • (2023)Sharing a Perspective on the 𝜆-CalculusProceedings of the 2023 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software10.1145/3622758.3622884(179-190)Online publication date: 18-Oct-2023
      • (2023)Closure Conversion in Little PiecesProceedings of the 25th International Symposium on Principles and Practice of Declarative Programming10.1145/3610612.3610622(1-13)Online publication date: 22-Oct-2023
      • (2022)A simple and efficient implementation of strong call by need by an abstract machineProceedings of the ACM on Programming Languages10.1145/35498226:ICFP(109-136)Online publication date: 31-Aug-2022
      • (2022)Multi types and reasonable spaceProceedings of the ACM on Programming Languages10.1145/35476506:ICFP(799-825)Online publication date: 31-Aug-2022
      • (2022)Monadic compiler calculation (functional pearl)Proceedings of the ACM on Programming Languages10.1145/35476246:ICFP(80-108)Online publication date: 31-Aug-2022
      • (2022)Reasonable Space for the λ-Calculus, LogarithmicallyProceedings of the 37th Annual ACM/IEEE Symposium on Logic in Computer Science10.1145/3531130.3533362(1-13)Online publication date: 2-Aug-2022
      • (2022)A fine-grained computational interpretation of Girard’s intuitionistic proof-netsProceedings of the ACM on Programming Languages10.1145/34986696:POPL(1-28)Online publication date: 12-Jan-2022
      • (2020)Resource Analysis for Lazy Evaluation with Polynomial PotentialProceedings of the 32nd Symposium on Implementation and Application of Functional Languages10.1145/3462172.3462196(104-114)Online publication date: 2-Sep-2020
      • (2020)ιDOT: a DOT calculus with object initializationProceedings of the ACM on Programming Languages10.1145/34282764:OOPSLA(1-28)Online publication date: 13-Nov-2020
      • Show More Cited By

      View Options

      View options

      Get Access

      Login options

      Media

      Figures

      Other

      Tables

      Share

      Share

      Share this Publication link

      Share on social media