Title
Name analysis for modern languages: a general solution.
Abstract
Classical strategies for matching identifier uses with declarations cannot handle the complexities of modern languages: arbitrarily qualified superclass names, cyclic dependence among lookup operations, and contextual access constraints. We have developed a language-independent algorithm and supporting data structure that overcome these problems. A well-defined interface allows introduction of arbitrary code to enforce language-specific constraints within the basic lookup operations. This paper explains the limitations of the classical strategies, presents the concepts on which our approach is based, and showcases an implementation based on attribute grammars. We explore the major issues through a series of examples and show how one can deal with those issues in a general framework. Many of the issues are specific to a particular language, and in those cases, we explain the solutions that our general interface supports. Although attribute grammars simplify the task of incorporating the model into a compiler, the model itself is completely independent of attribute grammars. We validated our model by using an implementation to process programs in several representative languages. In particular, we mechanically compared the results produced by that implementation with those produced by the Java SE 8 compiler on complete Java programs that are in general use. Performance data obtained during this processing show that our implementation is efficient. Copyright (C) 2017 John Wiley & Sons, Ltd.
Year
DOI
Venue
2017
10.1002/spe.2489
SOFTWARE-PRACTICE & EXPERIENCE
Keywords
Field
DocType
compilers,name analysis,attribute grammars,reuse,framework
Software engineering,Reuse,Computer science,Petroleum engineering,Fully qualified name,Compiler,Artificial intelligence,Natural language processing,Name binding
Journal
Volume
Issue
ISSN
47.0
11.0
0038-0644
Citations 
PageRank 
References 
0
0.34
9
Authors
2
Name
Order
Citations
PageRank
Uwe Kastens140655.65
William M. Waite2325196.47