## Parallel Evaluation Strategies for Functional Logic Languages (1997)

### Cached

### Download Links

- [www.cs.pdx.edu]
- [www.cs.pdx.edu]
- [ftp.cs.pdx.edu]
- [ftp.cs.pdx.edu]
- [web.cecs.pdx.edu]
- [www.cs.pdx.edu]
- DBLP

### Other Repositories/Bibliography

Venue: | In Proc. of the Fourteenth International Conference on Logic Programming (ICLP’97 |

Citations: | 46 - 25 self |

### BibTeX

@INPROCEEDINGS{Antoy97parallelevaluation,

author = {Sergio Antoy and Rachid Echahed and Michael Hanus},

title = {Parallel Evaluation Strategies for Functional Logic Languages},

booktitle = {In Proc. of the Fourteenth International Conference on Logic Programming (ICLP’97},

year = {1997},

pages = {138--152},

publisher = {MIT Press}

}

### OpenURL

### Abstract

We introduce novel, sound, complete, and locally optimal evaluation strategies for functional logic programming languages. Our strategies combine, in a non-trivial way, two landmark techniques in this area: the computation of unifiers performed by needed narrowing in inductively sequential rewrite systems and the simultaneous reduction of a necessary set of redexes performed by rewriting in weakly orthogonal, constructor-based rewrite systems. First, we define a sequential strategy similar in scope to other narrowing strategies used in modern lazy functional logic languages. Then, based on the sequential strategy, we define a parallel narrowing strategy that has several noteworthy characteristics: it is the first complete narrowing strategy which evaluates ground expressions in a fully deterministic, optimal way; it computes shortest derivations and minimal sets of solutions on inductively sequential rewrite systems; and when combined with term simplification, it subsumes and improves all r...

### Citations

752 | Rewrite systems
- Dershowitz, Jouannaud
- 1990
(Show Context)
Citation Context ...ted from this paper. A full version containing all the details can be found in [3]. 2 Preliminaries We recall some key notions and notations about rewriting. We are consistent with the conventions of =-=[5, 13-=-]. Terms are constructed w.r.t. a given many-sorted signature . The set of variables occurring in a term t is denoted by Var(t). A term t is called ground if Var(t) = ?. In practice, most functional l... |

566 | Term rewriting systems
- Klop
- 1992
(Show Context)
Citation Context ...ted from this paper. A full version containing all the details can be found in [3]. 2 Preliminaries We recall some key notions and notations about rewriting. We are consistent with the conventions of =-=[5, 13-=-]. Terms are constructed w.r.t. a given many-sorted signature . The set of variables occurring in a term t is denoted by Var(t). A term t is called ground if Var(t) = ?. In practice, most functional l... |

334 | Functional logic programming: From theory to Curry
- Hanus
- 2013
(Show Context)
Citation Context ...is integration are expected to have advantages of both paradigms. Most proposals with a sound and complete operational semantics for the integration of functional and logic programming languages (see =-=[1-=-0] for a recent survey) are based on narrowing. Narrowing solves equations by computing uniers with respect to an equational theory. Informally, narrowing unies a term with the left-hand side of a rew... |

291 | A needed narrowing strategy
- Antoy, Echahed, et al.
(Show Context)
Citation Context ...[10]. Recently, an optimal strategy for inductively sequential rewrite systems (e.g., the rewrite system in Example 1) has been discovered by extending to narrowing landmark results in term rewriting =-=[2-=-]. In this paper, we investigate new evaluation strategies for a more general class of programs, namely those dened by weakly orthogonal, constructor-based systems. Example 2 Consider the following de... |

166 |
Canonical forms and unification
- Hullot
- 1980
(Show Context)
Citation Context ...s would contain unevaluated or undefined expressions. This is not a limitation with respect to related work either, since most general narrowing is known to be complete only for irreducible solutions =-=[22]-=-, and lazy narrowing is complete only for constructor substitutions [14, 29]. Theorem 4 (Completeness of weakly needed narrowing) Let R be a CAT, t a term, oe a constructor substitution such that oe(t... |

156 |
Logic Programming with Functions and Predicates: The language Babel
- Moreno-Navarro, Rodríguez-Artalejo
- 1992
(Show Context)
Citation Context ...nstructors, that construct data terms are distinguished from those, called dened functions or operations, that operate on data terms (see, for instance, the functional logic languages ALF [8], BABEL [=-=18]-=-, K-LEAF [7], LPG [4]). Hence, we assume that R is a constructorbased term rewriting system consisting of rewrite rules l ! r, where l is a pattern, i.e., the root of l is an operation symbol and the ... |

152 | Definitional trees
- Antoy
- 1992
(Show Context)
Citation Context ...ategy [3] that performs only steps that are needed for narrowing terms to constructor normal forms. This strategy is a natural extension to narrowing of the sequential rewriting strategy presented in =-=[1]-=-. In this paper we investigate the narrowing relation for the class of weakly orthogonal, constructor-based rewrite systems. We will propose, in the next two sections, two narrowing strategies for thi... |

110 |
Narrowing as the operational semantics of functional languages", Unpublished report
- Reddy
- 1985
(Show Context)
Citation Context ...the presence of non-terminating rules, weak orthogonality and constructor-based rewrite rules are natural requirements. For this class of rewrite systems, lazy narrowing has been proposed (see, e.g., =-=[7, 18, 20]-=-). Similarly to lazy evaluation in functional languages, lazy narrowing evaluates 149 an inner term only when its value is demanded to narrow an outer term. In contrast to functional languages, a naiv... |

106 |
graph rewriting
- Barendregt
- 1987
(Show Context)
Citation Context ...al multiderivations that we recall below. Informally, the cost of a multistep of a derivation of a term t is the number of reduced positions when the terms of the derivation are represented as graphs =-=[4, 37]. For any se-=-t I and equivalence relation �� on I, jIj denotes the cardinality of I, and I=�� denotes the quotient of I modulo ��. Definition 17 Let A = t 0 ! f(p i 1 ;R i 1 )g i2I 1 t 1 ! f(p i 2 ;R i... |

104 |
Kernel Leaf: A Logic plus Functional Language
- Giovannetti, Levi, et al.
- 1991
(Show Context)
Citation Context ...hat construct data terms are distinguished from those, called dened functions or operations, that operate on data terms (see, for instance, the functional logic languages ALF [8], BABEL [18], K-LEAF [=-=7]-=-, LPG [4]). Hence, we assume that R is a constructorbased term rewriting system consisting of rewrite rules l ! r, where l is a pattern, i.e., the root of l is an operation symbol and the arguments of... |

95 | A Demand Driven Computation Strategy for Lazy Narrowing
- Loogen, López-Fraguas, et al.
- 1993
(Show Context)
Citation Context ...l component of T g We call weakly needed any narrowing step t ; p; R; t 0 with (p; R; ) 2 (t; T ). Weakly needed narrowing is almost identical to the demand driven narrowing strategy proposed in [16]=-=-=-. However, soundness and completeness results are not provided in [16]. 145 Example 5 Consider Example 2 with the additional rule R 4 = f(a) ! true and the term t = f(X) _ f(X). Let T denote the paral... |

92 |
SLOG: A logic programming language interpreter based on clausal superposition and rewriting
- Fribourg
- 1985
(Show Context)
Citation Context ...led defined functions or operations, that operate on data terms (see, for instance, the Equational Interpreter [32] and the functional logic languages ALF [17], BABEL [29], K-LEAF [14], LPG [5], SLOG =-=[12]-=-). Hence we define: Definition 2 A many-sorted signature \Sigma is constructor-based iff the set of operations\Omega is partitioned into two disjoint sets C and D. C is the set of constructors and D i... |

86 | Computing in Systems Described by Equations - O’DONNELL - 1977 |

80 |
Equational Logic as a Programming Language
- O’Donnell
- 1985
(Show Context)
Citation Context ...symbols, called constructors, that construct data terms are distinguished from those, called defined functions or operations, that operate on data terms (see, for instance, the Equational Interpreter =-=[32]-=- and the functional logic languages ALF [17], BABEL [29], K-LEAF [14], LPG [5], SLOG [12]). Hence we define: Definition 2 A many-sorted signature \Sigma is constructor-based iff the set of operations\... |

72 |
Automated Theorem-Proving for Theories with Simpli ers
- Slagle
- 1974
(Show Context)
Citation Context ...e operational semantics for the integration of functional and logic programming languages (see [19] for a survey) are based on narrowing. Narrowing, originally introduced in automated theorem proving =-=[36]-=-, solves equations by computing unifiers with respect to an equational theory [11]. Informally, narrowing unifies a term with the left-hand side of a rewrite rule and fires the rule on the instantiate... |

64 |
Computations in orthogonal term rewriting systems
- Huet, Lévy
- 1991
(Show Context)
Citation Context ...tegy is normalizing for almost orthogonal TRSs, hence for weakly orthogonal, constructor-based TRSs. In general, some reductions performed by this strategy could be avoided. Huet and Levy have shown [=-=-=-11] that for the class of strongly sequential TRSs there is an eective strategy that performs only unavoidable reductions. Sekar and Ramakrishnan [21] have rened O'Donnell's result in a dierent direct... |

61 |
First-order unification in an equational theory
- Fay
- 1979
(Show Context)
Citation Context ...nguages (see [19] for a survey) are based on narrowing. Narrowing, originally introduced in automated theorem proving [36], solves equations by computing unifiers with respect to an equational theory =-=[11]-=-. Informally, narrowing unifies a term with the left-hand side of a rewrite rule and fires the rule on the instantiated term. Example 1 Consider the following rewrite rules defining the addition for n... |

57 | Compiling Logic Programs with Equality - Hanus - 1990 |

44 |
Design and Implementation of a Generic, Logic and Functional Programming Language
- Bert, Echahed
- 1986
(Show Context)
Citation Context ...ruct data terms are distinguished from those, called dened functions or operations, that operate on data terms (see, for instance, the functional logic languages ALF [8], BABEL [18], K-LEAF [7], LPG [=-=4]-=-). Hence, we assume that R is a constructorbased term rewriting system consisting of rewrite rules l ! r, where l is a pattern, i.e., the root of l is an operation symbol and the arguments of l do not... |

42 | Programming in equational logic: Beyond strong sequentiality
- Sekar, Ramakrishnan
- 1993
(Show Context)
Citation Context ...trategy could be avoided. Huet and Levy have shown [11] that for the class of strongly sequential TRSs there is an eective strategy that performs only unavoidable reductions. Sekar and Ramakrishnan [2=-=-=-1] have rened O'Donnell's result in a dierent direction. Within the class of the weakly orthogonal, constructor-based TRSs, they have shown that it is possible to minimize the set of redexes that must... |

40 |
Sequentiality in orthogonal term rewriting systems
- Klop, Middeldorp
- 1991
(Show Context)
Citation Context ...rules are patterns. The notion of descendant, well-known for orthogonal systems [11], is extended to almost orthogonal systems without diculties. Here we provide an intuitive denition as proposed in [=-=1-=-4]. Let t ! t 0 be a reduction sequence and s a subterm of t. The descendants of s in t 0 are computed as follows: Underline the root of s and perform the reduction sequence t ! t 0 . Then, every su... |

36 | Lazy Narrowing in a Graph Machine
- Kuchen, Loogen, et al.
- 1990
(Show Context)
Citation Context ...order to ensure the confluence of the rewrite relation, constructor-based and weakly orthogonal rules are a natural requirement. For this class of rewrite systems, lazy narrowing has been proposed in =-=[7, 14, 29, 28, 34]-=-. Similar to lazy evaluation in functional languages, lazy narrowing evaluates an inner term only when its value is demanded to narrow an outer term. In contrast to functional languages, a naive versi... |

30 | Efficient Translation of Lazy Functional Logic Programs into Prolog
- Hanus
- 1995
(Show Context)
Citation Context ...ure containing the rules (only the rules' left-hand sides really matter) of a defined operation of a rewrite system. Below we recall both the definition of generalized and parallel definitional trees =-=[1, 20]-=- and a few results that will come handy later on in our discussion. The symbols rule, branch, and or occurring in the next definition, are uninterpreted functions used to classify the nodes of the tre... |

24 |
Computing in Horn Clause Theories, volume 16
- Padawitz
- 1988
(Show Context)
Citation Context .... Example 3 Referring to Example 1, A+B ; ; R 2 ; fA7!s(0);B7!0g s(0 + 0) and A+B ; ; R2 ; fA7!s(X)g s(X +B) are narrowing steps of A+B, but only the latter is a most general narrowing step. Padawitz =-=[33]-=- too distinguishes between narrowing and most general narrowing, but in most papers narrowing is intended as most general narrowing [19]. Most general narrowing has the advantage that most general uni... |

23 | Efficient lazy narrowing using demandedness analysis
- Moreno-Navarro, Kuchen, et al.
(Show Context)
Citation Context ...deterministic choice of a function's rewrite rules. Therefore, several methods have been proposed aiming at evaluating arguments commonly demanded by all the rules before the non-deterministic choice =-=[3, 15, 26, 30]-=-. The best strategy to date is needed narrowing [3] since it is the only one which has been shown optimal w.r.t. the length of derivations and the number of computed solutions. Needed narrowing is def... |

21 |
De trees
- Antoy
- 1992
(Show Context)
Citation Context ...tems there exists a narrowing strategy [2] that performs only steps that are needed for solving goals. This strategy is a generalization to narrowing of the sequential rewriting strategy presented in =-=[1]-=-. This sequential strategy is also the basis of a parallel rewriting strategy for weakly orthogonal, constructor-based rewrite systems, referred to as weakly needed rewriting and sketchedsrst in [1], ... |

21 | On the interaction of lazy evaluation and backtracking
- Hans, Loogen, et al.
- 1992
(Show Context)
Citation Context ...deterministic choice of a function's rewrite rules. Therefore, several methods have been proposed aiming at evaluating arguments commonly demanded by all the rules before the non-deterministic choice =-=[3, 15, 26, 30]-=-. The best strategy to date is needed narrowing [3] since it is the only one which has been shown optimal w.r.t. the length of derivations and the number of computed solutions. Needed narrowing is def... |

19 |
An optimal narrowing strategy for general canonical systems
- Bockmayr, Krischer, et al.
- 1992
(Show Context)
Citation Context ...s. There are also many narrowing strategies for rewrite systems which are not necessarily constructor-based and weakly orthogonal, like innermost [12], outermost [9, 10], basic [22], or LSE narrowing =-=[6]-=-. However, all these strategies require the termination of the rewrite relation which is difficult to check 5 and immediately 5 Since the termination property of a rewrite system is undecidable, there... |

18 |
Narrowing and unification in functional programming - an evaluation mechanism for absolute set abstraction
- Darlington, Guo
- 1989
(Show Context)
Citation Context ...order to ensure the confluence of the rewrite relation, constructor-based and weakly orthogonal rules are a natural requirement. For this class of rewrite systems, lazy narrowing has been proposed in =-=[7, 14, 29, 28, 34]-=-. Similar to lazy evaluation in functional languages, lazy narrowing evaluates an inner term only when its value is demanded to narrow an outer term. In contrast to functional languages, a naive versi... |

14 | Dynamic Detection of Determinism in Functional Logic Languages
- Loogen, Winkler
- 1991
(Show Context)
Citation Context ...s has the unfortunate eect that naive lazy narrowing is often inecient for such rules [9]. There are dierent proposals to improve naive lazy narrowing in this case. For instance, Loogen and Winkler [1=-=7-=-] propose the dynamic cut which ignores subsequent alternative rules for narrowing if a rule is applicable without binding of goal variables. The eect of the dynamic cut is subsumed by our strategy si... |

14 | Combining Lazy Narrowing and Simplification, in
- Hanus
- 1994
(Show Context)
Citation Context ...er to avoid this drawback of lazy narrowing, there are at least three methods aiming to improve lazy narrowing for overlapping rewrite rules: 1. Dynamic cut [27] 2. Lazy narrowing with simplification =-=[18]-=- 3. Parallel narrowing (with simplification) Loogen and Winkler [27] propose the dynamic cut which ignores subsequent alternative rules for narrowing if a rule is applicable without binding of goal va... |

9 |
Canonical forms and uni
- Hullot
- 1980
(Show Context)
Citation Context ...solutions would contain unevaluated or undened expressions. This is not a limitation with respect to related work, since most general narrowing is known to be complete only for irreducible solutions [=-=12-=-], and lazy narrowing is complete only for constructor substitutions [7, 18]. Theorem 3 (Completeness of weakly needed narrowing) Let R be a CAT. Let be a constructor substitution that is a solution ... |

7 | Independent AND-Parallel Implementation of Narrowing
- Kuchen, Moreno-Navarro, et al.
- 1992
(Show Context)
Citation Context ...tended as a strategy to implement functional logic languages on parallel architectures due to itssne-grained parallelism. This is in contrast to the AND-parallel narrowing implementation presented in =-=[15]-=- where independent subterms are evaluated in parallel. However, due to the fact that parallel narrowing reduces the number of non-deterministic choices in narrowing steps (compared to classic narrowin... |

3 | Sequential implementation of parallel narrowing - Genius - 1996 |

2 |
Combining lazy narrowing and simpli
- Hanus
- 1994
(Show Context)
Citation Context ...dicult since an argument may be demanded by some rule but not demanded by another rule for the same function. This has the unfortunate eect that naive lazy narrowing is often inecient for such rules [=-=9-=-]. There are dierent proposals to improve naive lazy narrowing in this case. For instance, Loogen and Winkler [17] propose the dynamic cut which ignores subsequent alternative rules for narrowing if a... |

2 |
Exploiting Expression- and Or-parallelism for a Functional Logic Language
- Winkler
- 1995
(Show Context)
Citation Context ...es the number of non-deterministic choices in narrowing steps (compared to classic narrowing), parallel narrowing is useful to avoid redundant computations in OR-parallel implementations of narrowing =-=[16]. The foll-=-owing table summarizes the characteristics of the major narrowing strategies proposed for weakly orthogonal constructor-based rewrite systems. "Deterministic on ground terms" means that a st... |