A Dynamic Continuation-Passing Style for Dynamic Delimited Continuations

2015 ◽  
Vol 38 (1) ◽  
pp. 1-25
Author(s):  
Dariusz Biernacki ◽  
Olivier Danvy ◽  
Kevin Millikin
2008 ◽  
Vol 4 ◽  
pp. 182-192 ◽  
Author(s):  
Takuo Yonezawa ◽  
Yukiyoshi Kameyama

2003 ◽  
Vol 10 (25) ◽  
Author(s):  
Dariusz Biernacki ◽  
Olivier Danvy

Starting from a continuation-based interpreter for a simple logic programming language, propositional Prolog with cut, we derive the corresponding logic engine in the form of an abstract machine. The derivation originates in previous work (our article at PPDP 2003) where it was applied to the lambda-calculus. The key transformation here is Reynolds's defunctionalization that transforms a tail-recursive, continuation-passing interpreter into a transition system, i.e., an abstract machine. Similar denotational and operational semantics were studied by de Bruin and de Vink in previous work (their article at TAPSOFT 1989), and we compare their study with our derivation. Additionally, we present a direct-style interpreter of propositional Prolog expressed with control operators for delimited continuations.<br /><br />Superseded by BRICS-RS-04-5.


Author(s):  
JONATHAN IMMANUEL BRACHTHÄUSER ◽  
PHILIPP SCHUSTER ◽  
KLAUS OSTERMANN

Abstract Effect handlers are a promising way to structure effectful programs in a modular way. We present the Scala library Effekt, which is centered around capability passing and implemented in terms of a monad for multi-prompt delimited continuations. Effekt is the first library implementation of effect handlers that supports effect safety and effect polymorphism without resorting to type-level programming. We describe a novel way of achieving effect safety using intersection types and path-dependent types. The effect system of our library design fits well into the programming paradigm of capability passing and is inspired by the effect system of Zhang & Myers (2019, Proc. ACM Program. Lang.3(POPL), 5:1-5:29). Capabilities carry an abstract type member, which represents an individual effect type and reflects the use of the capability on the type level. We represent effect rows as the contravariant intersection of effect types. Handlers introduce capabilities and remove components of the intersection type. Reusing the existing type system of Scala, we get effect subtyping and effect polymorphism for free.


2009 ◽  
Vol 44 (9) ◽  
pp. 317-328 ◽  
Author(s):  
Tiark Rompf ◽  
Ingo Maier ◽  
Martin Odersky

Sign in / Sign up

Export Citation Format

Share Document