Results 1  10
of
39
Notions of Computation and Monads
, 1991
"... The i.calculus is considered a useful mathematical tool in the study of programming languages, since programs can be identified with Iterms. However, if one goes further and uses bnconversion to prove equivalence of programs, then a gross simplification is introduced (programs are identified with ..."
Abstract

Cited by 733 (15 self)
 Add to MetaCart
The i.calculus is considered a useful mathematical tool in the study of programming languages, since programs can be identified with Iterms. However, if one goes further and uses bnconversion to prove equivalence of programs, then a gross simplification is introduced (programs are identified with total functions from calues to values) that may jeopardise the applicability of theoretical results, In this paper we introduce calculi. based on a categorical semantics for computations, that provide a correct basis for proving equivalence of programs for a wide range of notions of computation.
Computational LambdaCalculus and Monads
, 1988
"... The calculus is considered an useful mathematical tool in the study of programming languages, since programs can be identified with terms. However, if one goes further and uses fijconversion to prove equivalence of programs, then a gross simplification 1 is introduced, that may jeopardise the ..."
Abstract

Cited by 441 (6 self)
 Add to MetaCart
The calculus is considered an useful mathematical tool in the study of programming languages, since programs can be identified with terms. However, if one goes further and uses fijconversion to prove equivalence of programs, then a gross simplification 1 is introduced, that may jeopardise the applicability of theoretical results to real situations. In this paper we introduce a new calculus based on a categorical semantics for computations. This calculus provides a correct basis for proving equivalence of programs, independent from any specific computational model. 1 Introduction This paper is about logics for reasoning about programs, in particular for proving equivalence of programs. Following a consolidated tradition in theoretical computer science we identify programs with the closed terms, possibly containing extra constants, corresponding to some features of the programming language under consideration. There are three approaches to proving equivalence of programs: ffl T...
A FormulaeasTypes Notion of Control
 In Conference Record of the Seventeenth Annual ACM Symposium on Principles of Programming Languages
, 1990
"... The programming language Scheme contains the control construct call/cc that allows access to the current continuation (the current control context). This, in effect, provides Scheme with firstclass labels and jumps. We show that the wellknown formulaeastypes correspondence, which relates a constr ..."
Abstract

Cited by 235 (0 self)
 Add to MetaCart
The programming language Scheme contains the control construct call/cc that allows access to the current continuation (the current control context). This, in effect, provides Scheme with firstclass labels and jumps. We show that the wellknown formulaeastypes correspondence, which relates a constructive proof of a formula ff to a program of type ff, can be extended to a typed Idealized Scheme. What is surprising about this correspondence is that it relates classical proofs to typed programs. The existence of computationally interesting "classical programs"  programs of type ff, where ff holds classically, but not constructively  is illustrated by the definition of conjunctive, disjunctive, and existential types using standard classical definitions. We also prove that all evaluations of typed terms in Idealized Scheme are finite.
Reasoning about Programs in ContinuationPassing Style
 Lisp and Symbolic Computation
"... Plotkin's v calculus for callbyvalue programs is weaker than the fij calculus for the same programs in continuationpassing style (CPS). To identify the callby value axioms that correspond to fij on CPS terms, we define a new CPS transformation and an inverse mapping, both of which are interes ..."
Abstract

Cited by 161 (13 self)
 Add to MetaCart
Plotkin's v calculus for callbyvalue programs is weaker than the fij calculus for the same programs in continuationpassing style (CPS). To identify the callby value axioms that correspond to fij on CPS terms, we define a new CPS transformation and an inverse mapping, both of which are interesting in their own right. Using the new CPS transformation, we determine the precise language of CPS terms closed under fijtransformations, as well as the callbyvalue axioms that correspond to the socalled administrative fijreductions on CPS terms. Using the inverse mapping, we map the remaining fi and j equalities on CPS terms to axioms on callbyvalue terms. On the pure (constant free) set ofterms, the resulting set of axioms is equivalent to Moggi's computational calculus. If the callbyvalue language includes the control operators abort and callwithcurrentcontinuation, the axioms are equivalent to an extension of Felleisen et al.'s vCcalculus and to the equational subtheory of Talcott's logic IOCC. Contents 1 Compiling with and without Continuations 4 2 : Calculi and Semantics 7 3 The Origins and Practice of CPS 10 3.1 The Original Encoding : : : : : : : : : : : : : : : : : : : : : 10 3.2 The Universe of CPS Terms : : : : : : : : : : : : : : : : : : 11 4 A Compacting CPS Transformation 13
Cooperative Task Management without Manual Stack Management or, Eventdriven Programming is Not the Opposite of Threaded Programming
 In Proceedings of the 2002 Usenix ATC
, 2002
"... Cooperative task management can provide program architects with ease of reasoning about concurrency issues. This property is often espoused by those who recommend "eventdriven" programming over "multithreaded " programming. Those terms conflate several issues. In this paper, we clarify the issues, ..."
Abstract

Cited by 100 (0 self)
 Add to MetaCart
Cooperative task management can provide program architects with ease of reasoning about concurrency issues. This property is often espoused by those who recommend "eventdriven" programming over "multithreaded " programming. Those terms conflate several issues. In this paper, we clarify the issues, and show how one can get the best of both worlds: reason more simply about concurrency in the way "eventdriven" advocates recommend, while preserving the readability and maintainability of code associated with "multithreaded" programming. We identify the source of confusion about the two programming styles as a conflation of two concepts: task management and stack management. Those two concerns define a twoaxis space in which "multithreaded" and "eventdriven" programming are diagonally opposite; there is a third "sweet spot" in the space that combines the advantages of both programming styles. We point out pitfalls in both alternative forms of stack management, manual and automatic, and we supply techniques that mitigate the danger in the automatic case. Finally, we exhibit adaptors that enable automatic stack management code and manual stack management code to interoperate in the same code base.
Typing FirstClass Continuations in ML
, 1992
"... An extension of ML with continuation primitives similar to those found in Scheme is considered. A number of alternative type systems are discussed, and several programming examples are given. A continuationbased operational semantics is defined for a small, purely functional, language, and the soun ..."
Abstract

Cited by 93 (14 self)
 Add to MetaCart
An extension of ML with continuation primitives similar to those found in Scheme is considered. A number of alternative type systems are discussed, and several programming examples are given. A continuationbased operational semantics is defined for a small, purely functional, language, and the soundness of the DamasMilner polymorphic type assignment system with respect to this semantics is proved. The full DamasMilner type system is shown to be unsound in the presence of firstclass continuations. Restrictions on polymorphism similar to those introduced in connection with reference types are shown to suffice for soundness. 1 Introduction Firstclass continuations are a simple and natural way to provide access to the flow of evaluation in functional languages. The ability to seize the "current continuation" (control state of the evaluator) provides a simple and natural basis for defining numerous higherlevel constructs such as coroutines [22], exceptions [41], and logic variables [...
Representing control: a study of the CPS transformation
, 1992
"... This paper investigates the transformation of v terms into continuationpassing style (CPS). We show that by appropriate jexpansion of Fischer and Plotkin's twopass equational specification of the CPS transform, we can obtain a static and contextfree separation of the result terms into "esse ..."
Abstract

Cited by 81 (7 self)
 Add to MetaCart
This paper investigates the transformation of v terms into continuationpassing style (CPS). We show that by appropriate jexpansion of Fischer and Plotkin's twopass equational specification of the CPS transform, we can obtain a static and contextfree separation of the result terms into "essential" and "administrative" constructs. Interpreting the former as syntax builders and the latter as directly executable code, we obtain a simple and efficient onepass transformation algorithm, easily extended to conditional expressions, recursive definitions, and similar constructs. This new transformation algorithm leads to a simpler proof of Plotkin's simulation and indifference results. Further we show how CPSbased control operators similar to but more general than Scheme's call/cc can be naturally accommodated by the new transformation algorithm. To demonstrate the expressive power of these operators, we use them to present an equivalent but even more concise formulation of t...
Explicit Polymorphism and CPS Conversion
 IN TWENTIETH ACM SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES
, 1992
"... We study the typing properties of CPS conversion for an extension of F ! with control operators. Two classes of evaluation strategies are considered, each with callbyname and callbyvalue variants. Under the "standard" strategies, constructor abstractions are values, and constructor applications ..."
Abstract

Cited by 68 (9 self)
 Add to MetaCart
We study the typing properties of CPS conversion for an extension of F ! with control operators. Two classes of evaluation strategies are considered, each with callbyname and callbyvalue variants. Under the "standard" strategies, constructor abstractions are values, and constructor applications can lead to nontrivial control effects. In contrast, the "MLlike" strategies evaluate beneath constructor abstractions, reflecting the usual interpretation of programs in languages based on implicit polymorphism. Three continuation passing style sublanguages are considered, one on which the standard strategies coincide, one on which the MLlike strategies coincide, and one on which all the strategies coincide. Compositional, typepreserving CPS transformation algorithms are given for the standard strategies, resulting in terms on which all evaluation strategies coincide. This has as a corollary the soundness and termination of welltyped programs under the standard evaluation strategies. A similar result is obtained for the MLlike callbyname strategy. In contrast, such results are obtained for the callby value MLlike strategy only for a restricted sublanguage in which constructor abstractions are limited to values.
Reasoning with Continuations II: Full Abstraction for Models of Control
 In Proceedings of the 1990 ACM Conference on Lisp and Functional Programming
, 1990
"... A fully abstract model of a programming language assigns the same meaning to two terms if and only if they have the same operational behavior. Such models are wellknown for functional languages but little is known about extended functional languages with sophisticated control structures. We show th ..."
Abstract

Cited by 32 (4 self)
 Add to MetaCart
A fully abstract model of a programming language assigns the same meaning to two terms if and only if they have the same operational behavior. Such models are wellknown for functional languages but little is known about extended functional languages with sophisticated control structures. We show that a direct model with error values and the conventional continuation model are adequate for functional languages augmented with first and higherorder control facilities, respectively. Furthermore, both models become fully abstract on adding a control delimiter and a parallel conditional to the programming languages.
Extensible Denotational Language Specifications
 SYMPOSIUM ON THEORETICAL ASPECTS OF COMPUTER SOFTWARE, NUMBER 789 IN LNCS
, 1994
"... Traditional denotational semantics assigns radically different meanings to one and the same phrase depending on the rest of the programming language. If the language is purely functional, the denotation of a numeral is a function from environments to integers. But, in a functional language with impe ..."
Abstract

Cited by 32 (5 self)
 Add to MetaCart
Traditional denotational semantics assigns radically different meanings to one and the same phrase depending on the rest of the programming language. If the language is purely functional, the denotation of a numeral is a function from environments to integers. But, in a functional language with imperative control operators, a numeral denotes a function from environments and continuations to integers. This paper introduces a new format for denotational language specifications, extended direct semantics, that accommodates orthogonal extensions of a language without changing the denotations of existing phrases. An extended direct semantics always maps a numeral to the same denotation: the injection of the corresponding number into the domain of values. In general, the denotation of a phrase in a functional language is always a projection of the denotation of the same phrase in the semantics of an extended languageno matter what the extension is. Based on extended direct semantics, i...