Results 1  10
of
13
Deriving Backtracking Monad Transformers
 In The International Conference on Functional Programming (ICFP
, 2000
"... In a paper about pretty printing J. Hughes introduced two fundamental techniques for deriving programs from their specication, where a specication consists of a signature and properties that the operations of the signature are required to satisfy. Briey, the rst technique, the term implementation, r ..."
Abstract

Cited by 39 (3 self)
 Add to MetaCart
In a paper about pretty printing J. Hughes introduced two fundamental techniques for deriving programs from their specication, where a specication consists of a signature and properties that the operations of the signature are required to satisfy. Briey, the rst technique, the term implementation, represents the operations by terms and works by dening a mapping from operations to observations  this mapping can be seen as dening a simple interpreter. The second, the contextpassing implementation, represents operations as functions from their calling context to observations. We apply both techniques to derive a backtracking monad transformer that adds backtracking to an arbitrary monad. In addition to the usual backtracking operations  failure and nondeterministic choice  the prolog cut and an operation for delimiting the eect of a cut are supported. Categories and Subject Descriptors D.1.1 [Programming Techniques]: Applicative (Functional) Programming; D.3.2 [Programming La...
Monadic Constraint Programming
, 2009
"... A constraint programming system combines two essential components: a constraint solver and a search engine. The constraint solver reasons about satisfiability of conjunctions of constraints, and the search engine controls the search for solutions by iteratively exploring a disjunctive search tree de ..."
Abstract

Cited by 27 (14 self)
 Add to MetaCart
(Show Context)
A constraint programming system combines two essential components: a constraint solver and a search engine. The constraint solver reasons about satisfiability of conjunctions of constraints, and the search engine controls the search for solutions by iteratively exploring a disjunctive search tree defined by the constraint program. In this paper we give a monadic definition of constraint programming where the solver is defined as a monad threaded through the monadic search tree. We are then able to define search and search strategies as first class objects that can themselves be built or extended by composable search transformers. Search transformers give a powerful and unifying approach to viewing search in constraint programming, and the resulting constraint programming system is first class and extremely flexible.
On the tighter integration of functional and logic programming
, 2007
"... Abstract. The integration of functional and logic programming is a well developed field of research. We discuss that the integration could be improved significantly in two separate aspects: sharing computations across nondeterministic branching and the declarative encapsulation of logic search. We ..."
Abstract

Cited by 24 (3 self)
 Add to MetaCart
(Show Context)
Abstract. The integration of functional and logic programming is a well developed field of research. We discuss that the integration could be improved significantly in two separate aspects: sharing computations across nondeterministic branching and the declarative encapsulation of logic search. We then present a formal approach which shows how these improvements can be realized and prove the soundness of our approach. 1
Just do it: Simple monadic equational reasoning
 In Proceedings of the 16th International Conference on Functional Programming (ICFP’11
, 2011
"... One of the appeals of pure functional programming is that it is so amenable to equational reasoning. One of the problems of pure functional programming is that it rules out computational effects. Moggi and Wadler showed how to get round this problem by using monads to encapsulate the effects, leadin ..."
Abstract

Cited by 13 (1 self)
 Add to MetaCart
(Show Context)
One of the appeals of pure functional programming is that it is so amenable to equational reasoning. One of the problems of pure functional programming is that it rules out computational effects. Moggi and Wadler showed how to get round this problem by using monads to encapsulate the effects, leading in essence to a phase distinction—a pure functional evaluation yielding an impure imperative computation. Still, it has not been clear how to reconcile that phase distinction with the continuing appeal of functional programming; does the impure imperative part become inaccessible to equational reasoning? We think not; and to back that up, we present a simple axiomatic approach to reasoning about programs with computational effects.
Improving Lazy NonDeterministic Computations by Demand Analysis
, 2012
"... Functional logic languages combine lazy (demanddriven) evaluation strategies from functional programming with nondeterministic computations from logic programming. The lazy evaluation of nondeterministic subexpressions results in a demanddriven exploration of the search space: if the value of so ..."
Abstract

Cited by 3 (2 self)
 Add to MetaCart
Functional logic languages combine lazy (demanddriven) evaluation strategies from functional programming with nondeterministic computations from logic programming. The lazy evaluation of nondeterministic subexpressions results in a demanddriven exploration of the search space: if the value of some subexpression is not required, the complete search space connected to it is not explored. On the other hand, this improvement could cause efficiency problems if unevaluated subexpressions are duplicated and later evaluated in different parts of a program. In order to improve the execution behavior in such situations, we propose a program analysis that guides a program transformation to avoid such inefficiencies. We demonstrate the positive effects of this program transformation with KiCS2, a recent highly efficient implementation of the functional logic programming language Curry.
Search Strategies for Functional Logic Programming
"... Abstract: In this paper we discuss our practical experiences with the use of different search strategies in functional logic programs. In particular, we show that complete strategies, like breadthfirst search or iterative deepening search, are a viable alternative to incomplete strategies, like dep ..."
Abstract

Cited by 2 (2 self)
 Add to MetaCart
Abstract: In this paper we discuss our practical experiences with the use of different search strategies in functional logic programs. In particular, we show that complete strategies, like breadthfirst search or iterative deepening search, are a viable alternative to incomplete strategies, like depthfirst search, that have been favored in the past for logic programming languages. 1
Deriving Monad Transformers
, 1999
"... In a paper about pretty printing J. Hughes introduced two fundamental techniques for deriving programs from their specification, where a specification consists of a signature and properties that the operations of the signature are required to satisfy. Very briefly, the first technique, the term impl ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
In a paper about pretty printing J. Hughes introduced two fundamental techniques for deriving programs from their specification, where a specification consists of a signature and properties that the operations of the signature are required to satisfy. Very briefly, the first technique, the term implementation, represents the operations by terms and works by defining a mapping from operations to observations  this mapping can be seen as defining a simple interpreter. The second, the contextpassing implementation, represents operations as functions from their calling context to observations. We apply both techniques to derive among others a backtracking monad transformer which adds backtracking to an arbitrary monad. In addition to the usual backtracking operations  failure and nondeterministic choice  the prolog cut and an operation for delimiting the effect of a cut are supported. 1 Introduction Why should one derive a program from its specification? Ideally, a derivation ex...
Church numerals, twice!
, 2002
"... This paper explains Church numerals, twice. The first explanation links Church numerals to Peano numerals via the wellknown encoding of data types in the polymorphic λcalculus. This view suggests that Church numerals are folds in disguise. The second explanation, which is more elaborate, but also ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
This paper explains Church numerals, twice. The first explanation links Church numerals to Peano numerals via the wellknown encoding of data types in the polymorphic λcalculus. This view suggests that Church numerals are folds in disguise. The second explanation, which is more elaborate, but also more insightful, derives Church numerals from first principles, that is, from an algebraic specification of addition and multiplication. Additionally, we illustrate the use of the parametricity theorem by proving exponentiation as reverse application correct. 1
Algebras for combinatorial search
 In Workshop on Mathematically Structured Functional Programming
, 2006
"... We show how combinatorial search strategies including depthfirst, breadthfirst and depthbounded search can be viewed as di#erent implementations of a common algebraic specification that emphasises the compositionality of the strategies. This specification is placed in a categorical setting th ..."
Abstract
 Add to MetaCart
We show how combinatorial search strategies including depthfirst, breadthfirst and depthbounded search can be viewed as di#erent implementations of a common algebraic specification that emphasises the compositionality of the strategies. This specification is placed in a categorical setting that combines algebraic specifications and monads.
Under consideration for publication in J. Functional Programming 1 Algebras for combinatorial search
"... Combinatorial search strategies including depthfirst, breadthfirst and depthbounded search are shown to be different implementations of a common algebraic specification that emphasises the compositionality of the strategies. This specification is placed in a categorical setting that combines alge ..."
Abstract
 Add to MetaCart
Combinatorial search strategies including depthfirst, breadthfirst and depthbounded search are shown to be different implementations of a common algebraic specification that emphasises the compositionality of the strategies. This specification is placed in a categorical setting that combines algebraic specifications and monads. 1