Author:
Flanagan Cormac,Sabry Amr,Duba Bruce F.,Felleisen Matthias
Abstract
In order to simplify the compilation process, many compilers for higher-order languages use the continuation-passing style (CPS) transformation in a first phase to generate an intermediate representation of the source program. The salient aspect of this intermediate form is that all procedures take an argument that represents the rest of the computation (the “continuation”). Since the nai¨ve CPS transformation considerably increases the size of programs, CPS compilers perform reductions to produce a more compact intermediate representation. Although often implemented as a part of the CPS transformation, this step is conceptually a second phase. Finally, code generators for typical CPS compilers treat continuations specially in order to optimize the interpretation of continuation parameters.
A thorough analysis of the abstract machine for CPS terms show that the actions of the code generator
invert
the nai¨ve CPS translation step. Put differently, the combined effect of the three phases is equivalent to a source-to-source transformation that simulates the compaction phase. Thus, fully developed CPS compilers do not need to employ the CPS transformation but can achieve the same results with a simple source-level transformation.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Reference19 articles.
1. AHO A. SETHI R. AND ULLMAN J. Compilers--Pmnciples Techniques and Tools. Addison-Wesley Reading Mass. 1985. AHO A. SETHI R. AND ULLMAN J. Compilers--Pmnciples Techniques and Tools. Addison-Wesley Reading Mass. 1985.
2. Implementing RUSSELL
3. Improving binding times without explicit CPS-conversion
Cited by
149 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献