Sciweavers

ICFP
2009
ACM

Implementing first-class polymorphic delimited continuations by a type-directed selective CPS-transform

14 years 5 months ago
Implementing first-class polymorphic delimited continuations by a type-directed selective CPS-transform
We describe the implementation of first-class polymorphic delimited continuations in the programming language Scala. We use Scala's pluggable typing architecture to implement a simple type and effect system, which discriminates expressions with control effects from those without and accurately tracks answer type modification incurred by control effects. To tackle the problem of implementing first-class continuations under the adverse conditions brought upon by the Java VM, we employ a selective CPS transform, which is driven entirely by effect-annotated types and leaves pure code in direct style. Benchmarks indicate that this high-level approach performs competitively. Categories and Subject Descriptors D.3.3 [Programming Languages]: Language Constructs and Features--Control structures General Terms Languages, Theory Keywords Delimited continuations, selective CPS transform, control effects, program transformation
Tiark Rompf, Ingo Maier, Martin Odersky
Added 22 Nov 2009
Updated 22 Nov 2009
Type Conference
Year 2009
Where ICFP
Authors Tiark Rompf, Ingo Maier, Martin Odersky
Comments (0)