Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Static type inference for Ruby
Furr M., An J., Foster J., Hicks M.  SAC 2009 (Proceedings of the 2009 ACM Symposium on Applied Computing, Honolulu, Hawaii,1859-1866.2009.Type:Proceedings
Date Reviewed: Mar 18 2010

In current programming language designs, flexibility and early error detection are typically seen as opposing forces. This is because flexibility is usually gained through dynamic typing, while early error detection is done through static types. Recently, a fair amount of research work has been done to try to bridge this gap by bringing some static safety guarantees to scripting languages.

The principal technique is a variant of type inference--frequently using ideas from abstract interpretation (explicitly or implicitly, as in this paper). Whether it is called soft typing, gradual typing, or contracts (see the paper for full references), a careful balancing act is needed: statically discover all errors that would produce an error at runtime versus falsely rejecting correct programs or burdening the programmer with the task of providing numerous annotations. This is the challenge that the authors tackle for Ruby.

The paper presents the general ideas behind the static type system, the constraint-based approach to type inference, cast insertion, and some implementation details. Additionally, some experimental results are presented and carefully analyzed. The authors’ conclusion is unsurprising: most production Ruby code that does not use “very dynamic” features can be fully analyzed, and few real bugs are found (but some are indeed found). The scalability to larger programs is not addressed.

The paper is written in a pleasant style and gives a good overview of DRuby. In particular, the various engineering challenges and pragmatic decisions are nicely presented. However, the lack of precise technical details leaves one wishing for a more expanded version. Although Furr et al. have published other papers on DRuby, none of them (as yet) seem to give a formal account of their work.

Reviewer:  Jacques Carette Review #: CR137829 (1009-0929)
Bookmark and Share
  Reviewer Selected
Featured Reviewer
 
 
Program Analysis (F.3.2 ... )
 
 
Ruby (D.3.2 ... )
 
 
Scripting Languages (I.7.2 ... )
 
 
Language Constructs and Features (D.3.3 )
 
Would you recommend this review?
yes
no
Other reviews under "Program Analysis": Date
Practical extraction techniques for Java
Tip F., Sweeney P., Laffra C., Eisma A., Streeter D. ACM Transactions on Programming Languages and Systems 24(6): 625-666, 2002. Type: Article
Mar 10 2003
Design and implementation of a special-purpose static program analyzer for safety-critical real-time embedded software
Blanchet B., Cousot P., Cousot R., Feret J., Mauborgne L., Miné A., Monniaux D., Rival X. In The essence of computation. New York, NY: Springer-Verlag New York, Inc., 2002. Type: Book Chapter
Oct 3 2003
Types in program analysis
Jensen T. In The essence of computation. New York, NY: Springer-Verlag New York, Inc., 2002. Type: Book Chapter
Sep 23 2003
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy