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

Ruby的优化类型

Refinement Types for Ruby

Milod Kazerounian, Niki Vazou, Austin Bourgerie, Jeffrey S. Foster, Emina Torlak

摘要:

细化类型是指定和推理关键程序属性的流行方法。在本文中,我们介绍RTR,一个新的系统,增加了细化类型的Ruby。RTR构建在RDL之上,RDL是一个Ruby类型检查器,为验证过程提供基本的类型信息。RTR通过将其验证问题编码到Rosette(一种求解器辅助主机语言)中来工作。RTR通过假设保证推理处理mixin,并使用即时验证进行元编程。我们正式RTR显示从核心,Ruby类语言与细化类型到Rosette的翻译。我们应用RTR来检查六个Ruby程序的功能正确性属性的范围。我们发现,RTR可以成功地验证这些程序中的关键方法,只需几分钟的时间来执行验证。

英文摘要:

Refinement types are a popular way to specify and reason about key program properties. In this paper, we introduce RTR, a new system that adds refinement types to Ruby. RTR is built on top of RDL, a Ruby type checker that provides basic type information for the verification process. RTR works by encoding its verification problems into Rosette, a solver-aided host language. RTR handles mixins through assume-guarantee reasoning and uses just-in-time verification for metaprogramming. We formalize RTR by showing a translation from a core, Ruby-like language with refinement types into Rosette. We apply RTR to check a range of functional correctness properties on six Ruby programs. We find that RTR can successfully verify key methods in these programs, taking only a few minutes to perform verification.

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

↑