Results 1 - 10
of
18
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.
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.
Context-Sensitive Rewriting Strategies
, 1997
"... Context-sensitive 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 41 (30 self)
- Add to MetaCart
Context-sensitive 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 context-sensitive rewriting strategies, i.e., particular, fixed sequences of context-sensitive rewriting steps. We study how to define them in order to obtain efficient computations and to ensure that context-sensitive computations terminate whenever possible. We give conditions enabling the use of these strategies for root-normalization, normalization, and infinitary normalization. We show that this theory is suitable for formalizing ...
Specialization of Inductively Sequential Functional Logic Programs
, 1999
"... Functional logic languages combine the operational principles of the most important declarative programming paradigms, namely functional and logic programming. Inductively sequential programs admit the definition of optimal computation strategies and are the basis of several recent (lazy) functional ..."
Abstract
-
Cited by 21 (11 self)
- Add to MetaCart
Functional logic languages combine the operational principles of the most important declarative programming paradigms, namely functional and logic programming. Inductively sequential programs admit the definition of optimal computation strategies and are the basis of several recent (lazy) functional logic languages. In this paper, we define a partial evaluator for inductively sequential functional logic programs. We prove strong correctness of this partial evaluator and show that the nice properties of inductively sequential programs carry over to the specialization process and the specialized programs. In particular, the structure of the programs is preserved by the specialization process. This is in contrast to other partial evaluation methods for functional logic programs which can destroy the original program structure. Finally, we present some experiments which highlight the practical advantages of our approach. 1 Introduction Functional logic languages combine the operational p...
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
Specialization of Functional Logic Programs Based on Needed Narrowing
- Proc. of ICFP'99
, 1999
"... Functional logic languages with a complete operational semantics are based on narrowing, a unification-based goal-solving mechanism which subsumes the reduction principle of functional languages and the resolution principle of logic languages. Needed narrowing is an optimal narrowing strategy and th ..."
Abstract
-
Cited by 14 (9 self)
- Add to MetaCart
Functional logic languages with a complete operational semantics are based on narrowing, a unification-based goal-solving mechanism which subsumes the reduction principle of functional languages and the resolution principle of logic languages. Needed narrowing is an optimal narrowing strategy and the basis of several recent functional logic languages. In this paper, we define a partial evaluator for functional logic programs based on needed narrowing. We prove strong correctness of this partial evaluator and show that the nice properties of needed narrowing carry over to the specialization process and the specialized programs. In particular, the structure of the specialized programs provides for the application of optimal evaluation strategies. This is in contrast to other partial evaluation methods for functional logic programs which can change the original program structure in a negative way. Finally, we present some experiments which highlight the practical advantages of our approach.
Lazy Rewriting and Context-Sensitive Rewriting
- Electronic Notes in Theoretical Computer Science, volume 64. Elsevier Sciences
, 2002
"... Lazy rewriting (LR) is intended to improve the termination behavior of TRSs. This is attempted by restricting reductions for selected arguments of functions. Similarly, context-sensitive rewriting (CSR) forbids any reduction on those arguments. We show that, under certain conditions, LR and CSR coin ..."
Abstract
-
Cited by 12 (9 self)
- Add to MetaCart
Lazy rewriting (LR) is intended to improve the termination behavior of TRSs. This is attempted by restricting reductions for selected arguments of functions. Similarly, context-sensitive rewriting (CSR) forbids any reduction on those arguments. We show that, under certain conditions, LR and CSR coincide. On the basis of this result, we also describe a transformation which permits proving termination of LR as termination of CSR for the transformed system. Since there is a number of different techniques for proving termination of CSR, this provides a (first) formal framework for proving termination of lazy rewriting.
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
UPV-Curry: An Incremental Curry Interpreter
, 1999
"... . Functional logic programming integrates the best features of modern functional and logic languages. The multi-paradigm declarative language Curry is an extension of Haskell which is intended to become a standard in the area. In this paper, we present UPV-Curry, an efficient and quite complete impl ..."
Abstract
-
Cited by 3 (2 self)
- Add to MetaCart
. Functional logic programming integrates the best features of modern functional and logic languages. The multi-paradigm declarative language Curry is an extension of Haskell which is intended to become a standard in the area. In this paper, we present UPV-Curry, an efficient and quite complete implementation of Curry based on a new, incremental definition of its basic evaluation mechanism. We compare UPV-Curry with already existing implementations of other Curry interpreters. Keywords: Curry, Functional logic languages, Implementation. 1 Introduction Functional logic languages combine the best features of the most important declarative programming paradigms, namely functional and logic programming (see [Han94] for a survey). Throughout this decade, many practical proposals have been made to amalgamate functional and logic programming languages. However, these languages have not succeeded in becoming widely used by the functional or logic programming communities. The multi-paradigm l...

