Title: Checking Interactively-Developed Code


Andriy Hnativ


The purpose of the Ruby interpreter, irb, is to develop and test code fragments that will eventually form a complete program. Programming with irb is an interactive process, expected to provide immediate feedback from the Ruby interpreter, typically warnings and error messages that show inconsistencies or programming mistakes, when code is executed. However, a program fragment can be executed only when all dependent fragments are also written. This may introduce a potentially substantial delay between programming and validation, filled with distractions from writing the needed dependent code. As a result, error messages are emitted later than necessary, and may appear in other blocks of code than where the error originates. Essentially, irb lacks a type checker:a system to infer types and check their consistency before code is executed. This is not surprising, given the obstacles that irb’s interactive code development raises for type checking. As one develops a program, code fragments are written and re-written; each are difficult to validate in isolation, and complex to merge and re-check collectively. We have implemented a system that reports type errors for incomplete irb programs, by verifying code blocks as they are developed, and checking that they mesh correctly with other code blocks as the developer changes and replaces them. By using principal typings inference, our tool adds lightweight type checking to the Ruby language without changing the syntax. As a result, coders will be able to reduce development time by more precisely locating errors at a better time in the development process.


July 19, 2009


Hitotsubashi Memorial Hall

Speaker Profile

Andriy Hnativ is a M.Sc. student studying programming languages at the University of Saskatchewan under the direction of Prof. Chris Dutchyn. Among other things, he is interested in functional programming languages, open-source development, and dynamic languages, especially Ruby and Python.

Presentation Material

(Sorry, currently not available)

Video footage

Checking Interactively-Developed Code (1/3) - Andriy Hnativ

Checking Interactively-Developed Code (2/3) - Andriy Hnativ

Checking Interactively-Developed Code (3/3) - Andriy Hnativ

Back to Timetable

Ruby Sponsors
  • 伊藤忠テクノソリューションズ株式会社
  • 株式会社ネットワーク応用通信研究所
  • 株式会社リコー
Platinum Sponsors
  • 株式会社永和システムマネジメント
  • ニフティ株式会社
  • 株式会社RAWHIDE.
  • 株式会社リクルート
  • 株式会社トランス・ニュー・テクノロジー
  • 株式会社コンテンツワン
Gold Sponsors
  • 株式会社アンタス
  • 株式会社クリアコード
  • 株式会社クオン
  • 株式会社万葉
  • 株式会社iRubySystems
  • 有限会社ラビックス
  • 楽天株式会社
  • SKIPユーザグループ
  • タワーズ・クエスト株式会社
  • ワイクル株式会社