Publication View

International Journal of Foundations of Computer Science (2007)

Abstract
The purpose of this article is twofold. First, we show that Prolog's control constructs can be smoothly integrated into a functional language like Haskell. The resulting `language', termed embedded Prolog, incorporates many of the features prescribed by the Prolog ISO standard: control constructs including the cut, all solution collecting functions, and error handling facilities. Embedded Prolog lacks some concepts such as logical variables but it inherits all of Haskell's strengths, eg static polymorphic typing, higher order functions etc. Technically, the integration is achieved using monads and monad transformers. One of the main innovations is the de nition of a backtracking monad transformer, which allows us to combine backtracking with exception handling and interaction. Second, we work towards an axiomatization of the operations, through which the computational features are accessed. Equations are used to lay down the meaning of the various operations and their interrelations enabling the programmer to reason about programs in a simple calculational style. The axiomatization is applied to show that each nite computation has a simple canonical form.

Publication details
Download http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.8.9946
Source http://www.cs.bonn.edu/~ralf/publications/Prolog.ps.gz
Contributors CiteSeerX
Repository CiteSeerX - Scientific Literature Digital Library and Search Engine (United States)
Keywords Prolog, Haskell, axiomatic semantics, monads, monad transformers, continuations
Type text
Language English
Relation 10.1.1.100.9674, 10.1.1.41.840, 10.1.1.22.108, 10.1.1.33.5381, 10.1.1.67.3397, 10.1.1.41.125, 10.1.1.55.9444, 10.1.1.17.268, 10.1.1.30.1355, 10.1.1.47.6555, 10.1.1.47.4828, 10.1.1.48.5674, 10.1.1.38.8777, 10.1.1.36.5857, 10.1.1.138.4552, 10.1.1.20.8118, 10.1.1.31.2885, 10.1.1.45.5455, 10.1.1.45.4594, 10.1.1.60.3002, 10.1.1.46.4353