Ecstatic – Type Inference for Ruby Using the Cartesian Product Algorithm

Student thesis: Master thesis (including HD thesis)

  • Martin Madsen
  • Peter Sørensen
  • Kristian Kristensen
4. term, Software, Master (Master Programme)
This master's thesis documents Ecstatic - a type inference tool for the Ruby programming language. Ecstatic is based on the Cartesian Product Algorithm (CPA), which was originally developed for use in the Self language.

The major contributions of this thesis are: the Ecstatic tool that can infer precise and accurate types of arbitrary Ruby programs. By implementing CPA we confirm that the algorithm can be retrofitted for a new language. Utilizing RDoc we devise a method for handling Ruby core and foreign code both implemented in C. Using Ecstatic a number of experiments were performed that gained insights into the degree of polymorphism employed in Ruby programs. We present an approach for unit testing a type inference system. We compare Ruby to Smalltalk and Self, and conclude that their semantics are similar.
Publication dateJun 2007
ID: 61071011