# No-Brainer CPS Conversion

> Episode of [International Conference on Functional Programming 2017](https://podistic.com/podcast/international-conference-on-functional-programming-2017.md) · Published January 15, 2018 · Duration 14:20

- **Listen on Podistic:** https://podistic.com/episode/no-brainer-cps-conversion
- **Video:** https://media.podcasts.ox.ac.uk/comlab/comsci/2017-09-04-ICFP2017/2017-09-04-ICFP2017-day2-pm-04.mp4 (video/mp4)

## About this episode

Milo Davis (Northeastern University, USA) gives the fourth talk in the second panel, Foundations of Higher-Order Programming, on the 2nd day of the ICFP.  Co-written by William Meehan and Olin Shivers (Northeastern University, USA).



Algorithms that convert direct-style lambda-calculus terms to their equivalent terms in continuation-passing style (CPS) typically introduce so-called 'administrative redexes' -- useless artifacts of the conversion that must be cleaned up by a subsequent pass over the result to reduce them away. We present a simple, linear-time algorithm for CPS conversion that introduces no administrative redexes. In fact, the output term is a normal form in a reduction system that generalizes the notion of 'administrative redexes' to what we call 'no-brainer redexes,' that is, redexes whose reduction shrinks the size of the term. We state the theorems which establish the algorithm's desireable properties, along with sketches of the full proofs.
