Refinement Types for Ruby

11/25/2017
by   Milod Kazerounian, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/15/2020

Refinement Types: A Tutorial

Refinement types enrich a language's type system with logical predicates...
research
07/12/2022

Mechanizing Refinement Types (extended)

Practical checkers based on refinement types use the combination of impl...
research
07/08/2022

Flux: Liquid Types for Rust

We introduce Flux, which shows how logical refinements can work hand in ...
research
11/09/2017

Refinement Reflection: Complete Verification with SMT

We introduce Refinement Reflection, a new framework for building SMT-bas...
research
10/24/2018

Type-directed Bounding of Collections in Reactive Programs

Our aim is to statically verify that in a given reactive program, the le...
research
02/20/2020

RustHorn: CHC-based Verification for Rust Programs (full version)

Reduction to the satisfiability problem for constrained Horn clauses (CH...
research
09/15/2023

Dependent Type Refinements for Futures

Type refinements combine the compositionality of typechecking with the e...

Please sign up or login with your details

Forgot password? Click here to reset