Dynamic Inference of Static Types for Ruby

dc.contributor.advisorFoster, Jeffrey Sen_US
dc.contributor.advisorHicks, Michael Wen_US
dc.contributor.authorAn, Jong-hoonen_US
dc.contributor.departmentComputer Scienceen_US
dc.contributor.publisherDigital Repository at the University of Marylanden_US
dc.contributor.publisherUniversity of Maryland (College Park, Md.)en_US
dc.date.accessioned2010-10-07T06:10:13Z
dc.date.available2010-10-07T06:10:13Z
dc.date.issued2010en_US
dc.description.abstractThere have been several efforts to bring static type inference to object-oriented dynamic languages such as Ruby, Python, and Perl. In our experience, however, such type inference systems are extremely difficult to develop, because dynamic languages are typically complex, poorly specified, and include features, such as eval and reflection, that are hard to analyze. In this thesis, we introduce constraint-based dynamic type inference, a technique that infers static types based on dynamic program executions. In our approach, we wrap each run-time value to associate it with a type variable, and the wrapper generates constraints on this type variable when the wrapped value is used. This technique avoids many of the often overly conservative approximations of static tools, as constraints are generated based on how values are used during actual program runs. Using wrappers is also easy to implement, since we need only write a constraint resolution algorithm and a transformation to introduce the wrappers. We have developed Rubydust, an implementation of our algorithm for Ruby. Rubydust takes advantage of Ruby's dynamic features to implement wrappers as a language library. We applied Rubydust to a number of small programs. We found it to be lightweight and useful: Rubydust discovered 1 real type error, and all other inferred types were correct, and readable.en_US
dc.identifier.urihttp://hdl.handle.net/1903/10946
dc.subject.pqcontrolledComputer Scienceen_US
dc.subject.pquncontrolleddynamic analysisen_US
dc.subject.pquncontrolledscripting languagesen_US
dc.subject.pquncontrolledtype systemsen_US
dc.titleDynamic Inference of Static Types for Rubyen_US
dc.typeThesisen_US

Files

Original bundle
Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
An_umd_0117N_11611.pdf
Size:
508.5 KB
Format:
Adobe Portable Document Format