论文标题
名称分析和类型分析的模式与Jastadd
Patterns for Name Analysis and Type Analysis with JastAdd
论文作者
论文摘要
在过去的二十年中,已经实施了工具以更正式地指定编译器的语义分析阶段,而不是依靠手写代码。在本文中,我们介绍了模式和一种方法,将语言类型系统的形式定义转化为Jastadd的规范,Jastadd是基于参考属性语法的上述工具之一。这种方法学方法将帮助语言设计师和编译器工程师更系统地使用此类工具进行语义分析。例如,我们使用一种简单但完整的命令性语言,并提供了如何扩展该方法以涵盖进一步的语言构造甚至类型推理的前景。
In the last two decades, tools have been implemented to more formally specify the semantic analysis phase of a compiler instead of relying on handwritten code. In this paper, we introduce patterns and a method to translate a formal definition of a language's type system into a specification for JastAdd, which is one of the aforementioned tools based on Reference Attribute Grammars. This methodological approach will help language designers and compiler engineers to more systematically use such tools for semantic analysis. As an example, we use a simple, yet complete imperative language and provide an outlook on how the method can be extended to cover further language constructs or even type inference.