Enriching the lambda calculus with contexts
Authors:
Open Access
- 15 June 1996
- journal article
- Published by Association for Computing Machinery (ACM) in ACM SIGPLAN Notices
- Vol. 31 (6) , 239-250
Abstract
A context in the λ-calculus is a term with some holes. Hole filling differs from β-substitution in that name capture is intended. This seemingly simple feature transcends static scope and lies at the heart of modular and object-oriented programming. Still, the name capture feature of hole filling is at odds with hygienic β-substitution. In this paper we conservatively extend the λ-calculus to incorporate the notion of contexts without jeopardizing the β-rule. We perceive contexts as source code and λ-terms as target code. Context filling is encoded as compilation operations and the enriched calculus is a theory of separate compilation and incremental program construction. Linking of separately-developed programs is done by coherent renaming of free variables.We apply our context-enriching schema to the λ-calculus extended with definitions and devise a calculus of first-class modules. We show that module linking can be modeled solely by the renaming of import and export variables. We add relinkable variable references to model virtual method references essential to object systems.The inclusion of contexts introduces parameters whose linking is based on names (symbols, identifiers, or keywords). We simulate in the context-enriched calculus other extensions of the λ-calculus with name-based programming notions such as Dami's λ-calculus with names, Aït-Kaci and Garrigue's label-selective λ-calculus, Lamping's transparent data parameters, and our quasi-static procedures.Keywords
This publication has 8 references indexed in Scilit:
- A theory of binding structures and applications to rewritingTheoretical Computer Science, 1993
- Quasi-static scoping1993
- A denotational semantics of inheritance and its correctness1989
- Inheritance in smalltalk-80: a denotational definition1988
- A unified system of parameterization for programming languages1988
- A consistent extension of the lambda-calculus as a base for functional programming languagesInformation and Control, 1982
- Call-by-name, call-by-value and the λ-calculusTheoretical Computer Science, 1975
- Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theoremIndagationes Mathematicae, 1972