Date of Award

Spring 4-1-2012

Document Type


Degree Name

Master of Science (MS)


Electrical, Computer & Energy Engineering

First Advisor

Jeremy Siek

Second Advisor

Bor-Yuh Evan Chang

Third Advisor

Sriram Sankaranarayanan


Compilers for statically typed languages such as C/C++ and Java use the types from the program to generate high performance code. Although the runtimes of dynamically typed languages such as Python, Ruby and Javascript have evolved significantly over the past few years; they have not yet reached the performance of their statically typed counterparts. A new type system called gradual typing has been proposed in which the program can optionally be annotated with type information. In this thesis, I implement gradual typing in Jython (an implementation of Python language for the Java virtual machine) and generate type-specialized code. Also, I use invokedynamic, a new byte code introduced in Java 7, to implement optimizations in Jython; both in an effort to close the gap between Java and Jython in particular and statically type and dynamically typed language in general.