Results 1  10
of
22
Polytypic programming
, 2000
"... ... PolyP extends a functional language (a subset of Haskell) with a construct for defining polytypic functions by induction on the structure of userdefined datatypes. Programs in the extended language are translated to Haskell. PolyLib contains powerful structured recursion operators like catamorp ..."
Abstract

Cited by 93 (12 self)
 Add to MetaCart
... PolyP extends a functional language (a subset of Haskell) with a construct for defining polytypic functions by induction on the structure of userdefined datatypes. Programs in the extended language are translated to Haskell. PolyLib contains powerful structured recursion operators like catamorphisms, maps and traversals, as well as polytypic versions of a number of standard functions from functional programming: sum, length, zip, (==), (6), etc. Both the specification of the library and a PolyP implementation are presented.
Parallelization in Calculational Forms
 In 25th ACM Symposium on Principles of Programming Languages
, 1998
"... The problems involved in developing efficient parallel programs have proved harder than those in developing efficient sequential ones, both for programmers and for compilers. Although program calculation has been found to be a promising way to solve these problems in the sequential world, we believe ..."
Abstract

Cited by 31 (23 self)
 Add to MetaCart
The problems involved in developing efficient parallel programs have proved harder than those in developing efficient sequential ones, both for programmers and for compilers. Although program calculation has been found to be a promising way to solve these problems in the sequential world, we believe that it needs much more effort to study its effective use in the parallel world. In this paper, we propose a calculational framework for the derivation of efficient parallel programs with two main innovations:  We propose a novel inductive synthesis lemma based on which an elementary but powerful parallelization theorem is developed.  We make the first attempt to construct a calculational algorithm for parallelization, deriving associative operators from data type definition and making full use of existing fusion and tupling calculations. Being more constructive, our method is not only helpful in the design of efficient parallel programs in general but also promising in the construc...
Polytypic Pattern Matching
 In Conference Record of FPCA '95, SIGPLANSIGARCHWG2.8 Conference on Functional Programming Languages and Computer Architecture
, 1995
"... The (exact) pattern matching problem can be informally specified as follows: given a pattern and a text, find all occurrences of the pattern in the text. The pattern and the text may both be lists, or they may both be trees, or they may both be multidimensional arrays, etc. This paper describes a g ..."
Abstract

Cited by 28 (8 self)
 Add to MetaCart
The (exact) pattern matching problem can be informally specified as follows: given a pattern and a text, find all occurrences of the pattern in the text. The pattern and the text may both be lists, or they may both be trees, or they may both be multidimensional arrays, etc. This paper describes a general patternmatching algorithm for all datatypes definable as an initial object in a category of F algebras, where F is a regular functor. This class of datatypes includes mutual recursive datatypes and lots of different kinds of trees. The algorithm is a generalisation of the Knuth, Morris, Pratt like patternmatching algorithm on trees first described by Hoffmann and O'Donnell. 1 Introduction Most editors provide a search function that takes a string of symbols and returns the first position in the text being edited at which this string of symbols occurs. The string of symbols is called a pattern, and the algorithm that detects the position at which a pattern occurs is called a (exa...
Algebra of logic programming
 International Conference on Logic Programming
, 1999
"... At present, the field of declarative programming is split into two main areas based on different formalisms; namely, functional programming, which is based on lambda calculus, and logic programming, which is based on firstorder logic. There are currently several language proposals for integrating th ..."
Abstract

Cited by 20 (3 self)
 Add to MetaCart
At present, the field of declarative programming is split into two main areas based on different formalisms; namely, functional programming, which is based on lambda calculus, and logic programming, which is based on firstorder logic. There are currently several language proposals for integrating the expressiveness of these two models of computation. In this thesis we work towards an integration of the methodology from the two research areas. To this end, we propose an algebraic approach to reasoning about logic programs, corresponding to the approach taken in functional programming. In the first half of the thesis we develop and discuss a framework which forms the basis for our algebraic analysis and transformation methods. The framework is based on an embedding of definite logic programs into lazy functional programs in Haskell, such that both the declarative and the operational semantics of the logic programs are preserved. In spite of its conciseness and apparent simplicity, the embedding proves to have many interesting properties and it gives rise to an algebraic semantics of logic programming. It also allows us to reason about logic programs in a simple calculational style, using rewriting and the algebraic laws of combinators. In the embedding, the meaning of a logic program arises compositionally from the meaning of its constituent subprograms and the combinators that connect them. In the second half of the thesis we explore applications of the embedding to the algebraic transformation of logic programs. A series of examples covers simple program derivations, where our techniques simplify some of the current techniques. Another set of examples explores applications of the more advanced program development techniques from the Algebra of Programming by Bird and de Moor [18], where we expand the techniques currently available for logic program derivation and optimisation. To my parents, Sandor and Erzsebet. And the end of all our exploring Will be to arrive where we started And know the place for the first time.
An Algebraic Construction of Predicate Transformers
 Science of Computer Programming
, 1994
"... . In this paper we present an algebraic construction of monotonic predicate transformers, using a categorical construction which is similar to the algebraic construction of the integers from the natural numbers. When applied to the category of sets and total functions once, it yields a category isom ..."
Abstract

Cited by 20 (1 self)
 Add to MetaCart
. In this paper we present an algebraic construction of monotonic predicate transformers, using a categorical construction which is similar to the algebraic construction of the integers from the natural numbers. When applied to the category of sets and total functions once, it yields a category isomorphic to the category of sets and relations; a second application yields a category isomorphic to the category of monotonic predicate transformers. This hierarchy cannot be extended further: the category of total functions is not itself an instance of the categorical construction, and can only be extended by it twice. 1 Introduction Predicate transformers were introduced originally by Dijkstra [8] in order to provide an elegant semantics for his programming language. Their strength lies in the fact that they can be used to model nondeterministic and nonterminating behaviour in terms of total functions, rather than relations. Not all monotonic predicate transformers represent programs in ...
Monadic Maps and Folds for Arbitrary Datatypes
 Memoranda Informatica, University of Twente
, 1994
"... Each datatype constructor comes equiped not only with a socalled map and fold (catamorphism), as is widely known, but, under some condition, also with a kind of map and fold that are related to an arbitrary given monad. This result follows from the preservation of initiality under lifting from the ..."
Abstract

Cited by 19 (0 self)
 Add to MetaCart
Each datatype constructor comes equiped not only with a socalled map and fold (catamorphism), as is widely known, but, under some condition, also with a kind of map and fold that are related to an arbitrary given monad. This result follows from the preservation of initiality under lifting from the category of algebras in a given category to a certain other category of algebras in the Kleisli category related to the monad.
Between Functions and Relations in Calculating Programs
, 1992
"... This thesis is about the calculational approach to programming, in which one derives programs from specifications. One such calculational paradigm is Ruby, the relational calculus developed by Jones and Sheeran for describing and designing circuits. We identify two shortcomings with derivations made ..."
Abstract

Cited by 15 (4 self)
 Add to MetaCart
This thesis is about the calculational approach to programming, in which one derives programs from specifications. One such calculational paradigm is Ruby, the relational calculus developed by Jones and Sheeran for describing and designing circuits. We identify two shortcomings with derivations made using Ruby. The first is that the notion of a program being an implementation of a specification has never been made precise. The second is to do with types. Fundamental to the use of type information in deriving programs is the idea of having types as special kinds of programs. In Ruby, types are partial equivalence relations (pers). Unfortunately, manipulating some formulae involving types has proved difficult within Ruby. In particular, the preconditions of the `induction' laws that are much used within program derivation often work out to be assertions about types; such assertions have typically been verified either by informal arguments or by using predicate calculus, rather than by ap...
A Categorical Model for Higher Order Imperative Programming
 Mathematical Structures in Computer Science
, 1993
"... This paper gives the first complete axiomatization for higher types in the refinement calculus of predicate transformers. ..."
Abstract

Cited by 14 (13 self)
 Add to MetaCart
This paper gives the first complete axiomatization for higher types in the refinement calculus of predicate transformers.
FUNCTIONAL PEARLS  Polytypic Unification
 Journal of Functional Programming
, 1998
"... Unification, or twoway pattern matching, is the process of solving an equation involving two firstorder terms with variables. Unification is used in type inference in many programming languages and in the execution of logic programs. This means that unification algorithms have to be written over a ..."
Abstract

Cited by 13 (3 self)
 Add to MetaCart
Unification, or twoway pattern matching, is the process of solving an equation involving two firstorder terms with variables. Unification is used in type inference in many programming languages and in the execution of logic programs. This means that unification algorithms have to be written over and over again for different termtypes. Many other functions also make sense for a large class of datatypes  examples are pretty printers, equality checks, maps etc. They can be defined by induction on the structure of userdefined datatypes. Implementations of these functions for different datatypes are closely related to the structure of the datatypes. We call such functions polytypic. This paper describes a unification algorithm parametrised on the type of the terms and shows how to use polytypism to obtain a unification algorithm that works for all regular term types.
Structure and Design of Problem Reduction Generators
 Client Resources on the Internet, IEEE Multimedia Systems ’99
, 1991
"... In this paper we present an axiomatic theory for a class of algorithms, called problem reduction generators, that includes dynamic programming, general branchandbound, and game tree search as special cases. This problem reduction theory is used as the basis for a mechanizable design tactic that tr ..."
Abstract

Cited by 12 (5 self)
 Add to MetaCart
In this paper we present an axiomatic theory for a class of algorithms, called problem reduction generators, that includes dynamic programming, general branchandbound, and game tree search as special cases. This problem reduction theory is used as the basis for a mechanizable design tactic that transforms formal specifications into problem reduction generators. The theory and tactic are illustrated by application to the problem of enumerating optimal binary search trees. Contents 1. Introduction 3 2. Basic Concepts And Notation 3 2.1. Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.2. Signatures and Structures . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.3. Problem Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3. Enumerating Feasible Solutions 6 3.1. Problem Reduction Theory . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.2. Design Tactic  Enumerating Feasible Solutions . . . . . . . . . . . . . ....