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

过去未来的精化:具有隐式精化类型的高阶规范(扩展版)

Refinements of Futures Past: Higher-Order Specification with Implicit Refinement Types (Extended Version)

Anish Tondwalkar, Matthew Kolosick, Ranjit Jhala

摘要:

细化类型用支持自动验证的断言来修饰类型。与断言一样,细化仅限于范围内的绑定,因此不能表达更高阶的规范。Ghost变量规避了这一限制,但使用起来极其乏味,因为程序员必须在所有调用站点推测并解释它们的值。我们引入了隐式细化类型,它将幽灵变量转换为隐式的对和函数类型,让细化类型检查器在编译时自动合成它们的值。隐式细化类型进一步利用细化类型信息,允许它们用作轻量级验证工具,而不仅仅是作为自动化编程任务的技术。我们评估的实用程序隐式细化类型,显示它们如何使模块化的规范和自动验证的各种高阶的例子,包括有状态的协议,访问控制,和资源使用。

英文摘要:

Refinement types decorate types with assertions that enable automatic verification. Like assertions, refinements are limited to binders that are in scope, and hence, cannot express higher-order specifications. Ghost variables circumvent this limitation but are prohibitively tedious to use as the programmer must divine and explicate their values at all call-sites. We introduce Implicit Refinement Types which turn ghost variables into implicit pair and function types, in a way that lets the refinement typechecker automatically synthesize their values at compile time. Implicit Refinement Types further take advantage of refinement type information, allowing them to be used as a lightweight verification tool, rather than merely as a technique to automate programming tasks. We evaluate the utility of Implicit Refinement Types by showing how they enable the modular specification and automatic verification of various higher-order examples including stateful protocols, access control, and resource usage.

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

↑