Tue Oct 18 12:44:22 EDT 2011
lifting over streams
I made a small lift operation that maps a function over a stream for
syntax only. Now it would be good to implement this lifting operation
also in a generic way, so it can be tested in Haskell also.
This brings me back to one of the earlier ideas that a lot of what I
try to do is about commutation between compilation (function <->
syntax) and lifting over data structures (repetition / loops). Having
2 representations at this point might make it simpler to give names to
all legs of the diagram.
SM (Haskell function) ---> function lifted over Haskell list
| | ???
SM (target syntax) ---> syntax lifted over target memory arrays
The ??? probably doesn't exist directly (can't be implemented) because
the domain is unrolled while the target is not (it's a representation
of loop code).
The left arrow actually also doesn't exist directly: both ends are
semantics of the TML class.
So the arrows are related only in that they are instances of the same
thing. Essentially it would be possible to interpret the target
language to reconstruct the code rep.
So what I'm saying is that it might be a good idea to not only
abstract the base langauge, but the lifting operation and the data
containers since there is clearly some kind of structure to capture