Reformatted for sigplan.
Cleaned up repo. Added semantic fix and conjectures for correctness.