Results 1  10
of
59
An Implementation of Narrowing Strategies
 Journal of the ACM
, 2001
"... This paper describes an implementation of narrowing, an essential component of implementations of modern functional logic languages. These implementations rely on narrowing, in particular on some optimal narrowing strategies, to execute functional logic programs. We translate functional logic progra ..."
Abstract

Cited by 294 (123 self)
 Add to MetaCart
This paper describes an implementation of narrowing, an essential component of implementations of modern functional logic languages. These implementations rely on narrowing, in particular on some optimal narrowing strategies, to execute functional logic programs. We translate functional logic programs into imperative (Java) programs without an intermediate abstract machine. A central idea of our approach is the explicit representation and processing of narrowing computations as data objects. This enables the implementation of operationally complete strategies (i.e., without backtracking) or techniques for search control (e.g., encapsulated search). Thanks to the use of an intermediate and portable representation of programs, our implementation is general enough to be used as a common back end for a wide variety of functional logic languages.
Definitional Trees
 In Proc. of the 3rd International Conference on Algebraic and Logic Programming
, 1992
"... . Rewriting is a computational paradigm that specifies the actions, but not the control. We introduce a hierarchical structure representing, at a high level of abstraction, a form of control. Its application solves a specific problem arising in the design and implementation of inherently sequential, ..."
Abstract

Cited by 153 (39 self)
 Add to MetaCart
. Rewriting is a computational paradigm that specifies the actions, but not the control. We introduce a hierarchical structure representing, at a high level of abstraction, a form of control. Its application solves a specific problem arising in the design and implementation of inherently sequential, lazy, functional programming languages based on rewriting. For example, we show how to extend the expressive power of Log(F ) and how to improve the efficiency of an implementation of BABEL. Our framework provides a notion of degree of parallelism of an operation and shows that the elements of a necessary set of redexes are related by an andor relation. Both concepts find application in parallel implementations of rewriting. In an environment in which computations can be executed in parallel we are able to detect sequential computations in order to minimize overheads and/or optimize execution. Conversely, we are able to detect when inherently sequential computations can be executed in para...
Analysis and Caching of Dependencies
, 1996
"... We address the problem of dependency analysis and caching in the context of the calculus. The dependencies of a  term are (roughly) the parts of the term that contribute to the result of evaluating it. We introduce a mechanism for keeping track of dependencies, and discuss how to use these depend ..."
Abstract

Cited by 70 (6 self)
 Add to MetaCart
We address the problem of dependency analysis and caching in the context of the calculus. The dependencies of a  term are (roughly) the parts of the term that contribute to the result of evaluating it. We introduce a mechanism for keeping track of dependencies, and discuss how to use these dependencies in caching.
ContextSensitive Computations in Functional and Functional Logic Programs
 JOURNAL OF FUNCTIONAL AND LOGIC PROGRAMMING
, 1998
"... ..."
Constructorbased Conditional Narrowing
 In Proc. of the 3rd International ACM SIGPLAN Conference on Principles and Practice of Declarative Programming (PPDP 2001
, 2001
"... We define a transformation from a leftlinear constructorbased conditional rewrite system into an overlapping inductively sequential rewrite system. This transformation is sound and complete for the computations in the source system. Since there exists a sound and complete narrowing strategy for t ..."
Abstract

Cited by 53 (23 self)
 Add to MetaCart
We define a transformation from a leftlinear constructorbased conditional rewrite system into an overlapping inductively sequential rewrite system. This transformation is sound and complete for the computations in the source system. Since there exists a sound and complete narrowing strategy for the target system, the combination of these results offers the first procedure for provably sound and complete narrowing computations for the whole class of the leftlinear constructorbased conditional rewrite systems. We address the differences between demand driven and lazy strategies and between narrowing strategies and narrowing calculi. In this context, we analyze the efficiency and practicality of using our transformation for the implementation of functional logic programming languages. The results of this paper complement, extend, and occasionally rectify, previously published results in this area. Categories and Subject Descriptors D.1.1 [Programming Techniques]: Applicative (Functional) Programming; D.1.6 [Programming Techniques]: Logic Programming; D.3.3 [Programming Languages]: Language Constructs and FeaturesControl structures; D.3.4 [Programming Languages ]: ProcessorsOptimization; F.4.2 [Mathematical Logic and Formal Languages]: Grammars and Other Rewriting Systems; I.1.1 [Algebraic Manipulation]: Expressions and Their Representation Simplification of expressions; I.2.2 [Automatic Programming ]: Program transformation General Terms Algorithms, Languages, Performance, Theory Keywords Functional Logic Programming Languages, Rewrite Systems, Narrowing Strategies, CallByNeed This work has been supported in part by the National Science Foundation grant INT9981317. 1.
Parallel Evaluation Strategies for Functional Logic Languages
 In Proc. of the Fourteenth International Conference on Logic Programming (ICLP’97
, 1997
"... We introduce novel, sound, complete, and locally optimal evaluation strategies for functional logic programming languages. Our strategies combine, in a nontrivial way, two landmark techniques in this area: the computation of unifiers performed by needed narrowing in inductively sequential rewrite s ..."
Abstract

Cited by 48 (27 self)
 Add to MetaCart
We introduce novel, sound, complete, and locally optimal evaluation strategies for functional logic programming languages. Our strategies combine, in a nontrivial 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, constructorbased 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...
ContextSensitive Rewriting Strategies
, 1997
"... Contextsensitive rewriting is a simple restriction of rewriting which is formalized by imposing fixed restrictions on replacements. Such a restriction is given on a purely syntactic basis: it is (explicitly or automatically) specified on the arguments of symbols of the signature and inductively ..."
Abstract

Cited by 43 (30 self)
 Add to MetaCart
Contextsensitive rewriting is a simple restriction of rewriting which is formalized by imposing fixed restrictions on replacements. Such a restriction is given on a purely syntactic basis: it is (explicitly or automatically) specified on the arguments of symbols of the signature and inductively extended to arbitrary positions of terms built from those symbols. Termination is not only preserved but usually improved and several methods have been developed to formally prove it. In this paper, we investigate the definition, properties, and use of contextsensitive rewriting strategies, i.e., particular, fixed sequences of contextsensitive rewriting steps. We study how to define them in order to obtain efficient computations and to ensure that contextsensitive computations terminate whenever possible. We give conditions enabling the use of these strategies for rootnormalization, normalization, and infinitary normalization. We show that this theory is suitable for formalizing ...
Programming in Equational Logic: Beyond Strong Sequentiality
, 1993
"... Orthogonal term rewriting systems (also known as regular systems) provide an elegant framework for programming in equational logic. O'Donnell showed that the paralleloutermost strategy, which replaces all outermost redexes in each step, is complete for such systems. Many of the reductions performed ..."
Abstract

Cited by 42 (0 self)
 Add to MetaCart
Orthogonal term rewriting systems (also known as regular systems) provide an elegant framework for programming in equational logic. O'Donnell showed that the paralleloutermost strategy, which replaces all outermost redexes in each step, is complete for such systems. Many of the reductions performed by this strategy could be wasteful in general. A lazy normalization algorithm that completely eliminated these wasteful reductions by reducing only "needed redexes" was later developed by Huet and Levy. However, this algorithm required the input programs to be restricted to the subclass of strongly sequential systems. This is because needed redexes do not exist for all orthogonal programs, and even when they do, they may not be computable. It is therefore quite natural to ask whether it is possible to devise a complete normalization algorithm for the entire class that minimizes (rather than eliminate) the wasteful reductions. In this paper we propose a solution to this problem using the concept of a necessary set of redexes. In such a set, at least one of the redexes must be reduced to normalize a term. We devise an algorithm to compute a necessary set for any term not in normal form and show that a strategy that repeatedly reduces all redexes in such a set is complete for orthogonal programs. We also show that our algorithm is "optimal" among all normalization algorithms that are based on lefthand sides alone. This means that our algorithm is lazy (like HuetLevy's) on strongly sequential parts of a program and "relaxes laziness minimally" to handle the other parts and thus does not sacrifice generality for the sake of efficiency.
Optimal Derivations in Weak Lambdacalculi and in Orthogonal Terms Rewriting Systems.
, 1991
"... We introduce the new framework of Labeled Terms Rewriting Systems (T l RS), a general framework to express sharing in Term Rewriting Systems (TRS). For Orthogonal T l RS, an important subclass of T l RS, we characterize optimal derivations. This result is applied to weak calculi, showing the ..."
Abstract

Cited by 34 (0 self)
 Add to MetaCart
We introduce the new framework of Labeled Terms Rewriting Systems (T l RS), a general framework to express sharing in Term Rewriting Systems (TRS). For Orthogonal T l RS, an important subclass of T l RS, we characterize optimal derivations. This result is applied to weak calculi, showing the optimality of the lazy strategy, that is, the callbyname with sharing strategy. The result is also valid in the presence of ffi rules, as in PCF. Orthogonal T l RS is also useful as a calculus for proving syntactic properties of functional languages. 1 Compilation of the calculus Most compilers for functional languages translate their source language into some enriched calculus [17], and then, compile this intermediate language to a lowlevel language, such as mutually recursive supercombinators, as in LML [2, 10], or categorical combinators, as in CAML [4]. These lowlevel languages define different forms of weak fireduction. We now describe two of these lowlevel languages, superc...
Admissible Graph Rewriting and Narrowing
 IN PROCEEDINGS OF THE JOINT INTERNATIONAL CONFERENCE AND SYMPOSIUM ON LOGIC PROGRAMMING
, 1998
"... We address the problem of graph rewriting and narrowing as the underlying operational semantics of rulebased programming languages. We propose new optimal graph rewriting and narrowing strategies in the setting of orthogonal constructorbased graph rewriting systems. For this purpose, we first char ..."
Abstract

Cited by 29 (6 self)
 Add to MetaCart
We address the problem of graph rewriting and narrowing as the underlying operational semantics of rulebased programming languages. We propose new optimal graph rewriting and narrowing strategies in the setting of orthogonal constructorbased graph rewriting systems. For this purpose, we first characterize a subset of graphs, called admissible graphs. A graph is admissible if none of its defined operations belongs to a cycle. We then prove the confluence, as well as the confluence modulo bisimilarity (unraveling), of the admissible graph rewriting relation. Afterwards, we define a sequential graph rewriting strategy by using Antoy’s definitional trees. We show that the resulting strategy computes only needed redexes and develops optimal derivations w.r.t. the number of steps. Finally, we tackle the graph narrowing relation over admissible graphs and propose a sequential narrowing strategy which computes independent solutions and develops shorter derivations than most general graph narrowing.