## A Demand Driven Computation Strategy for Lazy Narrowing (1993)

### Cached

### Download Links

- [www.mathematik.uni-marburg.de]
- [mozart.sip.ucm.es]
- DBLP

### Other Repositories/Bibliography

Venue: | In Proc. of the 5th International Symposium on Programming Language Implementation and Logic Programming |

Citations: | 97 - 7 self |

### BibTeX

@INPROCEEDINGS{Loogen93ademand,

author = {Rita Loogen and Francisco L'opez Fraguas and Mario Rodr'iguez Artalejo},

title = {A Demand Driven Computation Strategy for Lazy Narrowing},

booktitle = {In Proc. of the 5th International Symposium on Programming Language Implementation and Logic Programming},

year = {1993},

pages = {184--200},

publisher = {Springer}

}

### Years of Citing Articles

### OpenURL

### Abstract

. Many recent proposals for the integration of functional and logic programming use conditional term rewriting systems (CTRS) as programs and narrowing as goal solving mechanism. This paper specifies a computation strategy for lazy conditional narrowing, based on the idea of transforming patterns into decision trees to control the computation. The specification is presented as a translation of CTRS into Prolog, which makes it executable and portable. Moreover, in comparison to related approaches, our method works for a wider class of CTRS. 1 Introduction Many recent approaches to the integration of functional and logic programming take conditional term rewriting systems (CTRS) as programs and narrowing as goal solving mechanism. Narrowing is complete as an equation solving procedure, under suitable hypotheses, see e.g. [7]. In general, narrowing has a high degree of (don't know) nondeterminism, due to two different sources: the choice of the redex, and the choice of the rewriting rule...

### Citations

508 |
An abstract Prolog instruction set
- Warren
- 1983
(Show Context)
Citation Context ...A related strategy is outer narrowing [22]. Several compiled implementations of lazy narrowing have appeared in the last years. Some of them, like e.g. [3], are based on Warren's abstract machine WAM =-=[20]-=-, while others were designed as extensions of reduction machines [4, 12, 16, 21]. There exist also methods to translate lazy rewriting and lazy narrowing into Prolog [1, 2, 5, 11, 17] in such a way th... |

112 |
Narrowing as the operational semantics of functional languages
- Reddy
- 1985
(Show Context)
Citation Context ...thout the hypothesis of termination of the TRS, are adequate for modelling the combination of lazy functional programming and logic programming. More specifically, we are interested in lazy narrowing =-=[18]-=-. Informally, lazy narrowing delays the selection of inner narrowing positions unless it is demanded by the patterns in the lhs of the rule which is going to be tried next. A related strategy is outer... |

11 |
A Technique for Doing Lazy Evaluation in Logic
- Narain
- 1986
(Show Context)
Citation Context ...Warren's abstract machine WAM [20], while others were designed as extensions of reduction machines [4, 12, 16, 21]. There exist also methods to translate lazy rewriting and lazy narrowing into Prolog =-=[1, 2, 5, 11, 17]-=- in such a way that Prolog's computation rule simulates the lazy strategy. Such approaches allow to execute lazy narrowing on top of any WAM-based Prolog implementation. A common difficulty within all... |

10 |
Compiling lazy narrowing into Prolog
- Cheong
- 1992
(Show Context)
Citation Context ...Warren's abstract machine WAM [20], while others were designed as extensions of reduction machines [4, 12, 16, 21]. There exist also methods to translate lazy rewriting and lazy narrowing into Prolog =-=[1, 2, 5, 11, 17]-=- in such a way that Prolog's computation rule simulates the lazy strategy. Such approaches allow to execute lazy narrowing on top of any WAM-based Prolog implementation. A common difficulty within all... |

10 |
Design of a compiler for lazy pattern driven narrowing
- Wolz
- 1991
(Show Context)
Citation Context ...tations of lazy narrowing have appeared in the last years. Some of them, like e.g. [3], are based on Warren's abstract machine WAM [20], while others were designed as extensions of reduction machines =-=[4, 12, 16, 21]-=-. There exist also methods to translate lazy rewriting and lazy narrowing into Prolog [1, 2, 5, 11, 17] in such a way that Prolog's computation rule simulates the lazy strategy. Such approaches allow ... |

9 |
Logic Programming with Functions and Predicates: The Language Babel
- Navarro, J, et al.
- 1992
(Show Context)
Citation Context ...se a simple functional logic language (SFL for short) which is based on conditional rewrite rules and encompasses the expressive power of several more concrete languages, as e.g. K-LEAF [8] and BABEL =-=[15]-=-. 2.1 SFL programs We assume a first order signature hDC;FSi with the ranked alphabet DC = S n2IN DC n of constructor symbols and the disjoint ranked alphabet FS = S n2IN FS n of function symbols. In ... |

7 | From reduction machines to narrowing machines - Loogen - 1991 |

6 |
Palamidessi: Kernel LEAF: A Logic plus Functional Language
- Giovannetti, Levi, et al.
- 1991
(Show Context)
Citation Context ...are going to use a simple functional logic language (SFL for short) which is based on conditional rewrite rules and encompasses the expressive power of several more concrete languages, as e.g. K-LEAF =-=[8]-=- and BABEL [15]. 2.1 SFL programs We assume a first order signature hDC;FSi with the ranked alphabet DC = S n2IN DC n of constructor symbols and the disjoint ranked alphabet FS = S n2IN FS n of functi... |

6 |
Dynamic Detection of Determinism
- Winkler
- 1991
(Show Context)
Citation Context ... which has the effect of a dynamic cut for discarding alternative #f clauses in case of deterministic functional computations. The idea of dynamic cut for functional logic languages was introduced in =-=[13]-=-. The interested reader is referred to [14] for more details. 3 Control Regimes for Lazy Narrowing Given some SFL-program P , the execution of PT (P ) as a Prolog program amounts to an execution of P ... |

6 |
Rodr'iguez-Artalejo: Lazy Narrowing in a Graph
- Navarro, Kuchen, et al.
- 1990
(Show Context)
Citation Context ...tations of lazy narrowing have appeared in the last years. Some of them, like e.g. [3], are based on Warren's abstract machine WAM [20], while others were designed as extensions of reduction machines =-=[4, 12, 16, 21]-=-. There exist also methods to translate lazy rewriting and lazy narrowing into Prolog [1, 2, 5, 11, 17] in such a way that Prolog's computation rule simulates the lazy strategy. Such approaches allow ... |

4 |
Lazy Evaluation
- Antoy
- 1991
(Show Context)
Citation Context ...Warren's abstract machine WAM [20], while others were designed as extensions of reduction machines [4, 12, 16, 21]. There exist also methods to translate lazy rewriting and lazy narrowing into Prolog =-=[1, 2, 5, 11, 17]-=- in such a way that Prolog's computation rule simulates the lazy strategy. Such approaches allow to execute lazy narrowing on top of any WAM-based Prolog implementation. A common difficulty within all... |

4 |
A survey of the implementations of narrowing
- Cheong, Fribourg
- 1992
(Show Context)
Citation Context ...very solution computed by unrestricted narrowing, the strategy is able to compute a more general solution. A survey of results about the completeness of different narrowing strategies can be found in =-=[6]-=-. To achieve an efficient implementation of narrowing it is not enough to choose a good narrowing strategy. For any fixed strategy and any given equational goal there is still a search space including... |

3 |
The Implementation of Lazy
- Chakravarty, Lock
- 1991
(Show Context)
Citation Context ...tations of lazy narrowing have appeared in the last years. Some of them, like e.g. [3], are based on Warren's abstract machine WAM [20], while others were designed as extensions of reduction machines =-=[4, 12, 16, 21]-=-. There exist also methods to translate lazy rewriting and lazy narrowing into Prolog [1, 2, 5, 11, 17] in such a way that Prolog's computation rule simulates the lazy strategy. Such approaches allow ... |

2 |
On the completeness of narrowing as the operational semantics of functional logic programming
- Moreno, González, et al.
- 1993
(Show Context)
Citation Context ...l i ==r i must be satisfied by narrowing l i ; r i into unifiable constructor terms. An SFL-program is any finite set of defining rules obeying certain natural conditions which ensure confluence; see =-=[9]-=-. Termination is not required. Goals for SFL-programs are systems of strict equations of the form (= l 1 ==r 1 ; : : : ; l m==rm : to be solved by narrowing. Note that evaluation of an expression e to... |

2 |
Navarro: Efficient Compilation of Lazy Narrowing into
- Mart'in, Carballo, et al.
- 1992
(Show Context)
Citation Context |

2 |
Efficient Compilation of Pattern-Matching, Chapter 5 in: S. PeytonJones: The Implementation of Functional Programming Languages
- Wadler
- 1987
(Show Context)
Citation Context ... expressions is presented. The naive rule selection mechanism is kept in this approach. [4] and [21] describe implementations of lazy narrowing which adapt the functional pattern matching compiler of =-=[19]-=- for rule selection. These approaches are very close to our approach. The case-expressions within the definitional trees are very similar to the case-expressions introduced by the pattern matching com... |

1 |
Moiso: An extension of
- Bosco, Cecchi, et al.
- 1989
(Show Context)
Citation Context ...hs of the rule which is going to be tried next. A related strategy is outer narrowing [22]. Several compiled implementations of lazy narrowing have appeared in the last years. Some of them, like e.g. =-=[3]-=-, are based on Warren's abstract machine WAM [20], while others were designed as extensions of reduction machines [4, 12, 16, 21]. There exist also methods to translate lazy rewriting and lazy narrowi... |

1 |
Okada: A rationale for conditional equational rewriting, Theoret. Comput. Sci. 75(1/2),1990,11--137
- Dershowitz, M
(Show Context)
Citation Context ...ramming take conditional term rewriting systems (CTRS) as programs and narrowing as goal solving mechanism. Narrowing is complete as an equation solving procedure, under suitable hypotheses, see e.g. =-=[7]-=-. In general, narrowing has a high degree of (don't know) nondeterminism, due to two different sources: the choice of the redex, and the choice of the rewriting rule. For this reason, unrestricted nar... |

1 |
On the Interaction of Lazy Evaluation and
- Winkler
- 1992
(Show Context)
Citation Context ...el, we shall refer to this as the naive control regime. 3.1 Inadequacies of the naive control regime The naive control regime has two main disadvantages already pointed out by other researchers; cfr. =-=[10, 11]-=-. (D1) When trying the different defining rules for a function f in order to narrow an expression f(e 1 ; : : : ; e n ), it may happen that the reduction of some argument expression e i to HNF is repe... |

1 |
You: Enumerating Outer Narrowing Derivations for Constructor-Based Term Rewriting Systems
- H
- 1989
(Show Context)
Citation Context ...y, lazy narrowing delays the selection of inner narrowing positions unless it is demanded by the patterns in the lhs of the rule which is going to be tried next. A related strategy is outer narrowing =-=[22]-=-. Several compiled implementations of lazy narrowing have appeared in the last years. Some of them, like e.g. [3], are based on Warren's abstract machine WAM [20], while others were designed as extens... |

1 | Fribourg: em A survey of the implementations of narrowing - Cheong, L - 1992 |