Refinement Types for Ruby
Milod Kazerounian, Niki Vazou, Austin Bourgerie, Jeffrey S. Foster,, Emina Torlak

TL;DR
This paper introduces RTR, a system that adds refinement types to Ruby, enabling formal verification of program properties by translating verification problems into Rosette and handling Ruby features like mixins and metaprogramming.
Contribution
RTR is the first system to integrate refinement types into Ruby, combining it with solver-aided verification and formal translation to improve program correctness checking.
Findings
RTR successfully verifies key methods in six Ruby programs.
Verification takes only a few minutes per program.
RTR effectively handles Ruby features like mixins and metaprogramming.
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. 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.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Software Testing and Debugging Techniques · Security and Verification in Computing
