A Theory of Name Resolution

Conference Paper (2015)
Author(s)

P.J.M. Neron (TU Delft - Software Engineering)

Andrew Tolmach (Portland State University)

E. Visser (TU Delft - Programming Languages)

Guido H. Wachsmuth (TU Delft - Programming Languages)

Research Group
Programming Languages
DOI related publication
https://doi.org/10.1007/978-3-662-46669-8_9
More Info
expand_more
Publication Year
2015
Language
English
Research Group
Programming Languages
Pages (from-to)
205-231
ISBN (electronic)
9783662466681

Abstract

We describe a language-independent theory for name binding and resolution, suitable for programming languages with complex scoping rules including both lexical scoping and modules. We formulate name resolution as a two-stage problem. First a language-independent scope graph is constructed using language-specific rules from an abstract syntax tree. Then references in the scope graph are resolved to corresponding declarations using a language-independent resolution process. We introduce a resolution calculus as a concise, declarative, and language-independent specification of name resolution. We develop a resolution algorithm that is sound and complete with respect to the calculus. Based on the resolution calculus we develop language-independent definitions of α-equivalence and rename refactoring. We illustrate the approach using a small example language with modules. In addition, we show how our approach provides a model for a range of name binding patterns in existing languages.

No files available

Metadata only record. There are no files for this record.