MetaCartSign in to MyCiteSeer

Include Citations | Advanced Search | Help

Include Citations | Advanced Search | Help

  ROPAS

Download:
Download as a PDF | Download as a PS
by Jung-taek Kim, Kwangkeun Yi
http://ropas.kaist.ac.kr/~kwang/paper/00-cw-kiyi.ps.gz
Add To MetaCart

Abstract:

We present a type-based partial CPS transformation (CPStransforming only a sub-part of a program) and its correctness proof. A program's sub-parts which need to be CPStransformed are initially annotated as such. Partial CPStransformation scans the expressions and selectively apply the transformation depending on the annotation. Wherever an interface between CPS-transformed and direct-style expressions is needed, proper conversion code is padded based on expression types. The correctness of the partial CPS transformation is proven similarly to that of Plotkin's simulation theorem[Plo75]. 1 This Work Is it possible to CPS-transform only a sub-part of a program, leaving others in direct-style? Such partial CPStransformation is needed, for example, to link CPS-transformed modules with non-CPS modules or to minimize the performance overhead by the transformation[KYD98]. In this article we present a type-based partial CPS transformation. The partial CPS transformation transforms only parts of a program and connects the results to the rest, direct-style parts. A program's sub-parts which need to be CPS-transformed is initially annotated as such. Partial CPS-transformation scans the expressions and selectively apply the transformation depending on the annotation. Wherever an interface between CPS-transformed and direct-style expressions is needed, proper conversion code is padded based on expression types. Let's consider an example code: ((x:x) 1) + 1 Assume that we want to CPS-transform only the function part- x:x. A CPS transformed version of the function part is: K:K (x:K:K x). To use the CPS-transformed function inside the non-CPS context ([] 1) + 1, we wrap the CPS-function position with a conversion code as follows: y:([](x:x) y (x:x))

Citations

No citations identified.