A Theory of Name Resolution

Pierre Neron, Andrew Tolmach, Eelco Visser, Guido Wachsmuth

Research output: Chapter in Book/Conference proceedings/Edited volumeConference contributionScientificpeer-review

58 Citations (Scopus)

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.

Original languageEnglish
Title of host publicationProgramming Languages and Systems
Subtitle of host publication24th European Symposiumon Programming, ESOP 2015 held as part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2015, Proceedings
EditorsJan Vitek
Place of PublicationBerlin
PublisherSpringer
Pages205-231
Number of pages27
ISBN (Electronic)9783662466681
DOIs
Publication statusPublished - 2015
EventProgramming Languages and Systems: 24th European Symposium on Programming - London, United Kingdom
Duration: 11 Apr 201518 Apr 2015

Publication series

NameLecture Notes in Computer Science
Volume9032
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

ConferenceProgramming Languages and Systems
Abbreviated titleESOP 2015
Country/TerritoryUnited Kingdom
CityLondon
Period11/04/1518/04/15
OtherHeld as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2015

Fingerprint

Dive into the research topics of 'A Theory of Name Resolution'. Together they form a unique fingerprint.

Cite this