CPS or ANF - and How Best to Learn the Pragmatics?

Sun, 21 Dec 2008 04:03:49 -0800 (PST)

          From comp.compilers

Related articles
CPS or ANF - and How Best to Learn the Pragmatics? scott@adrenaline.com (2008-12-21)
| List of all articles for this month |

From: scott@adrenaline.com
Newsgroups: comp.compilers
Date: Sun, 21 Dec 2008 04:03:49 -0800 (PST)
Organization: Compilers Central
Keywords: question, design
Posted-Date: 21 Dec 2008 10:43:56 EST

My language design is almost complete. It's a "mostly functional"
language with pretty much "the usual" panoply of modern language
features and a few interesting twists (otherwise, why design it?).

So now I'm deciding between CPS or ANF as the IR for my compiler.

Pedagogically, I have at least 2 books that give a "how to"
description of (different aspects of ) the pragmatics of CPS -
"Compiling with Continuations" and "EOPL".

But if ANF is preferable, is there similar (or better) "how to" style
learning material for ANF? Ideally I'd like "Compiling with
Continuations" style material that addresses everything from
translation of the source language into ANF, representation of
environments, optimizing transformations and then all the way to
machine/stack/memory and gc/register allocation/primop level detail.

I've downloaded a lot of the "canonical" theoretical papers on CPS vs.
ANF, but perhaps due to a lack of imagination, I cannot by myself
extrapolate a 12 page monograph with some greek symbols describing
transformations on some tiny subset language all the way to a full
blown compiler for a complex language.

Any and all help GREATLY appreciated.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.