[plt-scheme] Behind the scenes, is everything running using continuation passing style?

From: Marco Morazan (morazanm at gmail.com)
Date: Wed Nov 14 14:45:45 EST 2007

On Nov 14, 2007 1:55 PM, Shu-yu Guo <arc at cs.uchicago.edu> wrote:
> On 11/14/07, Matthias Felleisen <matthias at ccs.neu.edu> wrote:
> >
> > 4. There is sufficient evidence that CPS still has one advantage,
> > concerning join points of control flow. That is, it is easier to
> > linearize from CPS than from ANF. The person who has articulated it
> > best is Steve Weeks (a former PLT undergraduate) with postings and
> > his MLton compiler. The one write-up of their work I know is "Fluet &
> > Weeks, Contification using dominators, ICFP 2001." (Also see this
> > year's ICFP for a follow-up on this from MSR @ Cambridge on compiling
> > F#.)
> I believe there are also arguments concerning that you have to
> re-normalize ANF transformations with let-bindings under
> beta-reduction, leading to more complicated beta-reduction rules,
> which CPS avoids.

Take a look at Olivier Danvy's paper in the draft proceedings of IFL
2007. There is a bijection between CPS terms and A-normal terms. The
transformation from one to another is straight-forward.



Posted on the users mailing list.