使用JastAdd进行名称分析和类型分析的模式
Patterns for Name Analysis and Type Analysis with 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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。