Towards Compatible and Interderivable Semantic Specifications for the Scheme Programming Language, Part II: Reduction Semantics and Abstract Machines

  • Małgorzata Biernacka
  • Olivier Danvy
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5700)


We present a context-sensitive reduction semantics for a lambda-calculus with explicit substitutions and we show that the functional implementation of this small-step semantics mechanically corresponds to that of the abstract machine for Core Scheme presented by Clinger at PLDI’98, including first-class continuations. Starting from this reduction semantics, (1) we refocus it into a small-step abstract machine; (2) we fuse the transition function of this abstract machine with its driver loop, obtaining a big-step abstract machine which is staged; (3) we compress its corridor transitions, obtaining an eval/continue abstract machine; and (4) we unfold its ground closures, which yields an abstract machine that essentially coincides with Clinger’s machine. This lambda-calculus with explicit substitutions therefore aptly accounts for Core Scheme, including Clinger’s permutations and unpermutations.


Abstract Machine Denotational Semantic Reduction Sequence Core Scheme Permutation Generator 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Abadi, M., Cardelli, L., Curien, P.-L., Lévy, J.-J.: Explicit substitutions. Journal of Functional Programming 1(4), 375–416 (1991); A preliminary version was presented at the Seventeenth Annual ACM Symposium on Principles of Programming Languages (POPL 1990)MathSciNetCrossRefzbMATHGoogle Scholar
  2. 2.
    Biernacka, M.: A Derivational Approach to the Operational Semantics of Functional Languages. PhD thesis, BRICS PhD School, Department of Computer Science, Aarhus University, Aarhus, Denmark (January 2006)Google Scholar
  3. 3.
    Biernacka, M., Danvy, O.: A concrete framework for environment machines. ACM Transactions on Computational Logic 9(1), 1–30 (2007); Article #6. Extended version available as the research report BRICS RS-06-3MathSciNetCrossRefzbMATHGoogle Scholar
  4. 4.
    Biernacka, M., Danvy, O.: A syntactic correspondence between context-sensitive calculi and abstract machines. Theoretical Computer Science 375(1-3), 76–108 (2007); Extended version available as the research report BRICS RS-06-18MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Clinger, W.D.: Proper tail recursion and space efficiency. In: Cooper, K.D. (ed.) Proceedings of the ACM SIGPLAN 1998 Conference on Programming Languages Design and Implementation, Montréal, Canada, June 1998, pp. 174–185. ACM Press, New York (1998)CrossRefGoogle Scholar
  6. 6.
    Curien, P.-L.: An abstract framework for environment machines. Theoretical Computer Science 82, 389–402 (1991)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Curien, P.-L.: Categorical Combinators, Sequential Algorithms and Functional Programming. In: Progress in Theoretical Computer Science. Birkhauser, Basel (1993)Google Scholar
  8. 8.
    Danvy, O.: An Analytical Approach to Program as Data Objects. DSc thesis, Department of Computer Science, Aarhus University, Aarhus, Denmark (October 2006)Google Scholar
  9. 9.
    Danvy, O.: From reduction-based to reduction-free normalization. In: Koopman, P., Plasmeijer, R., Swierstra, D. (eds.) AFP 2008. LNCS, vol. 5832. Springer, Heidelberg (2009)Google Scholar
  10. 10.
    Danvy, O.: Towards Compatible and Interderivable Semantic Specifications for the Scheme Programming Language, Part I: Denotational Semantics, Natural Semantics, and Abstract Machines. In: Palsberg, J. (ed.) Mosses Festschrift. LNCS, vol. 5700, pp. 162–185. Springer, Heidelberg (2009)Google Scholar
  11. 11.
    Danvy, O., Millikin, K.: On the equivalence between small-step and big-step abstract machines: a simple application of lightweight fusion. Information Processing Letters 106(3), 100–109 (2008)MathSciNetCrossRefzbMATHGoogle Scholar
  12. 12.
    Danvy, O., Millikin, K.: A rational deconstruction of Landin’s SECD machine with the J operator. Logical Methods in Computer Science 4(4:12), 1–67 (2008)MathSciNetzbMATHGoogle Scholar
  13. 13.
    Danvy, O., Nielsen, L.R.: Refocusing in reduction semantics. Research Report BRICS RS-04-26, Department of Computer Science, Aarhus University, Aarhus, Denmark (November 2004); A preliminary version appeared in the informal proceedings of the Second International Workshop on Rule-Based Programming (RULE 2001), Electronic Notes in Theoretical Computer Science, vol. 59.4Google Scholar
  14. 14.
    Felleisen, M.: The Calculi of λ-v-CS Conversion: A Syntactic Theory of Control and State in Imperative Higher-Order Programming Languages. PhD thesis, Computer Science Department, Indiana University, Bloomington, Indiana (August 1987)Google Scholar
  15. 15.
    Landin, P.J.: The mechanical evaluation of expressions. The Computer Journal 6(4), 308–320 (1964)CrossRefzbMATHGoogle Scholar
  16. 16.
    Marlow, S., Peyton Jones, S.L.: Making a fast curry: push/enter vs. eval/apply for higher-order languages. Journal of Functional Programming 16(4-5), 415–449 (2006); A preliminary version was presented at the 2004 ACM SIGPLAN International Conference on Functional Programming (ICFP 2004)MathSciNetCrossRefzbMATHGoogle Scholar
  17. 17.
    Matthews, J., Findler, R.B., Flatt, M., Felleisen, M.: A visual environment for developing context-sensitive term rewriting systems. In: van Oostrom, V. (ed.) RTA 2004. LNCS, vol. 3091, pp. 301–311. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  18. 18.
    Mosses, P.D.: A foreword to ‘Fundamental concepts in programming languages’. Higher-Order and Symbolic Computation 13(1/2), 7–9 (2000)CrossRefGoogle Scholar
  19. 19.
    Plotkin, G.D.: Call-by-name, call-by-value and the λ-calculus. Theoretical Computer Science 1, 125–159 (1975)MathSciNetCrossRefzbMATHGoogle Scholar
  20. 20.
    Strachey, C.: Fundamental concepts in programming languages. In: International Summer School in Computer Programming, Copenhagen, Denmark (August 1967); Reprinted in Higher-Order and Symbolic Computation 13(1/2), 11–49 (2000) with a foreword [18]Google Scholar
  21. 21.
    Strachey, C., Wadsworth, C.P.: Continuations: A mathematical semantics for handling full jumps. Technical Monograph PRG-11, Oxford University Computing Laboratory, Programming Research Group, Oxford, England (1974); Reprinted in Higher-Order and Symbolic Computation 13(1/2), 135–152 (2000) with a foreword [22]Google Scholar
  22. 22.
    Wadsworth, C.P.: Continuations revisited. Higher-Order and Symbolic Computation 13(1/2), 131–133 (2000)CrossRefzbMATHGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Małgorzata Biernacka
    • 1
  • Olivier Danvy
    • 2
  1. 1.Institute of Computer ScienceUniversity of WroclawWroclawPoland
  2. 2.Department of Computer ScienceAarhus UniversityAarhus NDenmark

Personalised recommendations