Abstract
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.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
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)
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)
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-3
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-18
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)
Curien, P.-L.: An abstract framework for environment machines. Theoretical Computer Science 82, 389–402 (1991)
Curien, P.-L.: Categorical Combinators, Sequential Algorithms and Functional Programming. In: Progress in Theoretical Computer Science. Birkhauser, Basel (1993)
Danvy, O.: An Analytical Approach to Program as Data Objects. DSc thesis, Department of Computer Science, Aarhus University, Aarhus, Denmark (October 2006)
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)
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)
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)
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)
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.4
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)
Landin, P.J.: The mechanical evaluation of expressions. The Computer Journal 6(4), 308–320 (1964)
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)
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)
Mosses, P.D.: A foreword to ‘Fundamental concepts in programming languages’. Higher-Order and Symbolic Computation 13(1/2), 7–9 (2000)
Plotkin, G.D.: Call-by-name, call-by-value and the λ-calculus. Theoretical Computer Science 1, 125–159 (1975)
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]
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]
Wadsworth, C.P.: Continuations revisited. Higher-Order and Symbolic Computation 13(1/2), 131–133 (2000)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2009 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Biernacka, M., Danvy, O. (2009). Towards Compatible and Interderivable Semantic Specifications for the Scheme Programming Language, Part II: Reduction Semantics and Abstract Machines . In: Palsberg, J. (eds) Semantics and Algebraic Specification. Lecture Notes in Computer Science, vol 5700. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-04164-8_10
Download citation
DOI: https://doi.org/10.1007/978-3-642-04164-8_10
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-04163-1
Online ISBN: 978-3-642-04164-8
eBook Packages: Computer ScienceComputer Science (R0)