Tue Sep 16 16:16:51 CEST 2008
MetaML and Cross-Stage-Persistence
What I don't really understand is why CSP is stressed so much.. Why
isn't the whole code represented as a closure that evaluates down to
something with a much simpler lexical structure, i.e. machine code?
Why do you need intermediate representation layers, that are littered
with opaque CSP values, but nevertheless cannot be inspected?
It seems MetaML is really fairly tightly rooted in the manipulation of
ML abstract syntax trees, in such a way that staged code can be
presented to the ML compiler.
In staapl, the abstract representation is quite straightforward
because the code IS the compiler: it is a closure that when applied to
the empty program dumps out concrete machine code.
I guess renaming in MetaML is necessary because the ASTs manipulated
are probably still flat trees, and do not contain direct
variable->binder connections? (NO: it works modulo alpha-equivalence)
So I wonder.. Am I missing something? The MetaML story starts with
explicit manipulation of a-equivalent template code (lambda calculus),
I start with manipulation of flat transformer combinators and
primitive combinators (primitive stack machine code transformers).