Mon May 20 15:03:36 EDT 2013
Type analysis stuff
Trying to implement this, it seems easier to abstract away primitive
execution in the first ai-array.rkt pass then to try to do it the
other way around. It doesn't seem to be possible to separate the
basic structure of the array code from the type analysis, but it does
seem possible to avoid actually executing the primitives.
However, what does come to mind is a different class-based approach to
this. The output of pass one could be a different language that can
also have abstract interpretation, where the extension is like a class
extension / subtype.
The "only" thing this does is to abstract the recursion pattern inside
the representation. The trouble is, that probably requires laziness.
Still, it is getting a bit convoluted with the different small hacks
like const, hold, setup, delay, ...
Anyways, the basic structure is not too hard to abstract as a
function. Just wrap substructure in thunks.