SimTyper: Sound Type Inference for Ruby using Type Equality Prediction
summary
SimTyper infers usable Ruby types by combining constraint solving, InferDL-style heuristics, and a learned type equality prediction model. It builds DeepSim (a Siamese network that uses CodeBERT token embeddings) to score whether two positions share a type, then replaces overly general solutions when the guess is constraint-consistent. Trained on 100k pairs from 371 programs, CHD (constraints+heuristics+DeepSim) yields 69% more matches and higher precision/recall than constraints alone.
AI-written summary · about
chapters (17)
- 0:00Intro
- 1:01Type Annotation Inference
- 2:21Sim Typer: Sound, Usable Type Inference
- 3:16Example Ruby Method • Start with standard, constraint-based inference
- 3:35Generate constraints
- 5:03Constraint resolution
- 5:19Solution extraction
- 6:09InferDL (DLS '20)
- 6:40Applying Struct-to-Nominal
- 7:16Building on Heuristics
- 7:54Using Type Equality Prediction
- 8:30Using the Deep Sim Network
- 10:12Putting it All Together
- 10:22Evaluation
- 11:03Key Results
- 11:51Results: By Benchmark Group
- 12:36Precision, Recall
related talks
15mSound, Heuristic Type Annotation Inference for Ruby
30mGood Enough Types: Heuristic Type Inference for Ruby
39mType Checking Ruby Programs with Annotations
37mTypes and Ruby Programming Language
45mSoftly, softly typing
32mGradual Typing in Ruby - A Three Year...
32mDo LLMs dream of Type Inference?
53mAn introduction to typed Ruby programming
