Results 1 - 10
of
11
On Exceptions versus Continuations in the Presence of State
- Programming Languages and Systems, 9th European Symposium on Programming, ESOP 2000,, number 1782 in LNCS
, 2000
"... . We compare the expressive power of exceptions and continuations when added to a language with local state in the setting of operational semantics. Continuations are shown to be more expressive than exceptions because they can cause a function call to return more than once, whereas exceptions only ..."
Abstract
-
Cited by 14 (3 self)
- Add to MetaCart
. We compare the expressive power of exceptions and continuations when added to a language with local state in the setting of operational semantics. Continuations are shown to be more expressive than exceptions because they can cause a function call to return more than once, whereas exceptions only allow discarding part of the calling context. 1 Introduction Exceptions are part of nearly all modern programming languages, including mainstream ones like Java and C++. Continuations are present only in Scheme and the New Jersey dialect of ML, yet are much more intensely studied by theoreticians and logicians. The relationship between exceptions and continuations is not as widely understood as one would hope, partly because continuations, though in some sense canonical, are more powerful than would at rst appear, and because the control aspect of exceptions can be obscured by intricacies of typing and syntax. We have recently shown that exceptions and continuations, when added to a purely...
Using a Continuation Twice and Its Implications for the Expressive Power of Call/cc
, 1998
"... . We study the implications for the expressive power of call/cc of upward continuations, specifically the idiom of using a continuation twice. Although such control effects were known to Landin and Reynolds when they invented J and escape, the forebears of call/cc, they still act as a conceptual pit ..."
Abstract
-
Cited by 11 (3 self)
- Add to MetaCart
. We study the implications for the expressive power of call/cc of upward continuations, specifically the idiom of using a continuation twice. Although such control effects were known to Landin and Reynolds when they invented J and escape, the forebears of call/cc, they still act as a conceptual pitfall for some attempts to reason about continuations. We use this idiom to refute some recent conjectures about equivalences in a language with continuations, but no other effects. This shows that first-class continuations as given by call/cc have greater expressive power than one would expect from goto or exits. Keywords: call/cc, continuations, upward continuations, expressiveness, program equivalence. 1. Introduction You can enter a room once, and yet leave it twice. (Peter Landin) A common informal explanation of continuations is the comparison with forward goto. This is in some sense a very apt simile: forward gotos obviously do not give rise to loops, and continuations, without some ...
Typed Exceptions and Continuations Cannot Macro-Express Each Other
, 1999
"... The most powerful control constructs in modern programming languages are continuations and exceptions. Although they can be used interchangeably in some cases, they are fundamentally different semantically. We consider two simply-typed functional languages with exceptions and continuations, respec ..."
Abstract
-
Cited by 8 (2 self)
- Add to MetaCart
The most powerful control constructs in modern programming languages are continuations and exceptions. Although they can be used interchangeably in some cases, they are fundamentally different semantically. We consider two simply-typed functional languages with exceptions and continuations, respectively. We give theorems, one that holds in the language with exceptions and one that holds in the language with continuations. A fortiori, these theorems imply that exception constructs cannot be used to macro-express continuation constructs, and that continuation constructs cannot be used to macro-express exception constructs.
Strong Normalizability of the Non-deterministic Catch/Throw Calculi
- Theoretical Computer Science
"... The catch/throw mechanism in Common Lisp provides a simple control mechanism for non-local exit. We study typed calculi by Nakano and Sato which formalize the catch/throw mechanism. These calculi correspond to classical logic through the Curry-Howard isomorphism, and one of their characteristic poin ..."
Abstract
-
Cited by 5 (1 self)
- Add to MetaCart
The catch/throw mechanism in Common Lisp provides a simple control mechanism for non-local exit. We study typed calculi by Nakano and Sato which formalize the catch/throw mechanism. These calculi correspond to classical logic through the Curry-Howard isomorphism, and one of their characteristic points is that they have nondeterministic reduction rules. These calculi can represent various computational meaning of classical proofs. This paper is mainly concerned with the strong normalizability of these calculi. Namely, we prove the strong normalizability of these calculi, which was an open problem. We first formulate a non-deterministic variant of Parigot's -calculus, and show it is strongly normalizing. We then translate the catch/throw calculi to this variant. Since the translation preserves typing and reduction, we obtain the strong normalization of the catch/throw calculi. We also briefly consider second-order extension of the catch/throw calculi.
A Classical Catch/Throw Calculus with Tag Abstractions and its Strong Normalizability
- Proc. the 4th Australasian Theory Symposium, volume 20-3 of Australian Computer Science Communications
, 1998
"... ions and its Strong Normalizability Yukiyoshi Kameyama and Masahiko Sato Department of Information Science, Kyoto University fkameyama,masahikog@kuis.kyoto-u.ac.jp Abstract. The catch and throw constructs in Common Lisp provides a means to implement non-local exits. Nakano proposed a calculus L c= ..."
Abstract
-
Cited by 5 (1 self)
- Add to MetaCart
ions and its Strong Normalizability Yukiyoshi Kameyama and Masahiko Sato Department of Information Science, Kyoto University fkameyama,masahikog@kuis.kyoto-u.ac.jp Abstract. The catch and throw constructs in Common Lisp provides a means to implement non-local exits. Nakano proposed a calculus L c=t which has inference rules for the catch and throw constructs, and whose types correspond to the intuitionistic propositional logic. He introduced the tag-abstraction/application mechanism into L c=t , which is useful to approximately represent the dynamic behavior of tags. This paper examines the calculus LK c=t , a classicalized version of L c=t . In LK c=t , we can write many programming examples which are not expressible in L c=t , moreover, algorithmic contents can be extracted from classical proofs in LK c=t . We also prove several interesting properties of LK c=t including the strong normalizability. We point out that, if we naively apply the well-known reducibility method, the ta...
Exceptions, Continuations and Macro-Expressiveness
- LNCS 2305
, 2002
"... This paper studies the dierences between exceptions and continuations via the problem of expressing exceptions using rst-class continuations in a functional-imperative language. The main result is that exceptions cannot be macro-expressed using rst-class continuations and references (contrary to ..."
Abstract
-
Cited by 4 (0 self)
- Add to MetaCart
This paper studies the dierences between exceptions and continuations via the problem of expressing exceptions using rst-class continuations in a functional-imperative language. The main result is that exceptions cannot be macro-expressed using rst-class continuations and references (contrary to \folklore"). This is shown using two kinds of counterexample. The rst consists of two terms which are equivalent with respect to contexts containing continuations and references, but which can be distinguished using exceptions. It is shown, however, that there are no such terms which do not contain callcc. However, there is a 1 sentence of rst-order logic which is satised when interpreted in the domain of programs containing continuations and references but not satised in the domain of programs with exceptions and references.
Contrasting Exceptions and Continuations
, 2001
"... Exceptions and first-class continuations are the most powerful forms of control in programming languages. While both are a form of non-local jumping, there is a fundamental difference between them. We formalize this difference by proving a contextual equivalence that holds in the presence of excepti ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
Exceptions and first-class continuations are the most powerful forms of control in programming languages. While both are a form of non-local jumping, there is a fundamental difference between them. We formalize this difference by proving a contextual equivalence that holds in the presence of exceptions, but not continuations; and conversely, we prove an equivalence that holds in the presence of continuations, but not exceptions. By the same technique, we show that exceptions and continuations together do not give rise to state, and that exceptions and state do not give rise to continuations.
Return Types for Functional Continuations
, 1998
"... We study the typing of control operators in a language with an ML-style type system. We ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
We study the typing of control operators in a language with an ML-style type system. We
The λμ-calculus: Function and Control
, 1998
"... Parigot's -calculus is an intriguing extension of the typed -calculus which corresponds via the Curry-Howard correspondence to classical logic. Following the seminal work of Grin, it is known that certain control operators can be given types which, when viewed as formulae, are classical but not i ..."
Abstract
- Add to MetaCart
Parigot's -calculus is an intriguing extension of the typed -calculus which corresponds via the Curry-Howard correspondence to classical logic. Following the seminal work of Grin, it is known that certain control operators can be given types which, when viewed as formulae, are classical but not intuitionistic tautologies. Previous computational explanations of the -calculus have simply translated terms into an existing control calculus, or presented an operational semantics from which it is hard to determine what is going on. In particular the treatment of a call-by-value strategy has appeared problematic.
Languages
"... This paper presents a novel, type-based exception analysis for EC (an Exception Calculus)—a higher-order, typed programming language with first-class, Java-style exceptions. EC exceptions are predeclared and are subject to a nominal subtyping relation. Every exception has its own type, and generic e ..."
Abstract
- Add to MetaCart
This paper presents a novel, type-based exception analysis for EC (an Exception Calculus)—a higher-order, typed programming language with first-class, Java-style exceptions. EC exceptions are predeclared and are subject to a nominal subtyping relation. Every exception has its own type, and generic exception handling is performed by handling a supertype of all applicable exceptions. Typing is based on result contexts, which are are analogous to the multiple-conclusion succedents in Gentzen’s LK. This paper proves the syntactic soundness of EC, and presents a shallow embedding of EC types and judgments in LK. The embedding gives rise to a pleasant interpretation of subtyping as logical consequence. Categories and Subject Descriptors F.4.1 [Mathematical Logic]:

