Results 1 -
9 of
9
Deriving Structural Hylomorphisms From Recursive Definitions
- In ACM SIGPLAN International Conference on Functional Programming
, 1996
"... this paper, we propose an algorithm which can automatically turn all practical recursive definitions into structural hylomorphisms making program fusion be easily applied. 1 Introduction ..."
Abstract
-
Cited by 46 (17 self)
- Add to MetaCart
this paper, we propose an algorithm which can automatically turn all practical recursive definitions into structural hylomorphisms making program fusion be easily applied. 1 Introduction
A Calculational Fusion System HYLO
, 1997
"... Fusion, one of the most useful transformation tactics for deriving efficient programs, is the process whereby separate pieces of programs are fused into a single one, leading to an efficient program with no intermediate data structures produced. In this paper, we report our on-going investigation on ..."
Abstract
-
Cited by 32 (10 self)
- Add to MetaCart
Fusion, one of the most useful transformation tactics for deriving efficient programs, is the process whereby separate pieces of programs are fused into a single one, leading to an efficient program with no intermediate data structures produced. In this paper, we report our on-going investigation on the design and implementation of an automatic transformation system HYLO which performs fusion transformation in a more systematic and more general way than any other systems. The distinguished point of our system is its calculational feature based on simple application of transformation laws rather than traditional search-based transformation. Keywords Program Transformation, Fusion, Constructive Algorithmics, Bird-Meertens Formalisms 1 INTRODUCTION Program transformation has been advocated as the linchpin of a programming paradigm in which the derivation of efficient programs from naive specification of problems is a formal and mechanically supported process [PP93]. It does not attempt ...
Universal regular path queries
- Higher-Order and Symbolic Computation
, 2003
"... Given are a directed edge-labelled graph G with a distinguished node n0, and a regular expression P which may contain variables. We wish to compute all substitutions φ (of symbols for variables), together with all nodes n such that all paths n0 → n are in φ(P). We derive an algorithm for this proble ..."
Abstract
-
Cited by 10 (1 self)
- Add to MetaCart
Given are a directed edge-labelled graph G with a distinguished node n0, and a regular expression P which may contain variables. We wish to compute all substitutions φ (of symbols for variables), together with all nodes n such that all paths n0 → n are in φ(P). We derive an algorithm for this problem using relational algebra, and show how it may be implemented in Prolog. The motivation for the problem derives from a declarative framework for specifying compiler optimisations. 1 Bob Paige and IFIP WG 2.1 Bob Paige was a long-standing member of IFIP Working Group 2.1 on Algorithmic Languages and Calculi. In recent years, the main aim of this group has been to investigate the derivation of algorithms from specifications by program transformation. Already in the mid-eighties, Bob was way ahead of the pack: instead of applying transformational techniques to well-worn examples, he was applying his theories of program transformation to new problems, and discovering new algorithms [16, 48, 52]. The secret of his success lay partly in his insistence on the study of general algorithm design strategies (in particular
Compositional Logic Programming
- In Proceedings of the JICSLP'96 post-conference workshop: Multi-paradigm logic programming, Report 96-28. Technische Universitat
, 2000
"... Relational program derivation has gathered momentum over the last decade with the development of many specification logics. However, before such relational specifications can be executed in existing programming languages, they must be carefully phrased to respect the evaluation order of the langu ..."
Abstract
-
Cited by 6 (1 self)
- Add to MetaCart
Relational program derivation has gathered momentum over the last decade with the development of many specification logics. However, before such relational specifications can be executed in existing programming languages, they must be carefully phrased to respect the evaluation order of the language. In turn, this requirement inhibits the rapid prototyping of specifications in a relational notation. The aim of this thesis is to bridge the gap between the methodology and practice of relational program derivation by realising a compositional style of logic programming that permits specifications to be phrased naturally and executed declaratively.
Using Types to Parse Natural Language
- In Proceedings of the Glasgow Workshop on Functional Programming. Workshops in Computer Science Series. (IFIP
, 1995
"... We describe a natural language parser that uses type information to determine the grammatical structure of simple sentences and phrases. This stands in contrast to studies of type inference where types and grammatical structure play opposite roles, the former being determined by the latter. Our pars ..."
Abstract
-
Cited by 4 (1 self)
- Add to MetaCart
We describe a natural language parser that uses type information to determine the grammatical structure of simple sentences and phrases. This stands in contrast to studies of type inference where types and grammatical structure play opposite roles, the former being determined by the latter. Our parser is implemented in Haskell and is based on a linguistic theory called applicative universal grammar (AUG). Our results should be interesting to computer scientists in the way in which AUG relates to types and combinatory calculus, and to linguists in the way in which a very simple, brute force parsing strategy performs surprisingly well in both performance and accuracy. 1 Introduction The study of type inference for functional languages depends on the ability to use the syntactic structure of a program term to determine the types of its components. Such languages are specified by simple context free grammars that provide strong hints about syntactic structure using explicit punctuation su...
Monadic Corecursion - Definition, Fusion Laws, and Applications
- Electronic Notes in Theoretical Computer Science
, 1998
"... This paper investigates corecursive definitions which are at the same time monadic. This corresponds to functions that generate a data structure following a corecursive process, while producing a computational effect modeled by a monad. We introduce a functional, called monadic anamorphism, that cap ..."
Abstract
-
Cited by 4 (1 self)
- Add to MetaCart
This paper investigates corecursive definitions which are at the same time monadic. This corresponds to functions that generate a data structure following a corecursive process, while producing a computational effect modeled by a monad. We introduce a functional, called monadic anamorphism, that captures definitions of this kind. We also explore another class of monadic recursive functions, corresponding to the composition of a monadic anamorphism followed by (the lifting of) a function defined by structural recursion on the data structure that the monadic anamorphism generates. Such kind of functions are captured by so-called monadic hylomorphism. We present transformation laws for these monadic functionals. Two non-trivial applications are also described.
Implementing Ruby in a Higher-Order Logic Programming Language
, 1995
"... Ruby is a relational language for describing hardware circuits. In the past, programming tools existed which only catered for the execution of functional Ruby expressions rather than the complete set of relational ones. In this paper, we develop an implementation of Ruby in Prolog---a higher-order l ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
Ruby is a relational language for describing hardware circuits. In the past, programming tools existed which only catered for the execution of functional Ruby expressions rather than the complete set of relational ones. In this paper, we develop an implementation of Ruby in Prolog---a higher-order logic programming language---allowing the execution of arbitrary, relational Ruby programs. 1 Introduction Programming problems can be tackled by specifying a program's behaviour in an abstract mathematical specification and then, through the application of some appropriate calculus, converting this into an efficient and implementable program. Until recently, the art of deriving computer programs from specification has been performed equationally in a functional calculus [Bir87]. However, it has become evident that a relational calculus affords us a greater degree of expression and flexibility in both specification and proof since a relational calculus naturally captures the notions of non-d...
Relational Programming, Program Inversion and the Derivation of Parsing Algorithms
, 1993
"... The spec calculus is a programming algebra that supports and even encourages the derivation of relational programs in a clear and calculational style. After a brief introduction of the spec calculus two particular uses are investigated. First, the notion of program inversion is introduced. This noti ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
The spec calculus is a programming algebra that supports and even encourages the derivation of relational programs in a clear and calculational style. After a brief introduction of the spec calculus two particular uses are investigated. First, the notion of program inversion is introduced. This notion from imperative programming allows one to construct from a given program R that satisfies fPg R fQg a program R 1 that satis es fQg R 1 fPg . It is shown that, as may be expected, a relational framework allows easy definition of and calculation with inverses of arbitrary programs. Several examples are discussed and used to introduce different methods to calculate implementable inverses. The second topic is the derivation of precedence parsing algorithms. A simple algorithm for the calculation of the inorder traversal of a tree is transformed in two steps into an algorithm for precedence parsing. The first transformation is the use of program inversion to obtain an algorithm that constru...
Linguistic, Philosophical, and Pragmatic Aspects of Type-Directed Natural Language Parsing
"... We describe how type information can be used to infer grammatical structure. This is in contrast to conventional type inference in programming languages where the roles are reversed, structure determining type. Our work is based on Applicative Universal Grammar (AUG), a linguistic theory that vi ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
We describe how type information can be used to infer grammatical structure. This is in contrast to conventional type inference in programming languages where the roles are reversed, structure determining type. Our work is based on Applicative Universal Grammar (AUG), a linguistic theory that views the formation of phrase in a form that is analogous to function application in a programming language. We descibe our overall methodology including its linguistic and philosophical underpinnings.

