Results 1  10
of
28
A CurryHoward foundation for functional computation with control
 In Proceedings of ACM SIGPLANSIGACT Symposium on Principle of Programming Languages
, 1997
"... We introduce the type theory ¯ v , a callbyvalue variant of Parigot's ¯calculus, as a CurryHoward representation theory of classical propositional proofs. The associated rewrite system is ChurchRosser and strongly normalizing, and definitional equality of the type theory is consistent, compatib ..."
Abstract

Cited by 77 (3 self)
 Add to MetaCart
We introduce the type theory ¯ v , a callbyvalue variant of Parigot's ¯calculus, as a CurryHoward representation theory of classical propositional proofs. The associated rewrite system is ChurchRosser and strongly normalizing, and definitional equality of the type theory is consistent, compatible with cut, congruent and decidable. The attendant callbyvalue programming language ¯pcf v is obtained from ¯ v by augmenting it by basic arithmetic, conditionals and fixpoints. We study the behavioural properties of ¯pcf v and show that, though simple, it is a very general language for functional computation with control: it can express all the main control constructs such as exceptions and firstclass continuations. Prooftheoretically the dual ¯ v constructs of naming and ¯abstraction witness the introduction and elimination rules of absurdity respectively. Computationally they give succinct expression to a kind of generic (forward) "jump" operator, which may be regarded as a unif...
Representing Control in the Presence of OneShot Continuations
, 1996
"... Traditional firstclass continuation mechanisms allow a captured continuation to be invoked multiple times. Many continuations, however, are invoked only once. This paper introduces oneshot continuations, shows how they interact with traditional multishot continuations, and describes a stackbase ..."
Abstract

Cited by 46 (3 self)
 Add to MetaCart
Traditional firstclass continuation mechanisms allow a captured continuation to be invoked multiple times. Many continuations, however, are invoked only once. This paper introduces oneshot continuations, shows how they interact with traditional multishot continuations, and describes a stackbased implementation of control that handles both oneshot and multishot continuations. The implementation eliminates the copying overhead for oneshot continuations that is inherent in multishot continuations. 1 Introduction Scheme [5] and some implementations of ML [17] provide continuations as firstclass data objects. Continuations can be used to implement, at the source level, a number of interesting control features, such as loops, nonlocal exits, nonblind backtracking [22], nondeterministic computations [10, 14], and coroutines [7]. Sourcelevel implementations of thread systems [9, 15, 21], especially in the area of graphical user interfaces (GUIs) [12, 13, 20, 23], are an important ...
A SemiFunctional Implementation of a HigherOrder Logic Programming Language
 Topics in Advanced Language Implementation
, 1991
"... ions *) and varbind = Varbind of string * term (* Variable binders , Type *) In the implementation of the term language and the type checker, we have two constants type and pi. And, yes, type is a type, though this could be avoided by introducing universes (see [16]) without any changes to the code ..."
Abstract

Cited by 35 (0 self)
 Add to MetaCart
ions *) and varbind = Varbind of string * term (* Variable binders , Type *) In the implementation of the term language and the type checker, we have two constants type and pi. And, yes, type is a type, though this could be avoided by introducing universes (see [16]) without any changes to the code of the unifier. As is customary, we use A ! B as an abbreviation for \Pix : A: B if x does not occur free in B. Also, however, \Pix : A: B is an abbreviation for the application pi A (x : A: B). In our formulation, then, the constant pi has type \PiA : type: ((A ! type) ! type). As an example consider a predicate constant eq of type \PiA : type: A ! A ! o (where o is the type of formulas as indicated in Section 9). The single clause eqAM M: correctly models equality, that is, a goal of the form eq AM N will succeed if M and N are unifiable. The fact that unification now has to branch can be seen by considering the goal eq int (F 1 1) 1 which has three solutions for the functional logic var...
Screamer: A Portable Efficient Implementation of Nondeterministic Common Lisp
 University of Pennsylvania, Institute for
, 1993
"... Nondeterministic Lisp is a simple extension of Lisp which provides automatic backtracking. Nondeterminism allows concise description of many search tasks which form the basis of much AI research. This paper discusses Screamer, an efficient implementation of nondeterministic Lisp as a fully portab ..."
Abstract

Cited by 32 (4 self)
 Add to MetaCart
Nondeterministic Lisp is a simple extension of Lisp which provides automatic backtracking. Nondeterminism allows concise description of many search tasks which form the basis of much AI research. This paper discusses Screamer, an efficient implementation of nondeterministic Lisp as a fully portable extension of Common Lisp. In this paper we present the basic nondeterministic Lisp constructs, motivate the utility of the language via numerous short examples, and discuss the compilation techniques. Supported in part by an AT&T Bell Laboratories Ph.D. scholarship to the author, by a Presidential Young Investigator Award to Professor Robert C. Berwick under National Science Foundation Grant DCR 85552543, by a grant from the Siemens Corporation, and by the Kapor Family Foundation. Also supported in part by ARO grant DAAL 0389C0031, by DARPA grant N0001490J1863, by NSF grant IRI 90 16592, and by Ben Franklin grant 91S.3078C1 y Supported in part by the Advanced Resea...
Embedded probabilistic programming
 In Working conf. on domain specific lang
, 2009
"... Abstract. Two general techniques for implementing a domainspecific language (DSL) with less overhead are the finallytagless embedding of object programs and the directstyle representation of side effects. We use these techniques to build a DSL for probabilistic programming, for expressing countab ..."
Abstract

Cited by 18 (3 self)
 Add to MetaCart
Abstract. Two general techniques for implementing a domainspecific language (DSL) with less overhead are the finallytagless embedding of object programs and the directstyle representation of side effects. We use these techniques to build a DSL for probabilistic programming, for expressing countable probabilistic models and performing exact inference and importance sampling on them. Our language is embedded as an ordinary OCaml library and represents probability distributions as ordinary OCaml programs. We use delimited continuations to reify probabilistic programs as lazy search trees, which inference algorithms may traverse without imposing any interpretive overhead on deterministic parts of a model. We thus take advantage of the existing OCaml implementation to achieve competitive performance and ease of use. Inference algorithms can easily be embedded in probabilistic programs themselves.
A typetheoretic foundation of delimited continuations. Higher Order Symbol
 Comput
, 2009
"... Abstract. There is a correspondence between classical logic and programming language calculi with firstclass continuations. With the addition of control delimiters, the continuations become composable and the calculi become more expressive. We present a finegrained analysis of control delimiters a ..."
Abstract

Cited by 14 (6 self)
 Add to MetaCart
Abstract. There is a correspondence between classical logic and programming language calculi with firstclass continuations. With the addition of control delimiters, the continuations become composable and the calculi become more expressive. We present a finegrained analysis of control delimiters and formalise that their addition corresponds to the addition of a single dynamicallyscoped variable modelling the special toplevel continuation. From a type perspective, the dynamicallyscoped variable requires effect annotations. In the presence of control, the dynamicallyscoped variable can be interpreted in a purely functional way by applying a storepassing style. At the type level, the effect annotations are mapped within standard classical logic extended with the dual of implication, namely subtraction. A continuationpassingstyle transformation of lambdacalculus with control and subtraction is defined. Combining the translations provides a decomposition of standard CPS transformations for delimited continuations. Incidentally, we also give a direct normalisation proof of the simplytyped lambdacalculus with control and subtraction.
Implementing Functional Logic Languages Using Multiple Threads and Stores
 In Proc. of the Ninth International Conference on Functional Programming (ICFP 2004
, 2004
"... Abstract Recent functional logic languages such as Curry and Toy combinelazy functional programming with logic programming features including logic variables, nondeterminism, unification, narrowing,fair search, concurrency, and residuation. In this paper, we show how to extend a conventional interp ..."
Abstract

Cited by 12 (7 self)
 Add to MetaCart
Abstract Recent functional logic languages such as Curry and Toy combinelazy functional programming with logic programming features including logic variables, nondeterminism, unification, narrowing,fair search, concurrency, and residuation. In this paper, we show how to extend a conventional interpreter for a lazy functional language to handle these features by adding support for reference cells, processlike and threadlike concurrency mechanisms, and a novelform of multiversioned store. Our interpretation scheme is practical, and can be easily extended to perform compilation. The language specified by our interpreter is designed so that programs are deterministic in a novel and useful sense.
Separating concurrent languages with categories of language embeddings
 In Proceedings of the 23 rd Annual ACM Symposium on Theory of Computing
, 1991
"... Concurrent programming enjoys a proliferation of languages but suffers from the lack of a general method of language comparison. In particular, concurrent (as well as sequential) programming languages cannot be usefully distinguished based on complexitytheoretic considerations, since most of them ..."
Abstract

Cited by 12 (1 self)
 Add to MetaCart
Concurrent programming enjoys a proliferation of languages but suffers from the lack of a general method of language comparison. In particular, concurrent (as well as sequential) programming languages cannot be usefully distinguished based on complexitytheoretic considerations, since most of them are Turingcomplete. Nevertheless, differences between programming languages matter, else we would not have invented so many of them. We develop a general method for comparing concurrent programming languages based on their algebraic (structural) complexity, and, using this method, achieve separation results among many wellknown concurrent languages. The method is not restricted to concurrent languages. It can be used to compare the algebraic complexity of abstract machine models, other families of programming languages, logics, and, more generaly, any family of languages with some syntactic operations and a notion of semantic equivalence. The method can also be used to compare the algebraic complexity of families of operations wit hin a language or across languages. We note that using the method we were able to compare languages and computational models that do not have a common semantic basis.
Purely Functional Lazy Nondeterministic Programming
"... Functional logic programming and probabilistic programming have demonstrated the broad benefits of combining laziness (nonstrict evaluation with sharing of the results) with nondeterminism. Yet these benefits are seldom enjoyed in functional programming, because the existing features for nonstric ..."
Abstract

Cited by 12 (3 self)
 Add to MetaCart
Functional logic programming and probabilistic programming have demonstrated the broad benefits of combining laziness (nonstrict evaluation with sharing of the results) with nondeterminism. Yet these benefits are seldom enjoyed in functional programming, because the existing features for nonstrictness, sharing, and nondeterminism in functional languages are tricky to combine. We present a practical way to write purely functional lazy nondeterministic programs that are efficient and perspicuous. We achieve this goal by embedding the programs into existing languages (such as Haskell, SML, and OCaml) with highquality implementations, by making choices lazily and representing data with nondeterministic components, by working with custom monadic data types and search strategies, and by providing equational laws for the programmer to reason about their code.
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 firstclass 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 ...