Short cut fusion is correct

  • Authors:
  • Patricia Johann

  • Affiliations:
  • Department of Computer Science, Rutgers University, Camden, NJ 08102, USA (email: pjohann@crab.rutgers.edu)

  • Venue:
  • Journal of Functional Programming
  • Year:
  • 2003

Quantified Score

Hi-index 0.00

Visualization

Abstract

Fusion is the process of removing intermediate data structures from modularly constructed functional programs. Short cut fusion is a particular fusion technique which uses a single, local transformation rule to fuse compositions of list-processing functions. Short cut fusion has traditionally been treated purely syntactically, and justifications for it have appealed either to intuition or to “free theorems” – even though the latter have not been known to hold in languages supporting higher-order polymorphic functions and fixpoint recursion. In this paper we use Pitts' recent demonstration that contextual equivalence in such languages is parametric to provide the first formal proof of the correctness of short cut fusion for them. In particular, we show that programs which have undergone short cut fusion are contextually equivalent to their unfused counterparts.