论文标题

强化数据类型的细化

Intensional Datatype Refinement

论文作者

Jones, Eddie, Ramsay, Steven

论文摘要

模式匹配的安全问题是要验证给定的功能程序是否由于其功能定义中的非排量模式而不会崩溃。我们提出了一个可用于解决此问题的改进类型系统。该系统通过有限形式的结构性亚型和环境级相交扩展了具有代数数据类型的ML式类型系统。我们描述了该系统的全自动,声音和完整的推理过程,在合理的假设下,在程序大小中是最差的线性时间。组成性对于获得这种复杂性保证至关重要。 Haskell的原型实现能够分析几百毫秒中的骇客数据库中的软件包选择。

The pattern-match safety problem is to verify that a given functional program will never crash due to non-exhaustive patterns in its function definitions. We present a refinement type system that can be used to solve this problem. The system extends ML-style type systems with algebraic datatypes by a limited form of structural subtyping and environment-level intersection. We describe a fully automatic, sound and complete type inference procedure for this system which, under reasonable assumptions, is worst-case linear-time in the program size. Compositionality is essential to obtaining this complexity guarantee. A prototype implementation for Haskell is able to analyse a selection of packages from the Hackage database in a few hundred milliseconds.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源