Norman Ramsey
Harvard University
Choosing
Abstractions and Interfaces for Programming-Language Infrastructure
Abstract:
Suppose you are thinking of a programming
language, in which you want to write programs that run on the target
machine of
your choice. To get a good implementation, you ought to be able
to reuse
existing infrastructure. But “compiler infrastructures” are
mostly about inventing
new optimizations, not supporting new programming languages.
Worse, such infrastructures often overlook
*run-time* services---garbage collection and so forth. To address
this problem,
I have introduced a new idea: To be truly reusable, a language
infrastructure needs
not only a compile-time interface but also a *run-time*
interface. If
both interfaces provide appropriate low-level mechanisms, the
mechanisms can be
composed to build different high-level abstractions with the right
semantics
and cost model. (This design avoids the
trap of the Java Virtual Machine or the Microsoft Common Language
Infrastructure, which come with gobs of high-level abstractions, but
with an
unchangeable semantics and cost model which may not meet your needs.)
In this talk, I will illustrate these ideas
with examples drawn from two parts of the C-- language infrastructure:
exception dispatch and procedure calls. I will focus on the
mechanisms
that make it possible for you to choose the semantics and cost model
you
want. For exceptions, these mechanisms are drawn from both
compile-time
and run-time interfaces, and together they enable you to duplicate all
the established
techniques for implementing exceptions. For procedure calls, the
mechanisms are quite different; rather than provide low-level
mechanisms that
combine to form different kinds of procedure calls, I have found it
necessary
to extend the compile-time interface to enable direct control of the
semantics
and cost of procedure calls. If time
permits, I will also explain why our model of procedures is broken and
how it
must be fixed if it is to support such abstractions as stacklets or
first-class
continuations.
Host: Frank Pfenning
Appointments: Jennifer
Landefeld
Tuesday, May 3, 2005 at 3:30 p.m.
Newell-Simon Hall 1305 (Mauldin Auditorium)
*** PLEASE NOTE: NOT USUAL DAY OR LOCATION ***