[<<][rtl][>>][..]
Sat May 18 10:06:00 EDT 2019

Ranges : loop indices are really just sizes

What about this: each array has an associated definted range.  Once a
full loop has executed, this defined range is the size and is an
explitly defined parameter that has the same standing as any other
loop index.

I.e. A uses index i during definition

i:
    Ai <- Bi

But once the loop has executed, i could be left to represent the size
of the array.

This unifies two ideas: access to the size of an array, and the
"current index" during array construction.  So the index parameter is
really a size parameter.


Let this sink in for a bit.

One thing can already be changed: loop indices should not be re-used,
as they retain a value after a loop has finished.  E.g. the following
is valid: The first loop defines the accumulator (i' is i-1), the
second loop uses its last value.

-- LTA
i:
  Ai <- Ai' Bi
j:
  Dj <- Ai Cj




[Reply][About]
[<<][rtl][>>][..]