Results 1 - 10
of
13
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 111 (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 well-defined 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 46 (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 side-effects 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 another leve ..."
Abstract
-
Cited by 41 (3 self)
- Add to MetaCart
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.
Theories for Algorithm Calculation
, 1993
"... Theorie"en voor het berekenen van algoritmen (met een samenvatting in het Nederlands) PROEFSCHRIFT ter verkrijging van de graad van doctor aan de Rijksuniversiteit te Utrecht op gezag van de Rector Magnificus, Prof. Dr. J.A. van Ginkel ingevolge het besluit van het College van Dekanen ..."
Abstract
-
Cited by 37 (4 self)
- Add to MetaCart
Theorie"en voor het berekenen van algoritmen (met een samenvatting in het Nederlands) PROEFSCHRIFT ter verkrijging van de graad van doctor aan de Rijksuniversiteit te Utrecht op gezag van de Rector Magnificus, Prof. Dr. J.A. van Ginkel ingevolge het besluit van het College van Dekanen
Polytypic Pattern Matching
- In Conference Record of FPCA '95, SIGPLAN-SIGARCH-WG2.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 multi-dimensional 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 multi-dimensional arrays, etc. This paper describes a general pattern-matching 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 pattern-matching 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 idea---provide a declarative specification language for each application domain and give i ..."
Abstract
-
Cited by 9 (7 self)
- Add to MetaCart
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 idea---provide 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 higher-order functional operators of the semantics formulation into a reasonably efficient implementation expressed in a first-order, 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
Bottom-up Grammar Analysis - A Functional Formulation
- Proceedings Programming Languages and SystemsESOP '94
, 1994
"... This paper discusses bottom-up 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 bottom-up grammar analysis. The derivation is purely ..."
Abstract
-
Cited by 7 (3 self)
- Add to MetaCart
This paper discusses bottom-up 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 bottom-up grammar analysis. The derivation is purely calculational, using theorems from lattice theory, the Bird-Meertens calculus, and laws for list-comprehensions. 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. 1 Introduction Grammar analysis is performed in many different situations: Yacc tests whether or not its input grammar is LALR(1), parser generators contain functions for determining whether or not a nonterminal can derive the empty string (Empty) as part of determining the set of all symbols that can appear as the first symbol of a derived string (First), and for determining the ...
Constructing Functional Programs for Grammar Analysis Problems
- In Conference Record of FPCA '95, SIGPLAN-SIGARCH-WG2.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: top-down 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
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: top-down problems such as Follow and Reachable, which are described in terms of the contexts of nonterminals, and bottom-up problems such as Empty and First, which do not refer to contexts. In a previous paper we derive a program for bottom-up grammar analysis problems. In this paper we derive a program for top-down grammar analysis problems by transforming the specification of an arbitrary top-down 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 on-line algorithms, with an application to finding palindromes
- Algorithmica
, 1994
"... Abstract. A theory for the derivation of on-line algorithms is presented. The algorithms are derived in the Bird-Meertens 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 5 (1 self)
- Add to MetaCart
Abstract. A theory for the derivation of on-line algorithms is presented. The algorithms are derived in the Bird-Meertens 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 on-line algorithms is illustrated with the derivation of an algorithm for finding palindromes. An on-line linear-time 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 on-line algorithms, Transformational programming, Bird-Meertens calcu-

