[<<][libprim][>>][..]
Sat Jan 23 06:38:16 CET 2010

ANF again

Let's see what I missed last time.  There is a transformation example
on page 10 in [1] that seemed rather strange.

   (add1 (let (x (f 5)) 0))

-> (let (x (f 5)) (add1 0))

This is an application of rule A3 in figure 7 on page 7, which lifts
an inner application out of a primtive or value application.

So, to summarize: ANF's usefulness is mainly for optimization, as it
can expose certain reductions more easily.  Whether a VM creates
continuations during 'let' or during argument evaluation doesn't
matter so much for the internal complexity..


Another thing I missed is that proper ANF is _serial_ (i.e. let*
instead of let): it doesn't have a parallel representation.

[1] http://www.ccs.neu.edu/scheme/pubs/pldi93-fsdf.ps.gz
[2] http://lambda-the-ultimate.org/node/69
[3] http://schemecookbook.org/view/Cookbook/PearlANormalForm




[Reply][About]
[<<][libprim][>>][..]