Results 11  20
of
20
Specialization of Functional Logic Programs
"... 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. In this article, we prese ..."
Abstract

Cited by 2 (2 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. In this article, we present a partial evaluation scheme for functional logic languages based on an automatic unfolding algorithm which builds narrowing trees. The method is formalized within the theoretical framework established by Lloyd and Shepherdson for the partial deduction of logic programs, which we have generalized for dealing with functional computations. A generic specialization algorithm is proposed which does not depend on the eager or lazy nature of the narrower being used. To the best of our knowledge, this is the first generic algorithm for the specialization of functional logic programs. We study the semantic properties of the transformation and the conditions under which the technique terminates, is...
A Practical Method for Program Specialization in a MultiParadigm Language
, 2000
"... This paper summarizes our findings in the development of partial evaluation tools for Curry, a modern multiparadigm declarative language which combines features from functional programming, logic programming, and concurrent programming. We present a novel approach to perform automatic program speci ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
This paper summarizes our findings in the development of partial evaluation tools for Curry, a modern multiparadigm declarative language which combines features from functional programming, logic programming, and concurrent programming. We present a novel approach to perform automatic program specialization in Curry, which differs from those presented in the literature for the specialization of functional logic languages mainly by considering the translation of the source program into an intermediate language. This is essential in order to express the different features of the language at an appropriate level of abstraction, which allows us to design a simple and concise automatic partial evaluation method covering all the features of the language. Thanks to this simplicity, we have been able to write our partial evaluator in the same language that it partially evaluates (without using any extralogical feature) and, hence, it is amenable to selfapplication (able to specialize itse...
IOS Press There and Back Again
"... Abstract. We present a programming pattern where a recursive function defined over a data structure traverses another data structure at return time. The idea is that the recursive calls get us ‘there’ by traversing the first data structure and the returns get us ‘back again ’ while traversing the se ..."
Abstract
 Add to MetaCart
Abstract. We present a programming pattern where a recursive function defined over a data structure traverses another data structure at return time. The idea is that the recursive calls get us ‘there’ by traversing the first data structure and the returns get us ‘back again ’ while traversing the second data structure. We name this programming pattern of traversing a data structure at call time and another data structure at return time “There And Back Again ” (TABA). The TABA pattern directly applies to computing symbolic convolutions and to multiplying polynomials. It also blends well with other programming patterns such as dynamic programming and traversing a list at double speed. We illustrate TABA and dynamic programming with Catalan numbers. We illustrate TABA and traversing a list at double speed with palindromes and we obtain a novel solution to this traditional exercise. Finally, through a variety of tree traversals, we show how to apply TABA to other data structures than lists. A TABAbased function written in direct style makes full use of an ALGOLlike control stack and needs no heap allocation. Conversely, in a TABAbased function written in continuationpassing style and recursively defined over a data structure (traversed at call time), the continuation acts as an iterator over a second data structure (traversed at return time). In general, the TABA pattern saves one from accumulating intermediate data structures at call time.
Generating Search Knowledge in a Class of Games
, 2000
"... . We present the Introspect system that generates search knowledge for different games. It writes selective and efficient search programs given a logic description of a game. It can be applied to the class of games where the winning state is simply defined. We explain how the system works using t ..."
Abstract
 Add to MetaCart
. We present the Introspect system that generates search knowledge for different games. It writes selective and efficient search programs given a logic description of a game. It can be applied to the class of games where the winning state is simply defined. We explain how the system works using the game of capturing strings in the game of Go. We begin with a description of the different kinds of metaknowledge used in Introspect. Then we analyze the consequences of different choices that can be made when designing the domain theory. Finally, we give experimental results using different limits on the amount of search and the amount of generated knowledge. 1 Laboratoire d'Intelligence Artificielle, Dpartement Informatique, Universit Paris 8, 2 rue de la Libert, 93526 Saint Denis, France.cazenave@ai.univparis8.fr Generating Search Knowledge in a Class of Games Abstract. We present the Introspect system that generates search knowledge for different games. It writes selective a...
On the Correctness of the Factoring Transformation
"... Abstract. Nondeterministic computations greatly enhance the expressive power of functional logic programs, but are often computationally expensive. Recently we analyzed a program transformation, called factoring transformation [4], that may save both execution time and memory occupation in a nonde ..."
Abstract
 Add to MetaCart
(Show Context)
Abstract. Nondeterministic computations greatly enhance the expressive power of functional logic programs, but are often computationally expensive. Recently we analyzed a program transformation, called factoring transformation [4], that may save both execution time and memory occupation in a nondeterministic computation. In this paper we study the formal properties of our transformation, proving its correctness for constructorbased left linear rewriting systems, under some well established conditions. We also introduce some proof techniques that help us to reason with this kind of rewriting systems. 1
Unfold/Fold Transformation
, 2001
"... calculations that depend on the same variable into a tuple. ..."
(Show Context)
Automatic Tupling for FunctionalLogic Programs
, 2002
"... This paper investigates the optimization by fold/unfold of functionallogic programs with operational semantics based on needed narrowing. Transformation sequences are guided by the tupling strategy, a powerful method that avoids multiple accesses to data structures and redundant subcomputation ..."
Abstract
 Add to MetaCart
This paper investigates the optimization by fold/unfold of functionallogic programs with operational semantics based on needed narrowing. Transformation sequences are guided by the tupling strategy, a powerful method that avoids multiple accesses to data structures and redundant subcomputations. We systematically decompose the internal structure of tupling in three lowlevel transformation phases in order to built a global automatic algorithm where eureka definitions are generated in an incremental way. The resulting strategy is (strongly) correct and complete, it avoids redundant transformation steps and it is elegant, realistic and applicable to most practical cases. Moreover and most important, our technique is specially wellsuited for functionallogic programs since, in contrast with prior approaches for pure functional programs that may produce corrupt integrated programs, (forbidden) extra variables on rules are avoided and non overlapping rules are produced.
Using PE to Automate Program Composition
, 2000
"... Functional logic languages with a complete operational semantics are based on narrowing, which combines the instantiation of variables with the reduction of expressions. In this paper, we investigate the relationship between partial evaluation and more general transformations based on folding/un ..."
Abstract
 Add to MetaCart
Functional logic languages with a complete operational semantics are based on narrowing, which combines the instantiation of variables with the reduction of expressions. In this paper, we investigate the relationship between partial evaluation and more general transformations based on folding/unfolding. First, we show that the transformations obtained by partial evaluators can be also achieved by folding /unfolding using a particular kind of eurekas which can be mechanically attained. Then, we propose a fully automatic algorithm (based on folding/unfolding) which starts with the eureka generation and is able to perform program composition, i.e., it is able to produce a single function definition for some nested functions of the original program. This avoids the construction of intermediate data structures that are produced by the inner function and consumed as inputs by the outer function. As opposed to both partial evaluation and (general) fold/unfold transformations, strong correctness of the transformed programs holds w.r.t.