[an error occurred while processing this directive] An error occured whilst processing this directive

LFCS Seminar


Compiling with Continuations, Continued

Andrew Kennedy

Microsoft Research Cambridge

4pm Monday 25th February 2008
Room 2511, JCMB, King's Buildings

Note nonstandard day

Abstract

Compiling with continuations is out of fashion. In this talk I will argue: compiler writers, give continuations a second chance! Continuation-passing style enjoys many benefits over the currently-fashionable compiler intermediate languages based on ANF (A-normal form), SSA (Static Single Assignment), and monads. In particular, the CPS form is preserved under function inlining (beta-reduction) without the need for commuting conversions. Furthermore, some optimizations are more easily expressed: for example, I will show how contification, the transformation of functions into basic blocks, can be implemented by simple rewriting. I will also describe an extremely efficient graph-based representation of CPS terms that supports linear-time term simplification.

An error occured whilst processing this directive