softfennec
@softfennec

thinking about the futamura projections and losing my mind


softfennec
@softfennec

it seems to me like the easy bit is "taking a program in some convenient representation and basically just generating code where the variables only dependent on the input being specialised over are held constant" but it seems like this requires, somehow, already having done control flow analysis over the program to be specialised? and identifying where the input is in there?


You must log in to comment.

in reply to @softfennec's post:

Disclaimer: my formal background is shaky and I've just read the Wikipedia article.

If your control flow depends only on bound variables, it can be specialized down to a single branch. If it depends on a free variable, you just leave it symbolic and specialize all of the branches individually. Type-wise, your flow control blocks could be thought of as producing a tagged union -- if they only depend on bound variables, you can specialize that to a single tag value (and so it's like it produced a single type out of the ones summed into the union).

Pinned Tags