Results 1 - 10
of
27
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 273 (111 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 138 (31 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 and-or 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...
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 non-trivial way, two landmark techniques in this area: the computation of unifiers performed by needed narrowing in inductively sequential rewrite s ..."
Abstract
-
Cited by 46 (25 self)
- Add to MetaCart
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...
Constructor-based 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 left-linear constructor-based 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 44 (19 self)
- Add to MetaCart
We define a transformation from a left-linear constructor-based 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 constructor-based 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 Features---Control structures; D.3.4 [Programming Languages ]: Processors---Optimization; 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, Call-By-Need This work has been supported in part by the National Science Foundation grant INT-9981317. 1.
A Sequential Reduction Strategy
- Theoretical Computer Science
, 1996
"... Kennaway proved the remarkable result that every (almost) orthogonal term rewriting system admits a computable sequential normalizing reduction strategy. In this paper we present a computable sequential reduction strategy similar in scope, but simpler and more general. Our strategy can be thought of ..."
Abstract
-
Cited by 22 (2 self)
- Add to MetaCart
Kennaway proved the remarkable result that every (almost) orthogonal term rewriting system admits a computable sequential normalizing reduction strategy. In this paper we present a computable sequential reduction strategy similar in scope, but simpler and more general. Our strategy can be thought of as an outermost-fair-like strategy that is allowed to be unfair to some redex of a term when contracting the redex is useless for the normalization of the term. Unlike the strategy of Kennaway, our strategy does not rely on syntactic restrictions that imply conuence. On the contrary, it can easily be applied to any term rewriting system, and we show that the class of term rewriting systems for which our strategy is normalizing properly includes all (almost) orthogonal systems. Our strategy is more versatile; in case of (almost) orthogonal term rewriting systems, it can be used to detect certain cases of nontermination. Our normalization proof is more accessible than Kennaway's. W...
Evaluation Strategies for Functional Logic Programming
- Journal of Symbolic Computation
, 2001
"... . Recent advances in the foundations and the development of functional logic programming languages originate from far-reaching results on narrowing evaluation strategies. Narrowing is a computation similar to rewriting which yields substitutions in addition to normal forms. In functional logic pr ..."
Abstract
-
Cited by 19 (12 self)
- Add to MetaCart
. Recent advances in the foundations and the development of functional logic programming languages originate from far-reaching results on narrowing evaluation strategies. Narrowing is a computation similar to rewriting which yields substitutions in addition to normal forms. In functional logic programming, the classes of rewrite systems to which narrowing is applied are, for the most part, subclasses of the constructor-based, possibly conditional, rewrite systems. Many interesting narrowing strategies, particularly for the smallest subclasses of the constructor-based rewrite systems, are generalizations of wellknown rewrite strategies. However, some strategies for larger non-confluents subclasses have been developed just for functional logic computations. In this paper, I will discuss the elements that play a relevant role in evaluation strategies for functional logic programming, describe some important classes of rewrite systems that model functional logic programs, show examples of the differences in expressiveness provided by these classes, and review the characteristics of narrowing strategies proposed for each class of rewrite systems. 1
Higher-Order Rewriting
- 12th Int. Conf. on Rewriting Techniques and Applications, LNCS 2051
, 1999
"... This paper will appear in the proceedings of the 10th international conference on rewriting techniques and applications (RTA'99). c flSpringer Verlag. ..."
Abstract
-
Cited by 18 (1 self)
- Add to MetaCart
This paper will appear in the proceedings of the 10th international conference on rewriting techniques and applications (RTA'99). c flSpringer Verlag.
Natural narrowing for general term rewriting systems
- Proc. of 16th International Conference on Rewriting Techniques and Applications, RTA’05, Lecture Notes in Computer Science
, 2005
"... Abstract. For narrowing to be an efficient evaluation mechanism, several lazy narrowing strategies have been proposed, although typically for the restricted case of left-linear constructor systems. These assumptions, while reasonable for functional programming applications, are too restrictive for a ..."
Abstract
-
Cited by 8 (5 self)
- Add to MetaCart
Abstract. For narrowing to be an efficient evaluation mechanism, several lazy narrowing strategies have been proposed, although typically for the restricted case of left-linear constructor systems. These assumptions, while reasonable for functional programming applications, are too restrictive for a much broader range of applications to which narrowing can be fruitfully applied, including applications where rules have a non-equational meaning either as transitions in a concurrent system or as inferences in a logical system. In this paper, we propose an efficient lazy narrowing strategy called natural narrowing which can be applied to general term rewriting systems with no restrictions whatsoever. An important consequence of this generalization is the wide range of applications that can now be efficiently supported by narrowing. We highlight a few such applications including symbolic model checking, theorem proving, programming languages, and partial evaluation. What thus emerges is a general and efficient unified mechanism based on narrowing, that seamlessly integrates a very wide range of applications in programming and proving. 1
Implementing Natural Rewriting and Narrowing Efficiently
"... Outermost-needed rewriting/narrowing is a sound and complete optimal demand-driven strategy for the class of inductively sequential constructor systems. Its parallel extension, known as weakly, deals with non-inductively sequential constructor systems. Recently, refinements of (weakly) outermost-nee ..."
Abstract
-
Cited by 8 (5 self)
- Add to MetaCart
Outermost-needed rewriting/narrowing is a sound and complete optimal demand-driven strategy for the class of inductively sequential constructor systems. Its parallel extension, known as weakly, deals with non-inductively sequential constructor systems. Recently, refinements of (weakly) outermost-needed rewriting and narrowing have been obtained. These new strategies are called natural rewriting and natural narrowing, respectively, and incorporate a better treatment of demandedness. In this paper, we address the problem of how to implement natural rewriting and narrowing eciently by using a refinement of the notion of definitional tree, which we call matching definitional tree. We also show how to compile...
Sequentiality, Second Order Monadic Logic and Tree Automata
- IN `PROCEEDINGS 10TH IEEE SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE, LICS'95', IEEE COMPUTER
, 1995
"... Given a term rewriting system R and a normalizable term t, a redex is needed if in any reduction sequence of t to a normal form, this redex will be contracted. Roughly, R is sequential if there is an optimal reduction strategy in which only needed redexes are contracted. More generally, G. Huet and ..."
Abstract
-
Cited by 5 (0 self)
- Add to MetaCart
Given a term rewriting system R and a normalizable term t, a redex is needed if in any reduction sequence of t to a normal form, this redex will be contracted. Roughly, R is sequential if there is an optimal reduction strategy in which only needed redexes are contracted. More generally, G. Huet and J.-J. Levy define in [8] the sequentiality of a predicate P on partially evaluated terms. We show here that the sequentiality of P is definable in SkS, the second-order monadic logic with k successors, provided P is definable in SkS. We derive several known and new consequences of this remark: 1--strong sequentiality, as defined in [8], of a left linear (possibly overlapping) rewrite system is decidable, 2--NV-sequentiality, as defined in [15] is decidable, even in the case of overlapping rewrite systems 3-- sequentiality of any linear shallow rewrite system is decidable. Then we describe a direct construction of a tree automaton recognizing the set of terms that do have needed redexes, w...

