Tue Jan 14 16:04:05 CET 2014

About implicit indexing

The type annotation mechanism is a bit unorthodox.  It supports a
mechanism of implicit indexing.  The reason for using implicit
indexing is that it solves the behind-the-scenes state threading
in a very elegant way.

Causal stream operators may appear inside spatial loops.  For
each iteration, a separate "instance" of a causal stream operator
needs to be allocated.  Shifting from the scalar to the grid view
makes it trivial to solve this problem.

Abstracting such state management is a major feature of the
language: it makes the language purely functional at the stream
level, instead of object-oriented at the scalar level.

I accidentally bumped into this approach as originally making every
operation auto-lifted seemed like a good idea.  It is not.  Currently
the loop contstruct is relatively orthodox, but internally the
auto-lifting is still used to track grid indexing.

It would be interesting to formalize this approach in Haskell.