arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2210.06121cs.PL
收藏

专业化作用域图解析工具包:扩展版

Specializing Scope Graph Resolution Queries: Extended Edition

Aron Zwaan

摘要:

为了保证程序员的工作效率,类型检查器的结果应该是正确的,并且可以快速地得到。当类型检查器实现对应于声明性类型系统规范时,可以提供正确性。Statix是一种类型系统规约语言,它通过从声明性类型规则自动派生类型检查器实现来实现这一点。Statix的一个关键特性是它使用作用域图来声明名称解析的规范。然而,与手写的类型检查器相比,从Statix规范派生的类型检查器具有次优的运行时间性能。在本文中,我们确定和解决的Statix求解器的性能瓶颈,即部分的名称解析算法,使用部分评估。为此,我们引入了一种量身定制的过程性中间查询解析语言,并提供了一个专门工具来将声明性查询转换为该语言。通过比较三个基准测试(Apache Commons CSV,IO和Lang 3)的类型检查运行时间性能来评估这个专门化程序,表明我们的专门化程序将查询解析时间提高了7.7倍,从而将总的类型检查运行时间减少了38 - 48%。

英文摘要:

To warrant programmer productivity, type checker results should be correct and available quickly. Correctness can be provided when a type checker implementation corresponds to a declarative type system specification. Statix is a type system specification language which achieves this by automatically deriving type checker implementations from declarative typing rules. A key feature of Statix is that it uses scope graphs for declarative specification of name resolution. However, compared to hand-written type checkers, type checkers derived from Statix specifications have sub-optimal run time performance. In this paper, we identify and resolve a performance bottleneck in the Statix solver, namely part of the name resolution algorithm, using partial evaluation. To this end, we introduce a tailored procedural intermediate query resolution language, and provide a specializer that translates declarative queries to this language. Evaluating this specializer by comparing type checking run time performance on three benchmarks (Apache Commons CSV, IO, and Lang3), shows that our specializer improves query resolution time up to 7.7x, which reduces the total type checking run time by 38 - 48%.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑