## Continuations for Parallel Logic Programming (2000)

Venue: | In Proc. of 2nd International ACM-SIGPLAN Conference on Principles and practice of Declarative Programming (PPDP’00 |

Citations: | 4 - 3 self |

### BibTeX

@INPROCEEDINGS{Todoran00continuationsfor,

author = {Eneia Todoran and Nikolaos S. Papaspyrou},

title = {Continuations for Parallel Logic Programming},

booktitle = {In Proc. of 2nd International ACM-SIGPLAN Conference on Principles and practice of Declarative Programming (PPDP’00},

year = {2000},

pages = {257--267},

publisher = {ACM Press}

}

### OpenURL

### Abstract

This paper gives denotational models for three logic programming languages of progressive complexity, adopting the \logic programming without logic" approach. The rst language is the control ow kernel of sequential Prolog, featuring sequential composition and backtracking. A committedchoice concurrent logic language with parallel composition (parallel AND) and don't care nondeterminism is studied next. The third language is the core of Warren's basic Andorra model, combining parallel composition and don't care nondeterminism with two forms of don't know nondeterminism (interpreted as sequential and parallel OR) and favoring deterministic over nondeterministic computation. We show that continuations are a valuable tool in the analysis and design of semantic models for both sequential and parallel logic programming. Instead of using mathematical notation, we use the functional programming language Haskell as a metalanguage for our denotational semantics, and employ monads in order to facilitate the transition from one language under study to another. Keywords Parallel logic programming, basic Andorra model, denotational semantics, continuations, monads, Haskell. 1.

### Citations

1857 |
Foundations of Logic Programming
- Lloyd
- 1987
(Show Context)
Citation Context ...tational semantics, continuations, monads, Haskell. 1. INTRODUCTION The theory and practice of sequential logic programming is now considered well-established, having been studied for several decades =-=[1, 17]-=-. Over these years, researchers have distinguished at least two basic categories of semantics for logic programming: declarative and operational. Following the idea that logic programming is logic + c... |

1313 | Monads for functional programming
- Wadler
- 1993
(Show Context)
Citation Context ...ly a complete rewrite of its formal semantics. The use of monads has been proposed as a remedy and has become quite popular both in the denotational semantics and the functional programming community =-=[20, 3-=-3]. Monads, which are directly supported in Haskell, are used in this paper in order to facilitate the denition of a modular and elegant semantics for the three languages under study in a unied way. A... |

417 |
Logic Programming
- Apt
- 1990
(Show Context)
Citation Context ...tational semantics, continuations, monads, Haskell. 1. INTRODUCTION The theory and practice of sequential logic programming is now considered well-established, having been studied for several decades =-=[1, 17]-=-. Over these years, researchers have distinguished at least two basic categories of semantics for logic programming: declarative and operational. Following the idea that logic programming is logic + c... |

293 | The Oz Programming Model
- Smolka
- 1995
(Show Context)
Citation Context ...guards. Thesrst gives an operational semantics for the Andorra Kernel Language (AKL) [14], whereas the second presents a calculus (also operational in nature) intended as a semantic foundation for Oz =-=[28]. NL2> d (read "") [[["a","d"],["b"],["e"]]] NL2> d (read "a || b") [[["a"],["b"]],[["b"],["a"]]] NL2> d (read "a |-=-| b || c") [[["a"],["b"],["c"]],[["a"],["c"],["b"]],[["b"],["c"],["a"]], [["b"],["a"]... |

270 |
The Family of Concurrent Logic Programming Languages
- Shapiro
- 1989
(Show Context)
Citation Context ...tional and denotational models for both sequential Prolog and parallel logic languages. One of thesrst models of parallel logic programming was implemented in the family of committed-choice languages =-=[26]-=-, well known representatives of which are Concurrent PROLOG [25], PARLOG [13] and Guarded Horn Clauses (GHC) [32]. Committed-choice languages support don't care nondeterminism and the parallel composi... |

165 |
An abstract view of programming languages
- Moggi
- 1990
(Show Context)
Citation Context ...ly a complete rewrite of its formal semantics. The use of monads has been proposed as a remedy and has become quite popular both in the denotational semantics and the functional programming community =-=[20, 3-=-3]. Monads, which are directly supported in Haskell, are used in this paper in order to facilitate the denition of a modular and elegant semantics for the three languages under study in a unied way. A... |

126 |
Algorithm = Logic + Control
- Kowalski
- 1979
(Show Context)
Citation Context ...these years, researchers have distinguished at least two basic categories of semantics for logic programming: declarative and operational. Following the idea that logic programming is logic + control =-=[16]-=-, a number of researchers have found it convenient to dedicate their investigation not to the declarative semantics of logic programming, but rather to the study of the various control ow concepts enc... |

112 | Continuations: A mathematical semantics for handling full jumps
- Strachey, Wadsworth
- 2000
(Show Context)
Citation Context ...e have named this language L0 because we consider it only an appetizer for the parallel logic languages that follow. In the denotational semantics for L0 we use the classic technique of continuations =-=[29, 18]-=-, which has been advocated for capturing the semantics of backtracking of sequential Prolog in various papers [11, 12, 5]. It should be mentioned that numerous other operational and denotational seman... |

82 |
Andorra-I: A Parallel Prolog System that Transparently Exploits both And- and Or-Parallelism
- Costa, Warren, et al.
- 1991
(Show Context)
Citation Context ...vides don't know nondeterminism, with the model of committed-choice languages, the basic Andorra model (BAM) was proposed [34]. BAM, which is also based onsat guards, has been implemented in AndorraI =-=[4]-=-, PANDORA [2] and owes much to P-Prolog [36]. Andorra provides both don't care and don't know nondeterminism. The execution of a don't know choice can be very expensive in practice when it contains mo... |

71 | Kernel Andorra Prolog and its computation model
- Haridi, Janson
(Show Context)
Citation Context ...s formalize implementations of the extended Andorra model, i.e. the extension of the basic Andorra model with deep guards. Thesrst gives an operational semantics for the Andorra Kernel Language (AKL) =-=[14], whereas the second presents a calculus (also operational in nature) intended a-=-s a semantic foundation for Oz [28]. NL2> d (read "") [[["a","d"],["b"],["e"]]] NL2> d (read "a || b") [[["a"],["b"]],[[... |

63 |
Concurrent Prolog and its interpreter
- Shapiro
- 1983
(Show Context)
Citation Context ...rallel logic languages. One of thesrst models of parallel logic programming was implemented in the family of committed-choice languages [26], well known representatives of which are Concurrent PROLOG =-=[25]-=-, PARLOG [13] and Guarded Horn Clauses (GHC) [32]. Committed-choice languages support don't care nondeterminism and the parallel composition of goals. Further descendants of these languages, such as F... |

60 | A Foundation for Higher-order Concurrent Constraint
- Smolka
- 1994
(Show Context)
Citation Context ...rocesses. Operational semantics for languages similar to L2, combining reactive behaviour (related to AND parallelism in logic programming) and search (backtracking and OR parallelism) , are given in =-=[15, 27]-=-. Both papers formalize implementations of the extended Andorra model, i.e. the extension of the basic Andorra model with deep guards. Thesrst gives an operational semantics for the Andorra Kernel Lan... |

43 |
The extended Andorra model with implicit control
- Warren
- 1990
(Show Context)
Citation Context ... One of our next aims is to apply the CSC technique to parallel logic programming languages with deep guards. In doing so, we intend to move from the basic Andorra model to the extended Andorra model =-=[35]-=-, which has been implemented in languages (that incorporate the constraint programming paradigm) like AKL [14, 15] and Oz [27, 28]. Future research will also be directed to the tighter combination of ... |

37 |
Report on the programming language haskell 98, a non-strict, purely functional language
- Jones, Hughes
- 1985
(Show Context)
Citation Context ...nectives are modelled by appropriate operators on processes. Instead of using mathematical notation for the denition of the denotational semantics, we use the functional programming language Haskell [=-=22]-=-. In this way, we allow our denotational semantics to be directly implementable, in the form of an interpreter for the languages under study, and thus to be easily tested and evaluated. At the same ti... |

35 |
Parallel Logic Programming in PARLOG
- Gregory
- 1987
(Show Context)
Citation Context ...languages. One of thesrst models of parallel logic programming was implemented in the family of committed-choice languages [26], well known representatives of which are Concurrent PROLOG [25], PARLOG =-=[13]-=- and Guarded Horn Clauses (GHC) [32]. Committed-choice languages support don't care nondeterminism and the parallel composition of goals. Further descendants of these languages, such as Flat Concurren... |

34 | Continuation semantics for Prolog with cut
- Bruin, Vink
- 1989
(Show Context)
Citation Context ...n the denotational semantics for L0 we use the classic technique of continuations [29, 18], which has been advocated for capturing the semantics of backtracking of sequential Prolog in various papers =-=[11, 12, 5]-=-. It should be mentioned that numerous other operational and denotational semantics for sequential Prolog have been proposed; many of these approaches include extra-logical features, such as cuts and ... |

22 |
non-deterministic parallel logic programming
- Bahgat, Gregory
- 1989
(Show Context)
Citation Context ...now nondeterminism, with the model of committed-choice languages, the basic Andorra model (BAM) was proposed [34]. BAM, which is also based onsat guards, has been implemented in AndorraI [4], PANDORA =-=[2]-=- and owes much to P-Prolog [36]. Andorra provides both don't care and don't know nondeterminism. The execution of a don't know choice can be very expensive in practice when it contains more than one n... |

21 | Guarded Horn Clauses, a parallel logic programming language with the concept of a guard
- Ueda
- 1988
(Show Context)
Citation Context ...parallel logic programming was implemented in the family of committed-choice languages [26], well known representatives of which are Concurrent PROLOG [25], PARLOG [13] and Guarded Horn Clauses (GHC) =-=[32]-=-. Committed-choice languages support don't care nondeterminism and the parallel composition of goals. Further descendants of these languages, such as Flat Concurrent Prolog [19] and Flat GHC [23], are... |

20 | S.: Combinators for logic programming
- Spivey, Seres
(Show Context)
Citation Context ...["f"],["d"],["E","F"],["e"],["f"]], [["b"],["a"],["E","F"],["e"],["C","D&qu=-=ot;],["c"],["d"],["f"],["C","D"],["c"],["d"]]] Figure 3: Example, semantics of L2. A recent work worth mentioning is presented in [24]-=-, where the authors propose an axiomatization of the semantics of logic languages similar to L2, focusing on controlsow concepts. Using a functional library of primitive operators and the equational m... |

15 |
Proving algorithms by tail functions
- Mazurkiewicz
- 1971
(Show Context)
Citation Context ...e have named this language L0 because we consider it only an appetizer for the parallel logic languages that follow. In the denotational semantics for L0 we use the classic technique of continuations =-=[29, 18]-=-, which has been advocated for capturing the semantics of backtracking of sequential Prolog in various papers [11, 12, 5]. It should be mentioned that numerous other operational and denotational seman... |

12 |
Monadic Constructs for Logic Programming
- Bekkers, Tarau
(Show Context)
Citation Context ...t monad has been used for describing the semantics of Prolog's clause unfolding and the advantages of adopting monads in the higher-order logic programming framework of Prolog have been investigated [=-=3]-=-. Our continuation-based approach to the semantics of parallelism in logic programming seems to be new. All papers known to us (including [5, 6, 7, 8, 9]) follow the classic (direct) approach to concu... |

8 |
Comparative metric semantics for concurrent prolog
- Bakker, Kok
- 1990
(Show Context)
Citation Context ...1 is basically equivalent to the core of Flat Concurrent Prolog [19] and Flat GHC [23]. The denotational semantics of L1 can be dened using the classic direct approach to concurrency semantics as in [=-=7, 5]. In-=- our denition, we use the \continuation semantics for concurrency" (CSC) technique introduced in [30]. This technique can model both sequential and parallel composition in interleaving semantics,... |

8 | A study of evaluation order semantics in expressions with side effects
- Papaspyrou, Macos
(Show Context)
Citation Context ...e thesexibility, elegance and modularity of the semantic descriptions. Based on our previous results concerning the interleaved semantics of expression evaluation under an unspeci ed evaluation order =-=[21-=-], we believe that it is possible to dene monads for the CSC technique which would abstract the underlying execution behaviour. 7. ACKNOWLEDGEMENTS We would like to thank the anonymous referees for th... |

8 |
P-Prolog: a Parallel Logic Programming Language
- Yang
- 1987
(Show Context)
Citation Context ...odel of committed-choice languages, the basic Andorra model (BAM) was proposed [34]. BAM, which is also based onsat guards, has been implemented in AndorraI [4], PANDORA [2] and owes much to P-Prolog =-=[36]-=-. Andorra provides both don't care and don't know nondeterminism. The execution of a don't know choice can be very expensive in practice when it contains more than one non failing alternatives, a phen... |

6 | A paradigm for asynchronous communication and its application to concurrent constraint programming., Chapter 4
- Boer, Kok, et al.
- 1993
(Show Context)
Citation Context ...implemented as a \true" parallel composition operator, an interleaving semantics for which has been studied in [31], in the absence of AND parallelism. All other denotational models known to us, =-=e.g. [9, 8]-=-, implement OR parallelism in the context of concurrent (constraint) logic programming as don't care nondeterminism, and each trace corresponds to (at most) one logical solution of the program. Obviou... |

4 |
Experiments with continuation semantics: jumps, backtracking, dynamic networks
- Bruin
- 1986
(Show Context)
Citation Context ...nique introduced in [30]. This technique can model both sequential and parallel composition in interleaving semantics, while providing the general advantages of the classic technique of continuations =-=[10-=-]. Language L2: The basic Andorra model [34] which incorporates parallel composition, don't care nondeterminism and Prolog-like don't know nondeterminism. To the best of our knowledge, no denotationa... |

4 |
Structural operational semantics for kernel andorra prolog
- Haridi, Palamidessi
- 1991
(Show Context)
Citation Context ...rocesses. Operational semantics for languages similar to L2, combining reactive behaviour (related to AND parallelism in logic programming) and search (backtracking and OR parallelism) , are given in =-=[15, 27]-=-. Both papers formalize implementations of the extended Andorra model, i.e. the extension of the basic Andorra model with deep guards. Thesrst gives an operational semantics for the Andorra Kernel Lan... |

2 |
Comparative semantics for of control in logic programming without logic
- Bakker
- 1991
(Show Context)
Citation Context ...ative semantics of logic programming, but rather to the study of the various control ow concepts encountered therein, an approach usually called \logic programming without logic" that is advocate=-=d in [5, 6]-=-. Focusing on controlsow, it is possible to apply techniques used in the theory of programming language semantics and to develop operational and denotational models for both sequential Prolog and para... |

2 | Control semantics. Foundations of Computing Series - Bakker, Vink - 1996 |

2 | Comparative metric semantics for commit in or-parallel logic programming - Todoran, Hartog, et al. - 1997 |

1 |
Nondeterminism and In Computations in Constraint Programming
- Boer, Pierro, et al.
- 1995
(Show Context)
Citation Context ...implemented as a \true" parallel composition operator, an interleaving semantics for which has been studied in [31], in the absence of AND parallelism. All other denotational models known to us, =-=e.g. [9, 8]-=-, implement OR parallelism in the context of concurrent (constraint) logic programming as don't care nondeterminism, and each trace corresponds to (at most) one logical solution of the program. Obviou... |

1 |
The design and implementation of concurrent Prolog
- Mierkovsky, Taylor, et al.
- 1985
(Show Context)
Citation Context ...ded Horn Clauses (GHC) [32]. Committed-choice languages support don't care nondeterminism and the parallel composition of goals. Further descendants of these languages, such as Flat Concurrent Prolog =-=[19]-=- and Flat GHC [23], are based onsat guards. In an attempt to combine the sequential logic programming model of Prolog, which provides don't know nondeterminism, with the model of committed-choice lang... |

1 |
PARLOG 86 and the dinning logicians
- Ringwood
- 1988
(Show Context)
Citation Context ...GHC) [32]. Committed-choice languages support don't care nondeterminism and the parallel composition of goals. Further descendants of these languages, such as Flat Concurrent Prolog [19] and Flat GHC =-=[23]-=-, are based onsat guards. In an attempt to combine the sequential logic programming model of Prolog, which provides don't know nondeterminism, with the model of committed-choice languages, the basic A... |

1 |
Metric semantics for synchronous and assynchronous communication: a continuations based approach
- Todoran
- 2000
(Show Context)
Citation Context ...antics of L1 can be dened using the classic direct approach to concurrency semantics as in [7, 5]. In our denition, we use the \continuation semantics for concurrency" (CSC) technique introduced =-=in [30-=-]. This technique can model both sequential and parallel composition in interleaving semantics, while providing the general advantages of the classic technique of continuations [10]. Language L2: The... |

1 |
The Andorra principle. Talk given at the
- Warren
- 1988
(Show Context)
Citation Context ...attempt to combine the sequential logic programming model of Prolog, which provides don't know nondeterminism, with the model of committed-choice languages, the basic Andorra model (BAM) was proposed =-=[34]-=-. BAM, which is also based onsat guards, has been implemented in AndorraI [4], PANDORA [2] and owes much to P-Prolog [36]. Andorra provides both don't care and don't know nondeterminism. The execution... |

1 | all there is to know about Haskell [22], including several papers on monads, can be found in Haskell's home page (http://haskell.org/). A monad is a triple of the form (m; return; >>=), where the element m is a type constructor of kind ! , mapping an ar - Almost |