spartan-array/spartan — pull request #151 by fegin (2014-05-08 18:05:27+00:00)
Title: Slice rotation

* RotateSlice should ensure all Map exprs don't have slices. These
slices should be moved to the children of Map exprs.
1. During rotating a slice down, the children of current may change.
If any child becomes a Map expr, RotateSlice should traverse it
again to avoid slice the child Map expr.
2. Step 2 can cause multiple MapMap fusions for a Map. Current
optimization is not idempotent. To avoid this, do RotateSlice before
doing MapMapFusion.

* For example like:
c = a + b
d = c[1:50]
e = c[2:51]
a[2:51] + b[2:51] can still use expr_like to preserve th original expr_id.
However, a[1:50] + b[1:50] should own a different expr_id.