
CPS Transformation of Beta-Redexes
Author(s) -
Olivier Danvy,
Lasse R. Nielsen
Publication year - 2000
Publication title -
brics report series
Language(s) - English
Resource type - Journals
eISSN - 1601-5355
pISSN - 0909-0878
DOI - 10.7146/brics.v7i35.20170
Subject(s) - transformation (genetics) , context (archaeology) , continuation , mathematics , reduction (mathematics) , beta (programming language) , computer science , programming language , geometry , history , biochemistry , chemistry , gene , archaeology
The extra compaction of Sabry and Felleisen's transformation is due to making continuations occur first in CPS terms and classifying more redexes as administrative. We show that the extra compaction is actually independent of the relative positions of values and continuations and furthermore that it is solely due to a context-sensitive transformation of beta-redexes. We stage the more compact CPS transformation into a first-order uncurrying phase and a context-insensitive CPS transformation. We also dene a context-insensitive CPS transformation that is just as compact. This CPS transformation operates in one pass and is dependently typed. Keywords: Continuation-passing style (CPS), Plotkin, Fischer, one-pass CPS transformation, two-level lambda-calculus, generalized reduction.