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.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.