Results 1  10
of
19
Generic Programming — An Introduction
 3rd International Summer School on Advanced Functional Programming
, 1999
"... ..."
(Show Context)
Polytypic Programming With Ease
, 1999
"... A functional polytypic program is one that is parameterised by datatype. Since polytypic functions are defined by induction on types rather than by induction on values they typically operate on a higher level of abstraction than their monotypic counterparts. However, polytypic programming is not nec ..."
Abstract

Cited by 15 (5 self)
 Add to MetaCart
(Show Context)
A functional polytypic program is one that is parameterised by datatype. Since polytypic functions are defined by induction on types rather than by induction on values they typically operate on a higher level of abstraction than their monotypic counterparts. However, polytypic programming is not necessarily more complicated than conventional programming. We show that a polytypic function is uniquely defined by its action on constant functors, projection functors, sums, and products. This information is sufficient to specialize a polytypic function to arbitrary polymorphic datatypes, including mutually recursive datatypes and nested datatypes. The key idea is to use infinite trees as index sets for polytypic functions and to interpret datatypes as algebraic trees. This approach appears both to be simpler, more general, and more efficient than previous ones which are based on the initial algebra semantics of datatypes. Polytypic functions enjoy polytypic properties. We show that wellkno...
When Do Datatypes Commute?
 Category Theory and Computer Science, 7th International Conference, volume 1290 of LNCS
, 1997
"... Polytypic programs are programs that are parameterised by type constructors (like List), unlike polymorphic programs which are parameterised by types (like Int). In this paper we formulate precisely the polytypic programming problem of "commuting " two datatypes. The precise formulation ..."
Abstract

Cited by 15 (3 self)
 Add to MetaCart
Polytypic programs are programs that are parameterised by type constructors (like List), unlike polymorphic programs which are parameterised by types (like Int). In this paper we formulate precisely the polytypic programming problem of "commuting " two datatypes. The precise formulation involves a novel notion of higher order polymorphism. We demonstrate via a number of examples the relevance and interest of the problem, and we show that all "regular datatypes" (the sort of datatypes that one can define in a functional programming language) do indeed commute according to our specification. The framework we use is the theory of allegories, a combination of category theory with the pointfree relation calculus. 1 Polytypism The ability to abstract is vital to success in computer programming. At the macro level of requirements engineering the successful designer is the one able to abstract from the particular wishes of a few clients a general purpose product that can capture a l...
Generic Properties of Datatypes
, 2002
"... Generic programming adds a new dimension to the parametrisation of programs by allowing programs to be dependent on the structure of the data that they manipulate. ..."
Abstract

Cited by 7 (1 self)
 Add to MetaCart
(Show Context)
Generic programming adds a new dimension to the parametrisation of programs by allowing programs to be dependent on the structure of the data that they manipulate.
Final Dialgebras: From Categories to Allegories
 Workshop on Fixed Points in Computer Science
, 1999
"... The study of inductive and coinductive types (like finite lists and streams, respectively) is usually conducted within the framework of category theory, which to all intents and purposes is a theory of sets and functions between sets. Allegory theory, an extension of category theory due to Freyd, is ..."
Abstract

Cited by 7 (4 self)
 Add to MetaCart
The study of inductive and coinductive types (like finite lists and streams, respectively) is usually conducted within the framework of category theory, which to all intents and purposes is a theory of sets and functions between sets. Allegory theory, an extension of category theory due to Freyd, is better suited to modelling relations between sets as opposed to functions between sets. The question thus arises of how to extend the standard categorical results on the existence of final objects in categories (for example, coalgebras and products) to their existence in allegories. The motivation is to streamline current work on generic programming, in which the use of a relational theory rather than a functional theory has proved to be desirable. In this paper, we define the notion of a relational final dialgebra and prove, for an important class of dialgebras, that a relational final dialgebra exists in an allegory if and only if a final dialgebra exists in the underlying category of map...
Mathematics of Recursive Program Construction
, 2001
"... A discipline for the design of recursive programs is presented. The core concept ..."
Abstract

Cited by 5 (1 self)
 Add to MetaCart
A discipline for the design of recursive programs is presented. The core concept
The Gist of Side Effects in Pure Functional Languages
, 2005
"... We explain the gist of how to attain side effects in pure functional programming languages via monads and unique types with inputoutput as a motivating example. Our vehicle for illustration is the strongly typechecked, pure, and nonstrict functional language Haskell. The categorytheoretical o ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
We explain the gist of how to attain side effects in pure functional programming languages via monads and unique types with inputoutput as a motivating example. Our vehicle for illustration is the strongly typechecked, pure, and nonstrict functional language Haskell. The categorytheoretical origins of monads are explained. Some basic notions of Category Theory are also presented in programming terms. We provide a list of suggested reading material in the references.
Polytypic Functional Programming and Data Abstraction
, 2006
"... Structural polymorphism is a generic programming technique known within the functional programming community under the names of polytypic or datatypegeneric programming. In this thesis we show that such a technique conflicts with the principle of data abstraction and propose a solution for reconcil ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
(Show Context)
Structural polymorphism is a generic programming technique known within the functional programming community under the names of polytypic or datatypegeneric programming. In this thesis we show that such a technique conflicts with the principle of data abstraction and propose a solution for reconciliation. More concretely, we show that popular polytypic extensions of the functional programming language Haskell, namely, Generic Haskell and Scrap your Boilerplate have their genericity limited by data abstraction. We propose an extension to the Generic Haskell language where the `structure' in `structural polymorphism' is defined around the concept of interface and not the representation of a type.
Categorial Compositionality III: F(co)algebras and the Systematicity of Recursive Capacities in Human Cognition
, 2012
"... Human cognitive capacity includes recursively definable concepts, which are prevalent in domains involving lists, numbers, and languages. Cognitive science currently lacks a satisfactory explanation for the systematic nature of such capacities (i.e., why the capacity for some recursive cognitive abi ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
(Show Context)
Human cognitive capacity includes recursively definable concepts, which are prevalent in domains involving lists, numbers, and languages. Cognitive science currently lacks a satisfactory explanation for the systematic nature of such capacities (i.e., why the capacity for some recursive cognitive abilities–e.g., finding the smallest number in a list–implies the capacity for certain others–finding the largest number, given knowledge of number order). The categorytheoretic constructs of initial Falgebra, catamorphism, and their duals, final coalgebra and anamorphism provide a formal, systematic treatment of recursion in computer science. Here, we use this formalism to explain the systematicity of recursive cognitive capacities without ad hoc assumptions (i.e., to the same explanatory standard used in our account of systematicity for nonrecursive capacities). The presence of an initial algebra/final coalgebra explains systematicity because all recursive cognitive capacities, in the domain of interest, factor through (are composed of) the same component process. Moreover, this factorization is unique, hence no further (ad hoc) assumptions are required to establish the intrinsic connection between members of a group of systematicallyrelated capacities. This formulation also provides a new perspective on the relationship between recursive cognitive capacities. In particular, the link between number and language does not depend on recursion, as such, but on the underlying functor on which the group of recursive capacities is based. Thus, many species