Results 1 - 10
of
35
The Integration of Functions into Logic Programming: From Theory to Practice
- Journal of Logic Programming
, 1994
"... Abstract. Functional logic programming languages combine the most important declarative programming paradigms, and attempts to combine these paradigms have a long history. The declarative multi-paradigm language Curry is influenced by recent advances in the foundations and implementation of function ..."
Abstract
-
Cited by 356 (59 self)
- Add to MetaCart
(Show Context)
Abstract. Functional logic programming languages combine the most important declarative programming paradigms, and attempts to combine these paradigms have a long history. The declarative multi-paradigm language Curry is influenced by recent advances in the foundations and implementation of functional logic languages. The development of Curry is an international initiative intended to provide a common platform for the research, teaching, and application of integrated functional logic languages. This paper surveys the foundations of functional logic programming that are relevant for Curry, the main features of Curry, and extensions and applications of Curry and functional logic programming. 1
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 302 (116 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.
Operational Semantics for Declarative Multi-Paradigm Languages
- Journal of Symbolic Computation
, 2005
"... Abstract. In this paper we define an operational semantics for functional logic languages covering notions like laziness, sharing, concurrency, non-determinism, etc. Such a semantics is not only important to provide appropriate language definitions to reason about programs and check the correctness ..."
Abstract
-
Cited by 67 (29 self)
- Add to MetaCart
(Show Context)
Abstract. In this paper we define an operational semantics for functional logic languages covering notions like laziness, sharing, concurrency, non-determinism, etc. Such a semantics is not only important to provide appropriate language definitions to reason about programs and check the correctness of implementations but it is also a basis to develop languagespecific tools, like program tracers, profilers, optimizers, etc. First, we define a "big-step " semantics in natural style to relate expressions and their evaluated results. Since this semantics is not sufficient to cover concurrency, search strategies, or to reason about costs associated to particular computations, we also define a "small-step " operational semantics covering the features of modern functional logic languages.
A Semantics for Tracing Declarative Multi-Paradigm Programs
- In Proceedings of the 6th ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming (PPDP’04
, 2004
"... We introduce the theoretical basis for tracing lazy functional logic computations in a declarative multi-paradigm language like Curry. Tracing computations is a difficult task due to the subtleties of the underlying operational semantics which combines laziness and non-determinism. In this work, we ..."
Abstract
-
Cited by 22 (13 self)
- Add to MetaCart
(Show Context)
We introduce the theoretical basis for tracing lazy functional logic computations in a declarative multi-paradigm language like Curry. Tracing computations is a difficult task due to the subtleties of the underlying operational semantics which combines laziness and non-determinism. In this work, we define an instrumented operational semantics that generates not only the computed values and bindings but also an appropriate data structure—a sort of redex trail—which can be used to trace computations at an adequate level of abstraction. In contrast to previous approaches, which rely solely on a transformation to instrument source programs, the formal definition of a tracing semantics improves the understanding of the tracing process. Furthermore, it allows us to formally prove the correctness of the computed trail. A prototype implementation of a tracer based on this semantics demonstrates the usefulness of our approach.
A simple rewrite notion for call-time choice semantics
- In Proc. Principles and Practice of Declarative Programming, ACM Press
, 2007
"... Non-confluent and non-terminating rewrite systems are interesting from the point of view of programming. In particular, existing functional logic languages use such kind of rewrite systems to define possibly non-strict non-deterministic functions. The semantics adopted for non-determinism is call-ti ..."
Abstract
-
Cited by 19 (5 self)
- Add to MetaCart
Non-confluent and non-terminating rewrite systems are interesting from the point of view of programming. In particular, existing functional logic languages use such kind of rewrite systems to define possibly non-strict non-deterministic functions. The semantics adopted for non-determinism is call-time choice, whose combination with non-strictness is not a trivial issue that has been addressed from a semantic point of view in the Constructor-based Rewriting Logic (CRWL) framework. We investigate here how to express call-time choice and non-strict semantics from a point of view closer to classical rewriting. The proposed notion of rewriting uses an explicit representation for sharing with let-constructions and is proved to be equivalent to the CRWL approach. Moreover, we relate this let-rewriting relation (and hence CRWL) with ordinary rewriting, providing in particular soundness and completeness of let-rewriting with respect to rewriting for a class of programs which are confluent in a certain semantic sense.
Lazy Context Cloning for Non-Deterministic Graph Rewriting
- TERMGRAPH 2006
, 2006
"... We define a rewrite strategy for a class of non-confluent constructor-based term graph rewriting systems and prove its correctness. Our strategy and its extension to narrowing are intended for the implementation of non-strict non-deterministic functional logic programming languages. Our strategy is ..."
Abstract
-
Cited by 16 (7 self)
- Add to MetaCart
(Show Context)
We define a rewrite strategy for a class of non-confluent constructor-based term graph rewriting systems and prove its correctness. Our strategy and its extension to narrowing are intended for the implementation of non-strict non-deterministic functional logic programming languages. Our strategy is based on a graph transformation, called bubbling, that avoids the construction of large contexts of redexes with distinct replacements, an expensive and frequently wasteful operation executed by competitive complete techniques.
Operational Semantics for Functional Logic Languages
- Electronic Notes in Theoretical Computer Science
, 2002
"... In this work we provide a semantic description of functional logic languages covering notions like laziness, sharing, and non-determinism. Such a semantic description is essential, for instance, to have appropriate language definitions in order to reason about programs and check the correctness of i ..."
Abstract
-
Cited by 14 (9 self)
- Add to MetaCart
(Show Context)
In this work we provide a semantic description of functional logic languages covering notions like laziness, sharing, and non-determinism. Such a semantic description is essential, for instance, to have appropriate language definitions in order to reason about programs and check the correctness of implementations. First, we define a "big-step" semantics in natural style to relate expressions and their evaluated results. Since this semantics is not su#cient to reason about the operational aspects of programs, we also define a "small-step" operational semantics covering the main features of functional logic languages. Finally, we demonstrate the equivalence of the "small-step" semantics and the natural semantics.
Narrowing data-structures with pointers
- In Proceedings of ICGT (International Conference of Graph Transformation). Springer LNCS 4178
, 2006
"... Abstract. We investigate the narrowing relation in a wide class of (cyclic) term-graph rewrite systems. We propose a new sound and complete narrowing-based algorithm able to solve goals in presence of data structures with pointers (e.g., circular lists, doubly linked lists etc.). We first define the ..."
Abstract
-
Cited by 10 (2 self)
- Add to MetaCart
(Show Context)
Abstract. We investigate the narrowing relation in a wide class of (cyclic) term-graph rewrite systems. We propose a new sound and complete narrowing-based algorithm able to solve goals in presence of data structures with pointers (e.g., circular lists, doubly linked lists etc.). We first define the class of rewrite systems we consider. Our rules provide features such as pointer (edge) redirections, relabeling of existing nodes, in addition to the creation of new nodes. Moreover, we split the set of nodes of term-graphs in two (possibly empty) subsets: (i) variables and (ii) names. Variable nodes can be mapped against any other node whereas names act as constants and thus they are supposed to match themselves. This distinction between nodes allows us to synthesize, through the narrowing process, data-structures with circular shapes. In a second step, we define the rewriting and narrowing relations. We then show the soundness and completeness of narrowing. 1
The integration of functions into logic programming
- The Journal of Logic Programming
, 1994
"... This paper presents a new program analysis framework to approximate call patterns and their results in functional logic computations. We consider programs containing non-strict, nondeterministic operations in order to make the analysis applicable to modern functional logic languages like Curry or TO ..."
Abstract
-
Cited by 10 (0 self)
- Add to MetaCart
(Show Context)
This paper presents a new program analysis framework to approximate call patterns and their results in functional logic computations. We consider programs containing non-strict, nondeterministic operations in order to make the analysis applicable to modern functional logic languages like Curry or TOY. For this purpose, we present a new fixpoint characterization of functional logic computations w.r.t. a set of initial calls. We show how programs can be analyzed by approximating this fixpoint. The results of such an approximation have various applications, e.g., program optimization as well as verifying safety properties of programs. 1
On the correctness of bubbling
- 17th International Conference on Rewriting Techniques and Applications (RTA’06
, 2006
"... Abstract. Bubbling, a recently introduced graph transformation for functional logic computations, is well-suited for the reduction of redexes with distinct replacements. Unlike backtracking, bubbling preserves operational completeness; unlike copying, it avoids the up-front construction of large con ..."
Abstract
-
Cited by 10 (4 self)
- Add to MetaCart
Abstract. Bubbling, a recently introduced graph transformation for functional logic computations, is well-suited for the reduction of redexes with distinct replacements. Unlike backtracking, bubbling preserves operational completeness; unlike copying, it avoids the up-front construction of large contexts of redexes, an expensive and frequently wasteful operation. We recall the notion of bubbling and offer the first proof of its completeness and soundness with respect to rewriting. 1 Introduction Non-determinism is one of the most appealing features of functional logic pro-graming. A program is non-deterministic when its execution may evaluate some expression that has multiple results. To better understand this concept, considera program to color a map of the Pacific Northwest so that no pair of adjacent states shares a color. The following declarations, in Curry [15], define the well-known topology of the problem: data State = WA | OR | ID | BC states = [WA,OR,ID,BC] adjacent = [(WA,OR),(WA,ID),(WA,BC),(OR,ID),(ID,BC)] (1)