Renamingless Capture-Avoiding Substitution for Definitional Interpreters

Conference Paper (2023)
Author(s)

Casper Bach Bach (TU Delft - Programming Languages)

Research Group
Programming Languages
Copyright
© 2023 C.B. Poulsen
DOI related publication
https://doi.org/10.4230/OASIcs.EVCS.2023.2
More Info
expand_more
Publication Year
2023
Language
English
Copyright
© 2023 C.B. Poulsen
Research Group
Programming Languages
ISBN (electronic)
9783959772679
Reuse Rights

Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons.

Abstract

Substitution is a common and popular approach to implementing name binding in definitional interpreters. A common pitfall of implementing substitution functions is variable capture. The traditional approach to avoiding variable capture is to rename variables. However, traditional renaming makes for an inefficient interpretation strategy. Furthermore, for applications where partially-interpreted terms are user facing it can be confusing if names in uninterpreted parts of the program have been changed. In this paper we explore two techniques for implementing capture avoiding substitution in definitional interpreters to avoid renaming.