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

逐步使用标准类型化算法

Using Standard Typing Algorithms Incrementally

Matteo Busi, Pierpaolo Degano, Letterio Galletta

摘要:

现代语言配备了静态类型检查/推理,帮助程序员保持干净的编程风格并减少错误。然而,不断增长的程序规模及其持续发展需要构建快速高效的分析器。一个很有前途的解决方案是增量式,这样只需要重新输入程序中新的部分,而不是整个代码库。我们提出了一个算法模式驱动的增量类型化算法,利用现有的,标准的没有变化的定义。我们的方法是一种灰盒方法,这意味着只需要输入的形状、结果的形状和一些特定于领域的知识来实例化我们的模式。在这里,我们提出了我们的方法的基础,我们在工作中得到三个不同的增量类型化算法。前两个实现了函数语言的类型检查和推理。最后一个是对命令式语言进行类型检查,以检测信息流和非干扰。我们评估了我们的建议,一个增量类型检查器的原型实现。我们的实验表明,增量地使用类型检查器(几乎)总是有益的。

英文摘要:

Modern languages are equipped with static type checking/inference that helps programmers to keep a clean programming style and to reduce errors. However, the ever-growing size of programs and their continuous evolution require building fast and efficient analysers. A promising solution is incrementality, so one only re-types those parts of the program that are new, rather than the entire codebase. We propose an algorithmic schema driving the definition of an incremental typing algorithm that exploits the existing, standard ones with no changes. Ours is a grey-box approach, meaning that just the shape of the input, that of the results and some domain-specific knowledge are needed to instantiate our schema. Here, we present the foundations of our approach and we show it at work to derive three different incremental typing algorithms. The first two implement type checking and inference for a functional language. The last one type-checks an imperative language to detect information flow and non-interference. We assessed our proposal on a prototypical implementation of an incremental type checker. Our experiments show that using the type checker incrementally is (almost) always rewarding.

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

↑