New Features of Eli Version 4.9
A set of new modules has been added to support name analysis for
object-oriented languages.
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.
Eli's ScopeGraphs specification module provides
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.
(see Fundamentals of Name Analysis of Name Analysis Reference Manual).
Because inheritance relations are inherently non-structural, they are
defined by names in a program and therefore their representations in the
data structure must be created by name analysis.
Language design decisions determine the dependence of this analysis on
information already available, and therefore affect the
techniques that must be used to complete the data structure
(see Kernel Language of Tutorial for Name Analysis Using Scope Graphs).
Our techniques for lookup depend only on the structural characteristics of
the program that are embodied in the data structure.
Many language definitions, however, include semantic constraints on
identifier meanings.
The module implements these kinds of constraints by providing
extension points where language-independent lookup operations
defined in the module invoke procedures coded by the
designer to enforce language-specific semantic rules.
Each language-specific procedure is provided with access to arbitrary
properties of both the context of the identifier being sought and the
contexts of one or more candidate definitions.
It uses that information to determine which, if any, of the candidates
should be accepted.
The ScopeGraphs module is accompanied by modules that support
predefined identifiers
(see Pre-defined Identifiers of Name Analysis Reference Manual,
and checking the results of name analysis
(see Name Analysis Testing of Name Analysis Reference Manual.
A functional
interface on a lower level is available for situations where the
computational roles do not suffice
see Application Program Interface of Name Analysis Reference Manual.
The ScopeGraphs module can be used for non-object-oriented
languages, as well.
|