[Prev][Next][Index][Thread]

PL seminar - Mark Leone



		     Programming Languages Seminar
 		         Friday, Sept.20, 1996
  		            8am-9am, LH 101

	    A Semantic Account of Run-Time Code Generation

			      Mark Leone
			  Indiana University

This will be a short, informal talk about work in progress, followed by 
group discussion about various issues in dynamic program optimization.

Some tantalizing applications of run-time code generation have been
demonstrated.  In 1968, Ken Thompson implemented a regular expression
matcher that could dynamically compile its input into a finite-state
machine expressed in IBM 7094 machine code.  More recently, Massalin
and Pu demonstrated that the cost of repeatedly traversing certain
kernel data structures could be amortized by compiling them into code,
yielding "executable data."

But if a program generates and executes native code at run time, how
can we ensure that it does not crash?  Clearly we cannot if the
programmer is permitted to generate and execute arbitrary native code.
However, we can provide certain safety guarantees if the dynamically
generated code is derived automatically from a statically typed program.

To prove this, we need a formal model of dynamic compilation.  In this
talk I will sketch a simple framework that appears promising.  It is
based on the two-level lambda calculus, which has been explored
previously by researchers interested in automatic program specialization.