MAPS paper: Pure Tensor Program Rewriting via Access Patterns(Representation Pearl).
Github repo: glenside.