A Low-level Approach to Reuse for Programming-Language Infrastructure

Norman Ramsey
Harvard University

Thursday, March 8, Volen 101, 2:00 p.m.

To implement new programming languages for current machines---or current languages for new machines---requires expensive infrastructure. Ideally, such infrastructure would be reused, but existing designs present major obstacles to reuse: In high-level infrastructures, many important features are built in and can't be changed, forcing some clients to pay unacceptable costs. In low-level infrastructures, it is hard to support important features that demand *run-time* services, such as garbage collection, exceptions, and so on. My students and I have pioneered a new approach: for reuse with many languages, an infrastructure needs *two* low-level interfaces: a compile-time interface and a *run-time* interface. By providing appropriate mechanisms, these interfaces enable a client of the infrastructure to implement high-level features in many different ways, giving the client the power to choose the semantics and costs of those features.

This talk will illustrate these ideas with a case study drawn from the infrastructure we have built: the C-- language infrastructure. I will focus on exception dispatch and the mechanisms that make it possible for you to choose the semantics and costs you want. These mechanisms are drawn from both compile-time and run-time interfaces, and together they can be reused to implement exceptions under any known cost model. Each mechanism is also reusable in other contexts. Finally, I will sketch how this research fits into a long-term program of developing a substantial infrastructure that will help make it possible to run any language efficiently on any machine.

Host: Harry Mairson