| | |
Summary: A TypeTheoretic Foundation of
Delimited Continuations +
Zena M. Ariola #
University of Oregon
Hugo Herbelin
INRIAFuturs
Amr Sabry §
Indiana University
Abstract. There is a correspondence between classical logic and programming lan
guage calculi with firstclass continuations. With the addition of control delimiters,
the continuations become composable and the calculi are believed to become more
expressive. We formalise that the addition of control delimiters corresponds to the
addition of a single dynamicallyscoped variable modelling the special toplevel con
tinuation. From a type perspective, the dynamicallyscoped variable requires e#ect
annotations. From a logic perspective, the e#ect annotations can be understood in
a standard logic extended with the dual of implication, namely subtraction.
Keywords: callcc, monad, prompt, reset, shift, subcontinuation, subtraction
1. Introduction
Programming practice suggests that control operators add expressive
power to purely functional languages. For example, control operators
|