Results 1  10
of
14
Principles of Programming with Complex Objects and Collection Types
 Theoretical Computer Science
, 1995
"... We present a new principle for the development of database query languages that the primitive operations should be organized around types. Viewing a relational database as consisting of sets of records, this principle dictates that we should investigate separately operations for records and sets. Th ..."
Abstract

Cited by 132 (28 self)
 Add to MetaCart
We present a new principle for the development of database query languages that the primitive operations should be organized around types. Viewing a relational database as consisting of sets of records, this principle dictates that we should investigate separately operations for records and sets. There are two immediate advantages of this approach, which is partly inspired by basic ideas from category theory. First, it provides a language for structures in which record and set types may be freely combined: nested relations or complex objects. Second, the fundamental operations for sets are closely related to those for other "collection types" such as bags or lists, and this suggests how database languages may be uniformly extended to these new types. The most general operation on sets, that of structural recursion, is one in which not all programs are welldefined. In looking for limited forms of this operation that always give rise to welldefined operations, we find a number of close ...
Merging Monads and Folds for Functional Programming
 In Advanced Functional Programming, LNCS 925
, 1995
"... . These notes discuss the simultaneous use of generalised fold operators and monads to structure functional programs. Generalised fold operators structure programs after the decomposition of the value they consume. Monads structure programs after the computation of the value they produce. Our progra ..."
Abstract

Cited by 50 (2 self)
 Add to MetaCart
. These notes discuss the simultaneous use of generalised fold operators and monads to structure functional programs. Generalised fold operators structure programs after the decomposition of the value they consume. Monads structure programs after the computation of the value they produce. Our programs abstract both from the recursive processing of their input as well as from the sideeffects in computing their output. We show how generalised monadic folds aid in calculating an efficient graph reduction engine from an inefficient specification. 1 Introduction Should I structure my program after the decomposition of the value it consumes or after the computation of the value it produces? Some [Bir89, Mee86, Mal90, Jeu90, MFP91] argue in favour of structuring programs after the decomposition of the value they consume. Such syntax directed programs are written using a limited set of recursion functionals. These functionals, called catamorphisms or generalised fold operators are naturally ...
Calculate Polytypically!
 In PLILP'96, volume 1140 of LNCS
, 1996
"... A polytypic function definition is a function definition that is parametrised with a datatype. It embraces a class of algorithms. As an example we define a simple polytypic "crush" combinator that can be used to calculate polytypically. The ability to define functions polytypically adds an ..."
Abstract

Cited by 41 (3 self)
 Add to MetaCart
(Show Context)
A polytypic function definition is a function definition that is parametrised with a datatype. It embraces a class of algorithms. As an example we define a simple polytypic "crush" combinator that can be used to calculate polytypically. The ability to define functions polytypically adds another level of flexibility in the reusability of programming idioms and in the design of libraries of interoperable components.
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
(Show Context)
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...
Calculating Software Generators from Solution Specifications
 In TAPSOFT'95, volume 915 of LNCS
, 1994
"... Software application generators can eliminate many of the technical aspects of programming for most computer users. We have developed a uniform approach to the design of program generators, based upon a simple ideaprovide a declarative specification language for each application domain and give i ..."
Abstract

Cited by 9 (7 self)
 Add to MetaCart
(Show Context)
Software application generators can eliminate many of the technical aspects of programming for most computer users. We have developed a uniform approach to the design of program generators, based upon a simple ideaprovide a declarative specification language for each application domain and give it a computable, denotational semantics. To make this idea practical, however, requires a comprehensive system for transforming and translatiing expressions in the higherorder functional operators of the semantics formulation into a reasonably efficient implementation expressed in a firstorder, imperative programming language. This paper describes the system we have built to accomplish this. The technique and the system have been applied to produce a generator for modules that validate and translate messages sent from a peripheral sensor to a central controller. The input to a generator is a specification of the data formats and data constraints that characterize a message. The output is an...
Programming with Algebras
 Advanced Functional Programming, number 925 in Lecture Notes in Computer Science
, 1995
"... Introduction From the early days of computing, many individuals have recognized that algebras provide interesting mathematical models for at least some aspects of programs. In mathematics, an algebra consists of a set (called the carrier of the algebra), together with a finite set of total function ..."
Abstract

Cited by 8 (2 self)
 Add to MetaCart
Introduction From the early days of computing, many individuals have recognized that algebras provide interesting mathematical models for at least some aspects of programs. In mathematics, an algebra consists of a set (called the carrier of the algebra), together with a finite set of total functions that have the carrier set as their common codomain. The algebras we learn in school, however, are usually those derived from number theory and programs are more diverse, if not richer, than operations on numbers. A somewhat more abstract notion, called signature algebras, has been used for some time to to model abstract data types [GTW78]. A signature defines a set of typed operator symbols without specifying functions that would be the actual operators. Thus a signature defines a class of algebras, namely the algebras whose operators conform to the typing constraints imposed by the signature. Signature algebras have been helpful in understanding the issues involved in abstract dat
Bottomup Grammar Analysis  A Functional Formulation
 PROCEEDINGS PROGRAMMING LANGUAGES AND SYSTEMSESOP '94
, 1994
"... This paper discusses bottomup grammar analysis problems such as the Empty problem and the First problem. It defines a general class of bottom up grammar analysis problems, and from this definition it derives a functional program for performing bottomup grammar analysis. The derivation is purely ..."
Abstract

Cited by 7 (3 self)
 Add to MetaCart
This paper discusses bottomup grammar analysis problems such as the Empty problem and the First problem. It defines a general class of bottom up grammar analysis problems, and from this definition it derives a functional program for performing bottomup grammar analysis. The derivation is purely calculational, using theorems from lattice theory, the BirdMeertens calculus, and laws for listcomprehensions. Sufficient conditions guaranteeing the existence of a solution emerge as a byproduct of the calculation. The resulting program is used to construct programs for the Empty problem and the First problem.
Constructing Functional Programs for Grammar Analysis Problems
 In Conference Record of FPCA '95, SIGPLANSIGARCHWG2.8 Conference on Functional Programming Languages and Computer Architecture
, 1995
"... This paper discusses the derivation of functional programs for grammar analysis problems, such as the Empty problem and the Reachable problem. Grammar analysis problems can be divided into two classes: topdown problems such as Follow and Reachable, which are described in terms of the contexts of n ..."
Abstract

Cited by 7 (3 self)
 Add to MetaCart
(Show Context)
This paper discusses the derivation of functional programs for grammar analysis problems, such as the Empty problem and the Reachable problem. Grammar analysis problems can be divided into two classes: topdown problems such as Follow and Reachable, which are described in terms of the contexts of nonterminals, and bottomup problems such as Empty and First, which do not refer to contexts. In a previous paper we derive a program for bottomup grammar analysis problems. In this paper we derive a program for topdown grammar analysis problems by transforming the specification of an arbitrary topdown problem into a program. The existence of a solution is guaranteed provided some natural conditions are satisfied. Furthermore, we describe a general transformation that applies to both classes of grammar analysis problems. The result of this transformation is a program that avoids unnecessary computations in the computation of a fixed point. Constructor classes, which are used to abstract fr...
The derivation of online algorithms, with an application to finding palindromes
 Algorithmica
, 1994
"... Abstract. A theory for the derivation of online algorithms is presented. The algorithms are derived in the BirdMeertens calculus for program transformations. This calculus provides a concise functional notation for algorithms, and a few powerful theorems for proving equalities of functions. The th ..."
Abstract

Cited by 7 (4 self)
 Add to MetaCart
(Show Context)
Abstract. A theory for the derivation of online algorithms is presented. The algorithms are derived in the BirdMeertens calculus for program transformations. This calculus provides a concise functional notation for algorithms, and a few powerful theorems for proving equalities of functions. The theory for the derivation of online algorithms is illustrated with the derivation of an algorithm for finding palindromes. An online lineartime random access machine (RAM) algorithm for finding the longest palindromic substring in a string is derived, For the purpose of finding the longest palindromic substring, all maximal palindromic substrings are computed. The list of maximal palindromes obtained in the computation of the longest palindrome can be used for other purposes such as finding the largest palindromic rectangle in a matrix and finding the shortest partition of a string into palindromes. Key Words. Derivation of online algorithms, Transformational programming, BirdMeertens calcu