Results 1  10
of
45
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 296 (118 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.
Narrowingdriven Partial Evaluation of Functional Logic Programs
 ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS
, 1996
"... Languages that integrate functional and logic programming with a complete operational semantics are based on narrowing, a unificationbased goalsolving mechanism which subsumes the reduction principle of functional languages and the resolution principle of logic languages. Formal methods of transfo ..."
Abstract

Cited by 83 (37 self)
 Add to MetaCart
Languages that integrate functional and logic programming with a complete operational semantics are based on narrowing, a unificationbased goalsolving mechanism which subsumes the reduction principle of functional languages and the resolution principle of logic languages. Formal methods of transformation of functional logic programs can be based on this wellestablished operational semantics. In this paper, we present a partial evaluation scheme for functional logic languages based on an automatic unfolding algorithm which builds narrowing trees. We study the semantic properties of the transformation and the conditions under which the technique terminates, is sound and complete, and is also generally applicable to a wide class of programs. We illustrate our method with several examples and discuss the relation with Supercompilation and Partial Evaluation. To the best of our knowledge this is the first formal approach to partial evaluation of functional logic programs.
The Integration of Functions into Logic Programming: A Survey
, 1994
"... Functional and logic programming are the most important declarative programming paradigms, and interest in combining them has grown over the last decade. Early research concentrated on the definition and improvement of execution principles for such integrated languages, while more recently efficient ..."
Abstract

Cited by 40 (0 self)
 Add to MetaCart
Functional and logic programming are the most important declarative programming paradigms, and interest in combining them has grown over the last decade. Early research concentrated on the definition and improvement of execution principles for such integrated languages, while more recently efficient implementations of these execution principles have been developed so that these languages became relevant for practical applications. In this paper we survey the development of the operational semantics as well as
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 36 (21 self)
 Add to MetaCart
(Show Context)
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.
A Rewriting Logic for Declarative Programming
, 1996
"... . We propose an approach to declarative programming which integrates the functional and relational paradigms by taking possibly nondeterministic lazy functions as the fundamental notion. Programs in our paradigm are theories in a constructorbased conditional rewriting logic. We present proof calcu ..."
Abstract

Cited by 30 (17 self)
 Add to MetaCart
. We propose an approach to declarative programming which integrates the functional and relational paradigms by taking possibly nondeterministic lazy functions as the fundamental notion. Programs in our paradigm are theories in a constructorbased conditional rewriting logic. We present proof calculi and a model theory for this logic, and we prove the existence of free term models which provide an adequate intended semantics for programs. Moreover, we develop a sound and strongly complete lazy narrowing calculus, which is able to support sharing without the technical overhead of graph rewriting and to identify safe cases for eager variable elimination. Keywords: Declarative programming, nondeterministic functions, constructor based rewriting logic, lazy narrowing. 1 Introduction The interest in combining different declarative programming paradigms, especially functional and logic programming, has grown over the last decade; see [10] for a recent survey. The operational semantics o...
On Extra Variables in (Equational) Logic Programming
, 1994
"... Extra variables in a clause are variables which occur in the body but not in the head. It has been argued that extra variables are necessary and contribute to the expressive power of logic languages. In the first part of this paper, we show that this is not true in general. For this purpose, we p ..."
Abstract

Cited by 22 (2 self)
 Add to MetaCart
Extra variables in a clause are variables which occur in the body but not in the head. It has been argued that extra variables are necessary and contribute to the expressive power of logic languages. In the first part of this paper, we show that this is not true in general. For this purpose, we provide a simple syntactic transformation of each logic program into a logic program without extra variables. Moreover, we show a strong correspondence between the original and the transformed program with respect to the declarative and the operational semantics. In the second part of this paper, we use a similar technique to provide new completeness results for equational logic programs with extra variables. In equational logic programming it is well known that extra variables cause problems since narrowing, the standard operational semantics for equational logic programming, may become incomplete in the presence of extra variables. Since extra variables are useful from a programmin...
Implementation of Narrowing: The PrologBased Approach
 Logic programming languages: constraints, functions, and objects
, 1993
"... We present the problem of integrating functional languages and logic languages. We explain why the narrowingbased techniques have so far prevailed as operational mechanisms for the functional logic interpreters. We then discuss various strategies of narrowing. Finally we explain how to simulate the ..."
Abstract

Cited by 19 (0 self)
 Add to MetaCart
(Show Context)
We present the problem of integrating functional languages and logic languages. We explain why the narrowingbased techniques have so far prevailed as operational mechanisms for the functional logic interpreters. We then discuss various strategies of narrowing. Finally we explain how to simulate these strategies of narrowing using the leftmost SLDresolution rule of Prolog, and compare some experimental results with those obtained with direct narrowing implementations. 1. Introduction There has been a flurry of research on the integration of functional programming (FP) and logic programming (LP). A natural framework would be to consider the union of a set H of Horn clauses with a set E of conditional equations as a program. The declarative semantics of a program is then given by firstorder logic with equality [26], that is, firstorder logic extended with an equality symbol and the standard equality axioms. The operational semantics of a program is usually given by a system of infere...
Higherorder narrowing
 PROC. NINTH ANNUAL IEEE SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE
, 1994
"... We introduce several approaches for solving higherorder equational problems by higherorder narrowing and give first completeness results. The results apply to higherorder functionallogic programming languages and to higherorder unification modulo a higherorder equational theory. We lift the ge ..."
Abstract

Cited by 19 (7 self)
 Add to MetaCart
We introduce several approaches for solving higherorder equational problems by higherorder narrowing and give first completeness results. The results apply to higherorder functionallogic programming languages and to higherorder unification modulo a higherorder equational theory. We lift the general notion of firstorder narrowing to socalled higherorder patterns and argue that the full higherorder case is problematic. Integrating narrowing into unification, called lazy narrowing, can avoid these problems and can be adapted to the full higherorder case. For the secondorder case, we develop a version where the needed secondorder unification remains decidable. Finally we discuss a method that combines both approaches by using narrowing on higherorder patterns with full higherorder constraints.
Completeness of Combinations of Conditional Constructor Systems
, 1994
"... this paper we extend the divide and conquer technique of Middeldorp and Toyama for establishing (semi)completeness of constructor systems to conditional constructor systems. We show that both completeness (i.e. the combination of confluence and strong normalisation) and semicompleteness (confluenc ..."
Abstract

Cited by 13 (2 self)
 Add to MetaCart
this paper we extend the divide and conquer technique of Middeldorp and Toyama for establishing (semi)completeness of constructor systems to conditional constructor systems. We show that both completeness (i.e. the combination of confluence and strong normalisation) and semicompleteness (confluence plus weak normalisation) are decomposable properties of conditional constructor systems without extra variables in the conditions of the rewrite rules. 1. Introduction
Using Narrowing Approximations to Optimize Equational Logic Programs
 IN PROC. OF PLILP’93
, 1993
"... Solving equations in equational theories is a relevant programming paradigm which integrates logic and equational programming into one unified framework. Efficient methods based on narrowing strategies to solve systems of equations have been devised. In this paper, we formulate a narrowingbased ..."
Abstract

Cited by 12 (6 self)
 Add to MetaCart
Solving equations in equational theories is a relevant programming paradigm which integrates logic and equational programming into one unified framework. Efficient methods based on narrowing strategies to solve systems of equations have been devised. In this paper, we formulate a narrowingbased equation solving calculus which makes use of a topdown abstract interpretation strategy to control the branching of the search tree. We define