A Constraint Language for Static Semantic Analysis Based on Scope Graphs

Conference Paper (2016)
Author(s)

H. Van Antwerpen (TU Delft - Programming Languages)

Pierre Neron (TU Delft - Software Engineering)

Andrew Tolmach (Portland State University)

Eelco Visser (TU Delft - Programming Languages)

Guido H. Wachsmuth (TU Delft - Programming Languages)

Research Group
Programming Languages
Copyright
© 2016 H. van Antwerpen, P.J.M. Neron, Andrew Tolmach, Eelco Visser, G.H. Wachsmuth
DOI related publication
https://doi.org/10.1145/2847538.2847543
More Info
expand_more
Publication Year
2016
Language
English
Copyright
© 2016 H. van Antwerpen, P.J.M. Neron, Andrew Tolmach, Eelco Visser, G.H. Wachsmuth
Research Group
Programming Languages
Pages (from-to)
49-60
ISBN (electronic)
978-1-4503-4097-7
Reuse Rights

Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons.

Abstract

In previous work, we introduced scope graphs as a formalism for describing program binding structure and performing name resolution in an AST-independent way. In this paper, we show how to use scope graphs to build static semantic analyzers. We use constraints extracted from the AST to specify facts about binding, typing, and initialization. We treat name and type resolution as separate building blocks, but our approach can handle language constructs -- such as record field access -- for which binding and typing are mutually dependent. We also refine and extend our previous scope graph theory to address practical concerns including ambiguity checking and support for a wider range of scope relationships. We describe the details of constraint generation for a model language that illustrates many of the interesting static analysis issues associated with modules and records.

Files

License info not available