Results 1  10
of
35
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
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.
Lazy Narrowing in a Graph Machine
, 1990
"... The paper investigates the implementation of lazy narrowing in the framework of a graph reduction machine. By extending an appropriate architecture for purely functional languages an abstract graph narrowing machine for a functional logic language is constructed. The machine is capable of perform ..."
Abstract

Cited by 33 (4 self)
 Add to MetaCart
The paper investigates the implementation of lazy narrowing in the framework of a graph reduction machine. By extending an appropriate architecture for purely functional languages an abstract graph narrowing machine for a functional logic language is constructed. The machine is capable of performing unification and backtracking.
Efficient Translation of Lazy Functional Logic Programs into Prolog
 In Proc. Fifth International Workshop on Logic Program Synthesis and Transformation
, 1995
"... Abstract. In this paper, we present a highlevel implementation of lazy functional logic programs by transforming them into Prolog programs. The transformation is controlled by generalized definitional trees which specify the narrowing strategy to be implemented. Since we consider a sophisticated na ..."
Abstract

Cited by 30 (13 self)
 Add to MetaCart
(Show Context)
Abstract. In this paper, we present a highlevel implementation of lazy functional logic programs by transforming them into Prolog programs. The transformation is controlled by generalized definitional trees which specify the narrowing strategy to be implemented. Since we consider a sophisticated narrowing strategy, a direct mapping of functions into predicates is not possible. Therefore, we present new techniques to reduce the interpretational overhead of the generated Prolog code. This leads to a portable and efficient implementation of functional logic programs. 1 Introduction In recent years, a lot of proposals have been made to amalgamate functional and logic programming languages [15]. Functional logic languages with a sound and complete operational semantics are based on narrowing, a combination of the reduction principle of functional languages and the resolution principle of logic languages. Narrowing, originally introduced in automated theorem proving [26], is used to solve equations by finding appropriate values for variables occurring in arguments of functions. A narrowing step instantiates some variables in a goal and applies a reduction step to a redex of the instantiated goal. The instantiation of goal variables is usually computed by unifying a subterm of the goal with the lefthand side of some rule. Example 1. Consider the following rules defining the addition and comparison of natural numbers which are represented by terms built from 0 and s:
Efficient Lazy Narrowing using Demandedness Analysis
 In Proc. of the 5th International Symposium on Programming Language Implementation and Logic Programming
, 1993
"... Functional logic programming languages have a functional syntax and use narrowing as operational semantics. Here we consider the efficient implementation of lazy narrowing, a strategy which only evaluates the arguments of a function application, if their evaluation is really demanded. For an effi ..."
Abstract

Cited by 22 (8 self)
 Add to MetaCart
(Show Context)
Functional logic programming languages have a functional syntax and use narrowing as operational semantics. Here we consider the efficient implementation of lazy narrowing, a strategy which only evaluates the arguments of a function application, if their evaluation is really demanded. For an efficient implementation of lazy narrowing it is crucial to evaluate the arguments as early as possible. Otherwise the arguments are frequently reevaluated. A demandedness analysis is used to detect which parts of the arguments can safely be evaluated before the call to the function. Several approaches (e.g. [HLW92, JMM92]) also use this idea, but they sacrify laziness in order to avoid inefficiency. Our approach is more lazy than the previous approaches, and it uses a more powerful notion of demandedness, which allows to express infinite demand patterns like e.g. spine normal form. Moreover, in contrast to the previous approaches, we take into account dependencies between the arguments o...
Abstract machines for programming language implementation
 FUTURE GENERATION COMPUTER SYSTEMS
, 2000
"... We present an extensive, annotated bibliography of the abstract machines designed for each of the main programming paradigms (imperative, object oriented, functional, logic and concurrent). We conclude that whilst a large number of efficient abstract machines have been designed for particular langua ..."
Abstract

Cited by 20 (0 self)
 Add to MetaCart
We present an extensive, annotated bibliography of the abstract machines designed for each of the main programming paradigms (imperative, object oriented, functional, logic and concurrent). We conclude that whilst a large number of efficient abstract machines have been designed for particular language implementations, relatively little work has been done to design abstract machines in a systematic fashion.
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...
Implementing encapsulated search for a lazy functional logic language
 In Proc. 4th Fuji International Symposium on Functional and Logic Programming (FLOPS’99
, 1999
"... Abstract. A distinguishing feature of logic and functional logic languages is their ability to perform computations with partial data and to search for solutions of a goal. Having a builtin search strategy is convenient but not always sufficient. For many practical applications the builtin search ..."
Abstract

Cited by 17 (2 self)
 Add to MetaCart
(Show Context)
Abstract. A distinguishing feature of logic and functional logic languages is their ability to perform computations with partial data and to search for solutions of a goal. Having a builtin search strategy is convenient but not always sufficient. For many practical applications the builtin search strategy (usually depthfirst search via global backtracking) is not well suited. Also the nondeterministic instantiation of unbound logic variables conflicts with the monadic I/O concept, which requires a singlethreaded use of the world. A solution to these problems is to encapsulate search via a primitive operator try, which returns all possible solutions to a search goal in a list. In the present paper we develop an abstract machine that aims at an efficient implementation of encapsulated search in a lazy functional logic language. 1
Dynamic Detection of Determinism in Functional Logic Languages
 Theoretical Computer Science 142
, 1995
"... Programs in functional logic languages usually have to satisfy a nonambiguity condition, that semantically ensures completeness of conditional narrowing and pragmatically ensures that the defined (nonboolean) functions are deterministic and do not yield different result values for the same argument ..."
Abstract

Cited by 15 (0 self)
 Add to MetaCart
Programs in functional logic languages usually have to satisfy a nonambiguity condition, that semantically ensures completeness of conditional narrowing and pragmatically ensures that the defined (nonboolean) functions are deterministic and do not yield different result values for the same argument tuples. The nonambiguity condition allows the dynamic detection of determinism in implementations of functional logic languages. In this paper we show how to achieve this and what can be gained by this optimization. 1 Introduction Functional logic languages are extensions of functional languages with principles derived from logic programming [Reddy 85,87]. While their syntax almost looks like the syntax of conventional functional languages, their operational semantics is based on narrowing, an evaluation mechanism that uses unification instead of pattern matching for parameter passing. Narrowing is a natural extension of reduction to incorporate unification. It means applying the minimal ...
Extending Constructive Negation for Partial Functions in Lazy Functionallogic Languages
 In Proc. ELP’96
, 1996
"... . In this paper the mechanism of Default Rules for narrowingbased languages proposed in [24] is adapted to lazy narrowing. Every partial definition of a function can be completed with a default rule. In a concrete function call, the default rule is applicable when the normal ones determine that ..."
Abstract

Cited by 13 (2 self)
 Add to MetaCart
(Show Context)
. In this paper the mechanism of Default Rules for narrowingbased languages proposed in [24] is adapted to lazy narrowing. Every partial definition of a function can be completed with a default rule. In a concrete function call, the default rule is applicable when the normal ones determine that they cannot compute the value of the call. Furthermore, when the goal has variables the evaluation mechanism provides constraints to the variables to make the default rule applicable. Lazy narrowing semantics are extended with the technique of constructive negation [4, 5, 27]. The main advantage is that the coroutining implementation technique described in [5], which is the basis for an efficient implementation, can be fully formalized in our framework. 1 Introduction The integration of different declarative concepts is an active area of research. The expressive power of new declarative languages can be improved by accounting for a mature and uptodate understanding of previously st...