Fri Sep 26 09:07:42 CEST 2008

partial evaluation vs. dynamic closures

Partial evaluation and dynamic closures are related in that they are
both partial reductions (given an expression with abstractions and
applications, perform some beta-reduction(s) somewhere in the
expression), but are quire different in the way they are represented.

Dynamic closures are best implemented by delaying full application -
the execution of (machine) code - until all the values are present:
intermediate representation is a chunk of parameterized (machine) code
and an environment of variable bindings.

Partial evaluation performs reduction by generating a (machine) code
representation that does not contain any free variables that need to
be filled in by a separate record of variable bindings at final
application time.  The (machine) code produced after partial
evaluation is completely stand-alone.

But I apparently already said that in the blog..