Refinement Types for Ruby

Milod Kazerounian, Niki Vazou, Austin Bourgerie, Jeffrey S. Foster, Emina Torlak
11/25/2017
cs.PL

Official code: mckaz/vmcai-rdl (3 stars, Ruby, BSD-3-Clause, last commit 2018-01-09).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

mckaz/vmcai-rdlOfficial100%
BSD-3-Clause

An extension of RDL with refinement types.

30Ruby, RacketNov 17, 20178 years agoBSD-3-Clause

Similar Papers

Cite this paper

@article{kazerounian2017refinement,
  title  = {Refinement Types for Ruby},
  author = {Milod Kazerounian and Niki Vazou and Austin Bourgerie and Jeffrey S. Foster and Emina Torlak},
  year   = {2017},
  eprint = {1711.09281},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1711.09281}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1711.09281.svg)](https://codeofpaper.com/paper/1711.09281)

Discussion