Saturday 24 February 2007

Compiling Dynamic Languages



Dynamic languages like Python have gained significant popularity in mainstream programming. To support their dynamic features, they are often interpreted. In scientific computing applications, this works well for prototyping, but often means that significant efforts must later be invested in building the "real" application. Our thesis is that dynamic languages like Python can be effectively compiled by translation to statically typed functional languages like OCaml. Not only that, but this approach is highly amenable to formal verification. This, in fact, entails developing a formal semantics for the dynamic language. The talk described ongoing efforts to demonstrate this strategy in the concrete case of compiling Python using OCaml. After explaining why statically typed functional languages like OCaml may play an important role in compiling dynamic languages, we describe our progress to date in understanding the semantics of Python and in devising a correct translation into OCaml. At the time of writing this abstract, preliminary performance measurement were quite encouraging.

Raj Bandyopadhyay is Walid Taha's student. Walid Taha is an assistant professor at Rice University, Houston, TX. He is the principal investigator on a number of NSF, Texas ATP, and SRC research grants and contracts on various aspects of resource aware proWalid Taha gramming. Taha is actively involved in development of both the embedded software and generative programming research communities.

No comments: