TY - GEN
T1 - A Theory of Name Resolution
AU - Neron, Pierre
AU - Tolmach, Andrew
AU - Visser, Eelco
AU - Wachsmuth, Guido
PY - 2015
Y1 - 2015
N2 - 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.
AB - 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.
UR - http://www.scopus.com/inward/record.url?scp=84926687129&partnerID=8YFLogxK
UR - http://resolver.tudelft.nl/uuid://7fb193c8-735d-4d82-ba0a-b270b5317187
U2 - 10.1007/978-3-662-46669-8_9
DO - 10.1007/978-3-662-46669-8_9
M3 - Conference contribution
AN - SCOPUS:84926687129
T3 - Lecture Notes in Computer Science
SP - 205
EP - 231
BT - Programming Languages and Systems
A2 - Vitek, Jan
PB - Springer
CY - Berlin
T2 - Programming Languages and Systems
Y2 - 11 April 2015 through 18 April 2015
ER -