Results 1  10
of
102
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.
Equational term graph rewriting
 FUNDAMENTA INFORMATICAE
, 1996
"... We present an equational framework for term graph rewriting with cycles. The usual notion of homomorphism is phrased in terms of the notion of bisimulation, which is wellknown in process algebra and concurrency theory. Specifically, a homomorphism is a functional bisimulation. We prove that the bis ..."
Abstract

Cited by 71 (8 self)
 Add to MetaCart
We present an equational framework for term graph rewriting with cycles. The usual notion of homomorphism is phrased in terms of the notion of bisimulation, which is wellknown in process algebra and concurrency theory. Specifically, a homomorphism is a functional bisimulation. We prove that the bisimilarity class of a term graph, partially ordered by functional bisimulation, is a complete lattice. It is shown how Equational Logic induces a notion of copying and substitution on term graphs, or systems of recursion equations, and also suggests the introduction of hidden or nameless nodes in a term graph. Hidden nodes can be used only once. The general framework of term graphs with copying is compared with the more restricted copying facilities embodied in the µrule, and translations are given between term graphs and µexpressions. Using these, a proof system is given for µexpressions that is complete for the semantics given by infinite tree unwinding. Next, orthogonal term graph rewrite ...
ContextSensitive Rewriting Strategies
, 1997
"... Contextsensitive rewriting is a simple restriction of rewriting which is formalized by imposing fixed restrictions on replacements. Such a restriction is given on a purely syntactic basis: it is (explicitly or automatically) specified on the arguments of symbols of the signature and inductively ..."
Abstract

Cited by 43 (30 self)
 Add to MetaCart
Contextsensitive rewriting is a simple restriction of rewriting which is formalized by imposing fixed restrictions on replacements. Such a restriction is given on a purely syntactic basis: it is (explicitly or automatically) specified on the arguments of symbols of the signature and inductively extended to arbitrary positions of terms built from those symbols. Termination is not only preserved but usually improved and several methods have been developed to formally prove it. In this paper, we investigate the definition, properties, and use of contextsensitive rewriting strategies, i.e., particular, fixed sequences of contextsensitive rewriting steps. We study how to define them in order to obtain efficient computations and to ensure that contextsensitive computations terminate whenever possible. We give conditions enabling the use of these strategies for rootnormalization, normalization, and infinitary normalization. We show that this theory is suitable for formalizing ...
Single Assignment C  efficient support for highlevel array operations in a functional setting
, 2003
"... ..."
The Ins and Outs of Clean I/O
, 1995
"... Functional programming languages have banned assignment because of its undesirable properties. The reward of this rigorous decision is that functional programming languages are sideeffect free. There is another side to the coin: because assignment plays a crucial role in Input/Output (I/O), functio ..."
Abstract

Cited by 41 (7 self)
 Add to MetaCart
Functional programming languages have banned assignment because of its undesirable properties. The reward of this rigorous decision is that functional programming languages are sideeffect free. There is another side to the coin: because assignment plays a crucial role in Input/Output (I/O), functional languages have a hard time dealing with I/O. Functional programming languages have therefore often been stigmatised as inferior to imperative programming languages because they cannot deal with I/0 very well. In this paper we show that I/O can be incorporated in a functional programming language without loss of any of the generally accepted advantages of functional programming languages. This discussion is supported by an extensive account of the I/O system offered by the lazy, purely functional programming language Clean. Two aspects that are paramount in its I/O stem make the approach novel with respect to other approaches. These aspects are the technique of explicit multiple environment passing, and the Event I/O framework to program Graphical User I/O in a highly structured and highlevel way. Clean file I/O is as powerful and flexible as it is in common imperative languages (one can read, write, and seek directly in a file). Clean Event I/O provides programmers with a highlevel framework to specify complex Graphical User I/O. It has been used to write applications such as a windowbased text editor, an object based drawing program, a relational database, and a spreadsheet program. These graphical interactive programs are completely machine independent, but still obey the lookandfeel of the concrete window environment being used. The specifications are completely functional and make extensive use of uniqueness typing, higherorder functions, and algebraic data type...
An Algebraic Presentation of Term Graphs, via GSMonoidal Categories
 Applied Categorical Structures
, 1999
"... . We present a categorical characterisation of term graphs (i.e., finite, directed acyclic graphs labeled over a signature) that parallels the wellknown characterisation of terms as arrows of the algebraic theory of a given signature (i.e., the free Cartesian category generated by it). In particula ..."
Abstract

Cited by 37 (24 self)
 Add to MetaCart
. We present a categorical characterisation of term graphs (i.e., finite, directed acyclic graphs labeled over a signature) that parallels the wellknown characterisation of terms as arrows of the algebraic theory of a given signature (i.e., the free Cartesian category generated by it). In particular, we show that term graphs over a signature \Sigma are onetoone with the arrows of the free gsmonoidal category generated by \Sigma. Such a category satisfies all the axioms for Cartesian categories but for the naturality of two transformations (the discharger ! and the duplicator r), providing in this way an abstract and clear relationship between terms and term graphs. In particular, the absence of the naturality of r and ! has a precise interpretation in terms of explicit sharing and of loss of implicit garbage collection, respectively. Keywords: algebraic theories, directed acyclic graphs, gsmonoidal categories, symmetric monoidal categories, term graphs. Mathematical Subject Clas...
The NarrowingDriven Approach to Functional Logic Program Specialization
 New Generation Computing
, 2002
"... Partial evaluation is a semanticsbased program optimization technique which has been investigated within di#erent programming paradigms and applied to a wide variety of languages. Recently, a partial evaluation framework for functional logic programs has been proposed. ..."
Abstract

Cited by 34 (20 self)
 Add to MetaCart
Partial evaluation is a semanticsbased program optimization technique which has been investigated within di#erent programming paradigms and applied to a wide variety of languages. Recently, a partial evaluation framework for functional logic programs has been proposed.
A 2Categorical Presentation of Term Graph Rewriting
 CATEGORY THEORY AND COMPUTER SCIENCE, VOLUME 1290 OF LNCS
, 1997
"... It is wellknown that a term rewriting system can be faithfully described by a cartesian 2category, where horizontal arrows represent terms, and cells represent rewriting sequences. In this paper we propose a similar, original 2categorical presentation for term graph rewriting. Building on a re ..."
Abstract

Cited by 34 (17 self)
 Add to MetaCart
It is wellknown that a term rewriting system can be faithfully described by a cartesian 2category, where horizontal arrows represent terms, and cells represent rewriting sequences. In this paper we propose a similar, original 2categorical presentation for term graph rewriting. Building on a result presented in [8], which shows that term graphs over a given signature are in onetoone correspondence with arrows of a gsmonoidal category freely generated from the signature, we associate with a term graph rewriting system a gsmonoidal 2category, and show that cells faithfully represent its rewriting sequences. We exploit the categorical framework to relate term graph rewriting and term rewriting, since gsmonoidal (2)categories can be regarded as "weak" cartesian (2)categories, where certain (2)naturality axioms have been dropped.
Promoting Rewriting to a Programming Language: A Compiler for NonDeterministic Rewrite Programs in AssociativeCommutative Theories
, 2001
"... Firstorder languages based on rewrite rules share many features with functional languages. But one difference is that matching and rewriting can be made much more expressive and powerful by incorporating some builtin equational theories. To provide reasonable programming environments, compilation ..."
Abstract

Cited by 30 (6 self)
 Add to MetaCart
Firstorder languages based on rewrite rules share many features with functional languages. But one difference is that matching and rewriting can be made much more expressive and powerful by incorporating some builtin equational theories. To provide reasonable programming environments, compilation techniques for such languages based on rewriting have to be designed. This is the topic addressed in this paper. The proposed techniques are independent from the rewriting language and may be useful to build a compiler for any system using rewriting modulo associative and commutative (AC) theories. An algorithm for manytoone AC matching is presented, that works efficiently for a restricted class of patterns. Other patterns are transformed to fit into this class. A refined data structure, namely compact bipartite graph, allows encoding all matching problems relative to a set of rewrite rules. A few optimisations concerning the construction of the substitution and of the reduced term are described. We also address the problem of nondeterminism related to AC rewriting and show how to handle it through the concept of strategies. We explain how an analysis of the determinism can be performed at compile time and we illustrate the benefits of this analysis for the performance of the compiled evaluation process. Then we briefly introduce the ELAN system and its compiler, in order to give some experimental results and comparisons with other languages or rewrite engines.
Admissible Graph Rewriting and Narrowing
 IN PROCEEDINGS OF THE JOINT INTERNATIONAL CONFERENCE AND SYMPOSIUM ON LOGIC PROGRAMMING
, 1998
"... We address the problem of graph rewriting and narrowing as the underlying operational semantics of rulebased programming languages. We propose new optimal graph rewriting and narrowing strategies in the setting of orthogonal constructorbased graph rewriting systems. For this purpose, we first char ..."
Abstract

Cited by 29 (6 self)
 Add to MetaCart
We address the problem of graph rewriting and narrowing as the underlying operational semantics of rulebased programming languages. We propose new optimal graph rewriting and narrowing strategies in the setting of orthogonal constructorbased graph rewriting systems. For this purpose, we first characterize a subset of graphs, called admissible graphs. A graph is admissible if none of its defined operations belongs to a cycle. We then prove the confluence, as well as the confluence modulo bisimilarity (unraveling), of the admissible graph rewriting relation. Afterwards, we define a sequential graph rewriting strategy by using Antoy’s definitional trees. We show that the resulting strategy computes only needed redexes and develops optimal derivations w.r.t. the number of steps. Finally, we tackle the graph narrowing relation over admissible graphs and propose a sequential narrowing strategy which computes independent solutions and develops shorter derivations than most general graph narrowing.