Sciweavers

SAC
2009
ACM

Static type inference for Ruby

14 years 7 months ago
Static type inference for Ruby
Many general-purpose, object-oriented scripting languages are dynamically typed, to keep the language flexible and not reject any programs unnecessarily. However, dynamic typing loses many of the benefits of static typing, including early error detection and the useful documentation provided by type annotations. We have been developing Diamondback Ruby (DRuby), a tool that aims to integrate static typing into Ruby, a popular object-oriented scripting language. DRuby makes three main contributions toward this aim. First, we developed a new GLR parser for Ruby that cleanly separates the core Ruby grammar from a set disambiguation rules, making the parser easy to extend. Second, we developed the Ruby Intermediate Language (RIL), a small, simple subset of Ruby to which we can translate the entire source language. RIL makes implementing Ruby analyses much easier than working with the complex surface syntax. Third, DRuby includes a type annotation language and type inference system that h...
Michael Furr, Jong-hoon (David) An, Jeffrey S. Fos
Added 19 May 2010
Updated 19 May 2010
Type Conference
Year 2009
Where SAC
Authors Michael Furr, Jong-hoon (David) An, Jeffrey S. Foster, Michael W. Hicks
Comments (0)