## Towards Compatible and Interderivable Semantic Specifications for the Scheme Programming Language, Part I: Denotational Semantics, Natural Semantics, and Abstract Machines (2008)

### Cached

### Download Links

Citations: | 1 - 1 self |

### BibTeX

@MISC{Danvy08towardscompatible,

author = {Olivier Danvy},

title = {Towards Compatible and Interderivable Semantic Specifications for the Scheme Programming Language, Part I: Denotational Semantics, Natural Semantics, and Abstract Machines},

year = {2008}

}

### OpenURL

### Abstract

We derive two big-step abstract machines, a natural semantics, and the valuation function of a denotational semantics based on the small-step abstract machine for Core Scheme presented by Clinger at PLDI’98. Starting from a functional implementation of this small-step abstract machine, (1) we fuse its transition function with its driver loop, obtaining the functional implementation of a big-step abstract machine; (2) we adjust this big-step abstract machine so that it is in defunctionalized form, obtaining the functional implementation of a second big-step abstract machine; (3) we refunctionalize this adjusted abstract machine, obtaining the functional implementation of a natural semantics in continuation style; and (4) we closure-unconvert this natural semantics, obtaining a compositional continuation-passing evaluation function which we identify as the functional implementation of a denotational semantics in continuation style. We then compare this valuation function with that of Clinger’s original denotational semantics of Scheme.

### Citations

616 | The Definition of Standard ML (Revised - Milner, Tofte, et al. - 1997 |

393 | Explicit substitutions
- Abadi, Cardelli, et al.
- 1991
(Show Context)
Citation Context ...d on the other hand, reflect more accurately the computational reality of abstract machines by delaying substitutions into environments. In so doing he gave birth to calculi of explicit substitutions =-=[1]-=-, which promptly became a domain of research on their own. In our thesis work [2, 9], we revisited K the -calculus and proposed a minimal extension for it, L K the -calculus, that is closed under one-... |

341 |
The mechanical evaluation of expressions
- Landin
- 1964
(Show Context)
Citation Context ...eta-operation and include it directly in the transitions of the machine. This approach is often used to faithfully model evaluation based on term rewriting. Alternatively, since Landin’s SECD machine =-=[15]-=-, substitution is explicitly implemented in abstract machines using environments. The two approaches are used interchangeably in the literature (even for the same language), depending on the context o... |

305 | Definitional interpreters for higher-order programming languages - Reynolds - 1972 |

245 | A formulae-as-types notion of control - Griffin - 1990 |

220 |
Call-by-name, call-by-value and the -calculus
- Plotkin
- 1975
(Show Context)
Citation Context ...age), depending on the context of use, but their equivalence is rarely treated formally. J A -calculus with explicit substitutions: Since Plotkin’s foundational work on -calculi and abstract machines =-=[18]-=-, it has become a tradition to directly relate the result of abstract machines with the result of weak-head normalization, regardless of whether the abstract machines treat substitution implicitly as ... |

114 | C.: Continuations: A mathematical semantics for handling full jumps
- Strachey, Wadsworth
- 1974
(Show Context)
Citation Context ...emantics, reduction semantics: a small-step operational semantics with an ex37J J plicit representation of the reduction context. As Strachey and Wadsworth originally did with continuation semantics =-=[19]-=-, he then took advantage of this explicit representation of the rest of the reduction to make contraction rules context sensitive, and operate not just on a potential redex, 1 but also on its context,... |

105 | Danvy and Andrzej Filinski. Representing control, a study of the CPS transformation - Olivier - 1992 |

95 | Typing First Class Continuations in ML - Duba, Harper, et al. - 1993 |

93 | Rabbit: A compiler for Scheme - Jr - 1978 |

84 | Control operators, the SECD machine, and the l -calculus - Fellesisen, Friedman - 1986 |

78 | Scheme: An interpreter for extended lambda calculus - Sussman, Jr - 1975 |

70 | Defunctionalization at work - Danvy, Nielsen - 2001 |

68 | A functional correspondence between evaluators and abstract machines - Ager, Biernacki, et al. - 2003 |

62 |
An abstract framework for environment machines
- Curien
- 1991
(Show Context)
Citation Context ...sult of weak-head normalization, regardless of whether the abstract machines treat substitution implicitly as a meta-operation or explicitly with an environment. As an offshoot of his doctoral thesis =-=[6,7]-=-, Curien proposed a ‘calculus of closures,’ the -calculus, that would, on the one hand, be faithful to the -calculus, and on the other hand, reflect more accurately the computational reality of abstra... |

61 | Proper tail recursion and space efficiency
- Clinger
- 1998
(Show Context)
Citation Context ...th environments [4]. In this article, we present a variant of L K the -calculus that, through refocusing, essentially corresponds to Clinger’s abstract machine for Core Scheme as presented at PLDI’98 =-=[5]-=-. Curien’s original point therefore applies and reductions in this calculus reflect the execution of Scheme programs accurately. We therefore put the calculus for Core Scheme. KL -calculus forward as ... |

53 | The essence of functional programming (invited talk - Wadler - 1992 |

40 | A Visual Environment for Developing Context-Sensitive Term Rewriting Systems
- Matthews, Findler, et al.
- 2004
(Show Context)
Citation Context ... execution of Scheme programs accurately. We therefore put the calculus for Core Scheme. KL -calculus forward as an apt Prerequisites and domain of discourse: Though one could of course use PLT Redex =-=[17]-=-, we use a pure subset of Standard ML as a metalanguage here, for consistency with the companion paper. We otherwise expect some familiarity with programming a reduction semantics and with Clinger’s P... |

38 | A functional correspondence between monadic evaluators and abstract machines for languages with computational effects - Ager, Danvy, et al. - 2003 |

37 | Comparative Semantics for Prolog with Cut - Vink - 1989 |

34 | A functional correspondence between call-by-need evaluators and lazy abstract machines - Ager, Danvy, et al. - 2004 |

32 | A scheme for higher-level semantic algebra - Friedman, Wand |

31 | Continuations and Coroutines - Haynes, Friedman, et al. - 1984 |

29 |
Making a fast curry: push/enter vs eval/apply for higher-order languages
- Marlow, Peyton-Jones
- 2006
(Show Context)
Citation Context ...ore the definition of a partial contraction function mapping a potential redex to a contractum. Eval/continue abstract machine: As pointed out in the companion paper, an ‘eval/apply’ abstract machine =-=[16]-=- would be more accurately called ‘eval/continue’ since the apply transition function, together with the data type of contexts, often form the defunctionalized representation of a continuation. We ther... |

27 | A rational deconstruction of Landin’s SECD machine - Danvy |

25 | Implementation strategies for first-class continuations - Clinger, Hartheimer, et al. - 1999 |

25 | A call-by-name lambda calculus machine - Krivine - 2007 |

24 | Programming languages and lambda calculi. Unpublished lecture notes - Felleisen, Flatt |

21 | From reduction-based to reduction-free normalization
- Danvy
- 2008
(Show Context)
Citation Context ...article [5]. For the rest, we have aimed for a standalone presentation but the reader might wish to consult our earlier work [3,4] or first flip through the pages of the second author’s lecture notes =-=[8, 10]-=-. Terminology: Notion of contraction: To alleviate the overloading of the term ‘reduction’ (as in, e.g., “reduction semantics,” “notion of reduction,” “reduction strategy,” and “reduction step”), we r... |

21 | Formalizing Implementation Strategies for first-class Continuations - Danvy - 2000 |

21 | Definitional interpreters revisited - Reynolds - 1998 |

20 | A concrete framework for environment machines
- Biernacka, Danvy
- 2007
(Show Context)
Citation Context ...e derivations. This work: We build on our previous work on the syntactic correspondence between context-sensitive reduction semantics and abstract machines for a -calculus with explicit substitutions =-=[3, 4]-=-. Let us review each of these concepts in turn: ! ul. Joliot-Curie 15, PL-50-383 Wroclaw, Poland (*)%),+%+%+ -/.%. -10%23. -1+$465$7 -1&98%);:=<?>'@3. "$#%#'& IT-parken, Aabogade 34, DK-8200 Aarhus N,... |

19 | From interpreter to logic engine by defunctionalization - Biernacki, Danvy - 2003 |

19 | An Analytical Approach to Program as Data Objects. DSc thesis - Danvy - 2006 |

18 | A syntactic correspondence between context-sensitive calculi and abstract machines - Biernacka, Danvy - 2007 |

18 | O.: An Operational Foundation for Delimited Continuations in the CPS Hierarchy - Biernacka, Biernacki, et al. |

14 | How to add threads to a sequential language without getting tangled up - Gasbischler, Knauel, et al. - 2003 |

14 | An operational semantics for R5RS Scheme - Matthews, Findler - 2005 |

13 | Refunctionalization at work - Danvy, Millikin - 2008 |

13 | A study of defunctionalization and continuation-passing style - Nielsen - 2001 |

12 |
Refocusing in reduction semantics. Research Report BRICS
- Danvy, Nielsen
- 2004
(Show Context)
Citation Context ... revisited K the -calculus and proposed a minimal extension for it, L K the -calculus, that is closed under one-step reduction. We then systematically applied Danvy and Nielsen’s refocusing technique =-=[13]-=- on several reduction semantics and obtained a variety of known and new abstract machines with environments, including the Krivine machine for call by name and the CEK machine for call by value [3]. C... |

12 | An operational investigation of the CPS hierarchy - Danvy, Yang |

11 | The revised report on SCHEME: A dialect of Lisp - Sussman - 1978 |

10 | On the equivalence between small-step and big-step abstract machines: a simple application of lightweight fusion
- Danvy, Millikin
(Show Context)
Citation Context ...e, and iterate implements its iteration (after performing the contraction). Next, we distribute the calls to iterate in the definition of refocus in order to obtain a big-step state-transition system =-=[12]-=-. The difference between the big-step and the small-step transition system is that in the former, the function refocus does not stop on encountering a redex site; it calls the function iterate directl... |

9 | The Theory and Practice of Programming Languages with Delimited Continuations - Biernacki - 2005 |

8 | Partial Evaluation of String Matchers & Constructions of Abstract Machines - Ager - 2006 |

8 | Transformation, Analysis, and Interpretation of Higher-Order Procedural Programs - Midtgaard - 2007 |

7 |
A Derivational Approach to the Operational Semantics of Functional Languages
- Biernacka
(Show Context)
Citation Context ...t machines by delaying substitutions into environments. In so doing he gave birth to calculi of explicit substitutions [1], which promptly became a domain of research on their own. In our thesis work =-=[2, 9]-=-, we revisited K the -calculus and proposed a minimal extension for it, L K the -calculus, that is closed under one-step reduction. We then systematically applied Danvy and Nielsen’s refocusing techni... |

6 |
The Calculi of -v-CS Conversion: A Syntactic Theory of Control and State in Imperative Higher-Order Programming Languages
- Felleisen
- 1987
(Show Context)
Citation Context ... known and new abstract machines with environments, including the Krivine machine for call by name and the CEK machine for call by value [3]. Context-sensitive reduction semantics: In his thesis work =-=[14]-=-, Felleisen introduced a continuation-semantics analogue of structural operational semantics, reduction semantics: a small-step operational semantics with an ex37J J plicit representation of the redu... |

5 | A Structured Approach to the Transformation, Normalization and Execution of Computer Programs - Millikin - 2007 |