A constraint language for static semantic analysis based on scope graphs

A constraint language for static semantic analysis based on scope graphs
复制标题

一种基于范围图的静态语义分析约束语言

DOI:
--
复制
发表时间:
2015
期刊:
ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation
影响因子:
--
通讯作者:
Guido Wachsmuth
Guido Wachsmuth
中科院分区:
--
文献类型:
--
作者:
H. V. Antwerpen;P. Néron;A. Tolmach;E. Visser;Guido Wachsmuth

文献摘要

被引文献

相似文献

在以前的工作中,我们引入了作用域图作为一种形式化方法,用于描述程序绑定结构并以独立于AST的方式执行名称解析。在本文中,我们展示了如何使用作用域图来构建静态语义分析器。我们使用从AST提取的约束来指定有关绑定、类型和初始化的事实。我们将名称和类型解析视为单独的构建块,但我们的方法可以处理绑定和类型相互依赖的语言结构-例如记录字段访问。我们还改进和扩展了以前的作用域图理论,以解决实际问题,包括歧义检查和对更广泛的作用域关系的支持。我们描述了一种模型语言的约束生成的细节,该语言说明了与模块和记录相关的许多有趣的静态分析问题。
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.