Results 1  10
of
17
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.
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.
Specialization of Lazy Functional Logic Programs
 IN PROC. OF THE ACM SIGPLAN CONF. ON PARTIAL EVALUATION AND SEMANTICSBASED PROGRAM MANIPULATION, PEPM'97, VOLUME 32, 12 OF SIGPLAN NOTICES
, 1997
"... Partial evaluation is a method for program specialization based on fold/unfold transformations [8, 25]. Partial evaluation of pure functional programs uses mainly static values of given data to specialize the program [15, 44]. In logic programming, the socalled static/dynamic distinction is hard ..."
Abstract

Cited by 37 (23 self)
 Add to MetaCart
Partial evaluation is a method for program specialization based on fold/unfold transformations [8, 25]. Partial evaluation of pure functional programs uses mainly static values of given data to specialize the program [15, 44]. In logic programming, the socalled static/dynamic distinction is hardly present, whereas considerations of determinacy and choice points are far more important for control [12]. We discuss these issues in the context of a (lazy) functional logic language. We formalize a twophase specialization method for a nonstrict, first order, integrated language which makes use of lazy narrowing to specialize the program w.r.t. a goal. The basic algorithm (first phase) is formalized as an instance of the framework for the partial evaluation of functional logic programs of [2, 3], using lazy narrowing. However, the results inherited by [2, 3] mainly regard the termination of the PE method, while the (strong) soundness and completeness results must be restated for the lazy strategy. A postprocessing renaming scheme (second phase) is necessary which we describe and illustrate on the wellknown matching example. This phase is essential also for other nonlazy narrowing strategies, like innermost narrowing, and our method can be easily extended to these strategies. We show that our method preserves the lazy narrowing semantics and that the inclusion of simplification steps in narrowing derivations can improve control during specialization.
On Reducing the Search Space of HigherOrder Lazy Narrowing
, 1999
"... Higherorder lazy narrowing is a general method for solving Eunification problems in theories presented as sets of rewrite rules. In this paper we study the possibility to improve the search for normalized solutions of a higherorder lazy narrowing calculus LN. We introduce a new calculus, LNff, ob ..."
Abstract

Cited by 9 (5 self)
 Add to MetaCart
Higherorder lazy narrowing is a general method for solving Eunification problems in theories presented as sets of rewrite rules. In this paper we study the possibility to improve the search for normalized solutions of a higherorder lazy narrowing calculus LN. We introduce a new calculus, LNff, obtained by extending LN and define an equation selection strategy Sn such that LNff with strategy Sn is complete. The main advantages of using LNff with strategy Sn instead of LN include the possibility to restrict the application of outermost narrowing at variable position, and the computation of more specific solutions because of additional inference rules for solving exex equations. We also show that for orthogonal pattern rewrite systems we can adopt an eager variable elimination strategy that makes the calculus LNff with strategy Sn even more deterministic.
HigherOrder Lazy Narrowing Calculus: A Computation Model for a Higherorder Functional Logic Language
 In Proceedings of Sixth International Joint Conference, ALP '97  HOA '97, LNCS 1298
, 1997
"... this paper we present a computation model for a higherorder functional and logic programming. Although investigations of computation models for higherorder functional logic languages are under way[13, 9, 8, 20, 22], implemented functional logic languages like KLEAF[6] and Babel[18] among others, a ..."
Abstract

Cited by 8 (4 self)
 Add to MetaCart
this paper we present a computation model for a higherorder functional and logic programming. Although investigations of computation models for higherorder functional logic languages are under way[13, 9, 8, 20, 22], implemented functional logic languages like KLEAF[6] and Babel[18] among others, are all based on firstorder models of computation. Firstorder narrowing has been used as basic computation mechanism. The lack of higherorderness is exemplified by the following prototypical program
Strong Completeness of a Lazy Conditional Narrowing Calculus
, 1997
"... In this paper we extend the lazy narrowing calculus of Middeldorp, Okui, and Ida [13] to conditional rewrite systems. We show that our calculus is strongly complete whenever basic conditional narrowing is complete. This generalizes one of the three main results of [13] to the conditional case. As a ..."
Abstract

Cited by 8 (4 self)
 Add to MetaCart
In this paper we extend the lazy narrowing calculus of Middeldorp, Okui, and Ida [13] to conditional rewrite systems. We show that our calculus is strongly complete whenever basic conditional narrowing is complete. This generalizes one of the three main results of [13] to the conditional case. As a corollary we obtain the strong completeness for three classes of conditional rewrite systems, one of which is the class of decreasing and confluent systems. For this latter class we present a simple direct proof. 1. Introduction Narrowing (Hullot [8]) is the underlying computational mechanism of many programming languages that integrate the functional and logic programming paradigms (Hanus [5]). The desirable property of narrowing is completeness: for every solution to a given goal a more general solution can be found by narrowing. In this paper we are concerned with calculi in which narrowing is replaced by more elementary inference rules. Completeness issues for the lazy narrowing calculu...
LNCA: A Lazy Narrowing Calculus for Applicative Term Rewriting Systems
, 1999
"... The integration of higherorder functions into functional logic programming is widely seen as a powerful and desirable feature. The natural way to deal with higherorder functions in the wellstudied framework of firstorder term rewriting is through socalled applicative term rewriting systems (ATR ..."
Abstract

Cited by 5 (4 self)
 Add to MetaCart
The integration of higherorder functions into functional logic programming is widely seen as a powerful and desirable feature. The natural way to deal with higherorder functions in the wellstudied framework of firstorder term rewriting is through socalled applicative term rewriting systems (ATRSs). We propose a new calculus, called LNCA, to deal efficiently with confluent ATRSs and prove its soundness and completeness.
New Completeness Results For Lazy Conditional Narrowing
 In Proceedings of 6h International Workshop on Unification (UNIF 2002
, 2002
"... In this paper we consider the lazy conditional narrowing calculus LCNC of [4]. LCNC is the extension of lnc to conditional term rewrite systems (CTRSs for short). The extension is motivated by the observation that CTRSs are much more expressive than unconditional TRSs for describing interesting prob ..."
Abstract

Cited by 5 (4 self)
 Add to MetaCart
In this paper we consider the lazy conditional narrowing calculus LCNC of [4]. LCNC is the extension of lnc to conditional term rewrite systems (CTRSs for short). The extension is motivated by the observation that CTRSs are much more expressive than unconditional TRSs for describing interesting problems in natural and concise way. However, the additional expressive power raises two problems: (1) confluence is insufficient to guarantee the completeness with respect to normalized solutions, and (2) the search space increases dramatically because the conditions of the applied rewrite rule are added to the current goal. In [4] several completeness results for lcnc are presented. The only result which does not assume some kind of termination assumption does not permit extra variables in the conditions and righthand sides of the rewrite rules. In this paper we show the completeness of LCNC with leftmost selection for the class of (confluent) deterministic oriented CTRSs. Determinism was introduced by Ganzinger [1] and has proved to be very useful for the study of the (unique) termination behavior of wellmoded Horn clause programs (cf. [5]).
A Complete Selection Function for Lazy Conditional Narrowing
 Journal of Functional and Logic Programming
, 2002
"... . This paper is concerned with the lazy conditional narrowing calculus lcnc. In an earlier paper we proved that this calculus is complete with respect to normalizable solutions for the class of conuent but not necessarily terminating conditional rewrite systems without socalled extra variables ..."
Abstract

Cited by 4 (1 self)
 Add to MetaCart
. This paper is concerned with the lazy conditional narrowing calculus lcnc. In an earlier paper we proved that this calculus is complete with respect to normalizable solutions for the class of conuent but not necessarily terminating conditional rewrite systems without socalled extra variables in the conditional parts of the rewrite rules. Unfortunately, the proof does not provide any useful complete selection function, hence in implementations we need to backtrack over the choice of equations in goals in order to guarantee that all solutions are enumerated. This is in contrast to the unconditional case where completeness with respect to the leftmost selection function is known. In this paper we close the gap by proving the completeness of lcnc with respect to the leftmost selection strategy for the abovementioned class of conditional rewrite systems. 1 Introduction Narrowing (Fay [5], Hullot [16]) was originally invented as a general method for solving unication prob...
CallbyName Partial Evaluation of Functional Logic Programs
, 1996
"... Partial evaluation is a method for program specialization based on fold/unfold transformations [4, 16]. Partial evaluation of functional programs uses only static values of given data to specialize the program. In logic programming, the socalled static/dynamic distinction is hardly present, wher ..."
Abstract

Cited by 2 (2 self)
 Add to MetaCart
Partial evaluation is a method for program specialization based on fold/unfold transformations [4, 16]. Partial evaluation of functional programs uses only static values of given data to specialize the program. In logic programming, the socalled static/dynamic distinction is hardly present, whereas considerations of determinacy and choice points are far more important for control [8]. In this paper, we formalize a twophase specialization method for a nonstrict functional logic language which makes use of (normalizing) lazy narrowing to specialize the program w.r.t. a goal.