Results 11 - 20
of
28
Embedded probabilistic programming
- In Working conf. on domain specific lang
, 2009
"... Abstract. Two general techniques for implementing a domain-specific language (DSL) with less overhead are the finally-tagless embedding of object programs and the direct-style representation of side effects. We use these techniques to build a DSL for probabilistic programming, for expressing countab ..."
Abstract
-
Cited by 12 (3 self)
- Add to MetaCart
Abstract. Two general techniques for implementing a domain-specific language (DSL) with less overhead are the finally-tagless embedding of object programs and the direct-style 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 Library of High Level Control Operators
- Lisp Pointers, ACM SIGPLAN Special Interest Publ. on Lisp
, 1993
"... Numerous high-level control operators, with various properties, exist in the literature. To understand or compare them is difficult since their definitions use quite different theoretical frameworks; moreover, to our knowledge, no implementation offers them all. This paper tries to explain control o ..."
Abstract
-
Cited by 11 (0 self)
- Add to MetaCart
Numerous high-level control operators, with various properties, exist in the literature. To understand or compare them is difficult since their definitions use quite different theoretical frameworks; moreover, to our knowledge, no implementation offers them all. This paper tries to explain control operators by the often simple stack manipulation they perform. We therefore present what we think these operators are, in an executable framework derived from abstract continuations. This library is published in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For instance, we do not claim our implementation to be faithful nor we attempt to formally derive these implementations from their original definitions. The goal is to give a flavor of what control operators are, from an implementation point of view. Last but worth to say, all errors are mine. Among the many existing control operators, w...
A Monadic Framework for Delimited Continuations
- UNDER CONSIDERATION FOR PUBLICATION IN J. FUNCTIONAL PROGRAMMING
"... Delimited continuations are more expressive than traditional abortive continuations and they apparently require a framework beyond traditional continuation-passing style (CPS). We show that this is not the case: standard CPS is sufficient to explain the common control operators for delimited continu ..."
Abstract
-
Cited by 10 (2 self)
- Add to MetaCart
Delimited continuations are more expressive than traditional abortive continuations and they apparently require a framework beyond traditional continuation-passing style (CPS). We show that this is not the case: standard CPS is sufficient to explain the common control operators for delimited continuations. We demonstrate this fact and present an implementation as a Scheme library. We then investigate a typed account of delimited continuations that makes explicit where control effects can occur. This results in a monadic framework for typed and encapsulated delimited continuations, which we design and implement as a Haskell library.
Threads Yield Continuations
- Lisp and Symbolic Computation
, 1997
"... . Just as a traditional continuation represents the rest of a computation from a given point in the computation, a subcontinuation represents the rest of a subcomputation from a given point in the subcomputation. Subcontinuations are more expressive than traditional continuations and have been show ..."
Abstract
-
Cited by 7 (0 self)
- Add to MetaCart
. Just as a traditional continuation represents the rest of a computation from a given point in the computation, a subcontinuation represents the rest of a subcomputation from a given point in the subcomputation. Subcontinuations are more expressive than traditional continuations and have been shown to be useful for controlling tree-structured concurrency, yet they have previously been implemented only on uniprocessors. This article describes a concurrent implementation of one-shot subcontinuations. Like oneshot continuations, one-shot subcontinuations are first-class but may be invoked at most once, a restriction obeyed by nearly all programs that use continuations. The techniques used to implement one-shot subcontinuations may be applied directly to other one-shot continuation mechanisms and may be generalized to support multi-shot continuations as well. A novel feature of the implementation is that continuations are implemented in terms of threads. Because the implementation model ...
A monadic framework for subcontinuations
, 2005
"... Abstract. Functional and delimited continuations are more expressive than traditional abortive continuations and they apparently seem to require a framework beyond traditional continuation or monadic semantics. We show that this is not the case: standard continuation semantics is sufficient to expla ..."
Abstract
-
Cited by 4 (0 self)
- Add to MetaCart
Abstract. Functional and delimited continuations are more expressive than traditional abortive continuations and they apparently seem to require a framework beyond traditional continuation or monadic semantics. We show that this is not the case: standard continuation semantics is sufficient to explain directly the common control operators for delimited continuations. This implies a monadic framework for typed and encapsulated functional and delimited continuations which we design and implement as a Haskell library.
On some Functional Aspects of Control
- Program Methodology Group, University of Göteborg and Chalmers University of Technology
, 1988
"... This paper points out and illustrates continuations as functions abstracting a delimited context instead of an unlimited one. When made available in an expression language, they provide a functional abstraction of control that can be used as any ordinary function. This approach sheds some light on t ..."
Abstract
-
Cited by 3 (2 self)
- Add to MetaCart
This paper points out and illustrates continuations as functions abstracting a delimited context instead of an unlimited one. When made available in an expression language, they provide a functional abstraction of control that can be used as any ordinary function. This approach sheds some light on the applicative aspects of continuations by getting rid of their imperative part: escaping. Continuations are made available as true, composable, and statically typable functions. They abstract a delimited context and their use is restricted to where necessary, in contrast to continuation-passing style. This setting has been developed under applicative order. Work is going on transposing it to another reduction order. This paper is organized as follows. The imperative aspects of continuations first are stressed. We develop on currying the definition of list catenation. Expressing it with an accumulator leads to continuation-passing style. The definition is turned back to direct style with acc...
Monolingual Probabilistic Programming Using Generalized Coroutines
"... Probabilistic programming languages and modeling toolkits are two modular ways to build and reuse stochastic models and inference procedures. Combining strengths of both, we express models and inference as generalized coroutines in the same general-purpose language. We use existing facilities of the ..."
Abstract
-
Cited by 3 (1 self)
- Add to MetaCart
Probabilistic programming languages and modeling toolkits are two modular ways to build and reuse stochastic models and inference procedures. Combining strengths of both, we express models and inference as generalized coroutines in the same general-purpose language. We use existing facilities of the language, such as rich libraries, optimizing compilers, and types, to develop concise, declarative, and realistic models with competitive performance on exact and approximate inference. In particular, a wide range of models can be expressed using memoization. Because deterministic parts of models run at full speed, custom inference procedures are trivial to incorporate, and inference procedures can reason about themselves without interpretive overhead. Within this framework, we introduce a new, general algorithm for importance sampling with look-ahead. 1

