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

  • Norman Ramsey | Harvard University

New ideas in programming languages are best evaluated experimentally.
But experimental evaluation is helpful only if there is an implementation that is efficient enough to encourage programmers to use the new features. Ideally, language researchers would build efficient implementations by reusing existing infrastructure, but existing infrastructures do not serve researchers well: in high-level infrastructures, many high-level features are built in and can’t be changed, and in low-level infrastructures, it is hard to support important *run-time* services such as garbage collection, exceptions, and so on.

I am proposing a different approach: for reuse with many languages, an infrastructure needs *two* low-level interfaces: a compile-time interface and a *run-time* interface. If both interfaces provide appropriate mechanisms, the mechanisms can be composed to build many high-level abstractions, leaving the semantics and cost model up to the client.

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. I will also sketch some important unsolved problems regarding mechanisms to support advanced control features such as threads and first-class continuations.

Speaker Details

Norman Ramsey graduated from Princeton University in 1983 with a degree in physics. He eventually switched to computing, in which field he earned the PhD from Princeton in 1993. After six years at Bellcore, Purdue, and the University of Virginia, he came to Harvard, where he is now Associate Professor of Computer Science in the Division of Engineering and Applied Sciences.His main research interest is how to build reusable, retargetable programming-language infrastructure: compilers, assemblers,linkers, and debuggers. In his work on retargeting, he has pioneered the use of declarative machine descriptions, which say only what the machine does and do so in terms that are independent of particular implementations or tools. His SLED description language has been reused for applications ranging from binary translation to proof-carrying code. He is also interested in language design and in programming technique.