heh
heh copied to clipboard
Shape of recursive imap in the partition definitions
Consider the following Heh program:
letrec t = imap [omega] { [0] <= iv < |t|: 1 in t
In principle, it looks valid, however, when trying to run it we get an error like:
Attempt to lookup the pointer `p1' which does not exist in the storage
The problem is that before being able to get the shape of the imap we check that partitions are valid within the given index space. Before this check is done, the pointer that will point to the imap closure does not exist, therefore the shape of the imap cannot be evaluated. It would be possible to create something like pre-imap value that can be only used for shape operations. However, this creates a corner case, and maybe there is a better solution.