Type Profiler: An analysis to guess type signatures
summary
Prototype extracts type stubs from real Ruby code using static heuristics and a dynamic run tracer, implements three prototype profilers (two static, one dynamic), and integrates experiments with RDL and the TracePoint API. Results show the dynamic profiler is robust but initially takes hours on large suites; sampling reduces that to minutes. Major failures are ambiguous or unused parameters, void/any return issues, and a sparse type database that produces many incorrect or missing signatures.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 5:24Ruby 3 type system
- 7:51Existing type systems
- 10:01RDL basics and implementation
- 18:03RDL implementation thoughts
- 23:25Type definition file challenges
- 26:50Type Profiler overview
- 30:21Static analysis challenges
- 34:31Dynamic analysis implementation
- 38:34Summary and future outlook
related talks
28mA Plan towards Ruby 3 Types
36mA Static Type Analyzer of Untyped Ruby Code for Ruby 3
22mEnjoy Ruby Programming in IDE and TypeProf
53mAn introduction to typed Ruby programming
29mext/profile, or How to Make Profilers Tell the Truth
39mType Checking Ruby Programs with Annotations
26mHow a Ruby profiler works: Stackprof under a microscope
37mThe Future of Ruby Performance Tooling
