Results 1 
8 of
8
A New Approach to Generic Functional Programming
 In The 27th Annual ACM SIGPLANSIGACT Symposium on Principles of Programming Languages
, 1999
"... This paper describes a new approach to generic functional programming, which allows us to define functions generically for all datatypes expressible in Haskell. A generic function is one that is defined by induction on the structure of types. Typical examples include pretty printers, parsers, and co ..."
Abstract

Cited by 94 (13 self)
 Add to MetaCart
This paper describes a new approach to generic functional programming, which allows us to define functions generically for all datatypes expressible in Haskell. A generic function is one that is defined by induction on the structure of types. Typical examples include pretty printers, parsers, and comparison functions. The advanced type system of Haskell presents a real challenge: datatypes may be parameterized not only by types but also by type constructors, type definitions may involve mutual recursion, and recursive calls of type constructors can be arbitrarily nested. We show that despite this complexitya generic function is uniquely defined by giving cases for primitive types and type constructors (such as disjoint unions and cartesian products). Given this information a generic function can be specialized to arbitrary Haskell datatypes. The key idea of the approach is to model types by terms of the simply typed calculus augmented by a family of recursion operators. While co...
Algebraiccoalgebraic specification in CoCasl
 J. LOGIC ALGEBRAIC PROGRAMMING
, 2006
"... We introduce CoCasl as a simple coalgebraic extension of the algebraic specification language Casl. CoCasl allows the nested combination of algebraic datatypes and coalgebraic process types. We show that the wellknown coalgebraic modal logic can be expressed in CoCasl. We present sufficient criter ..."
Abstract

Cited by 19 (8 self)
 Add to MetaCart
We introduce CoCasl as a simple coalgebraic extension of the algebraic specification language Casl. CoCasl allows the nested combination of algebraic datatypes and coalgebraic process types. We show that the wellknown coalgebraic modal logic can be expressed in CoCasl. We present sufficient criteria for the existence of cofree models, also for several variants of nested cofree and free specifications. Moreover, we describe an extension of the existing proof support for Casl (in the shape of an encoding into higherorder logic) to CoCasl.
Recursive coalgebras from comonads
 Inform. and Comput
, 2006
"... The concept of recursive coalgebra of a functor was introduced in the 1970s by Osius in his work on categorical set theory to discuss the relationship between wellfounded induction and recursively specified functions. In this paper, we motivate the use of recursive coalgebras as a paradigm of struct ..."
Abstract

Cited by 9 (3 self)
 Add to MetaCart
The concept of recursive coalgebra of a functor was introduced in the 1970s by Osius in his work on categorical set theory to discuss the relationship between wellfounded induction and recursively specified functions. In this paper, we motivate the use of recursive coalgebras as a paradigm of structured recursion in programming semantics, list some basic facts about recursive coalgebras and, centrally, give new conditions for the recursiveness of a coalgebra based on comonads, comonadcoalgebras and distributive laws of functors over comonads. We also present an alternative construction using countable products instead of cofree comonads.
Monad Translating Inductive and Coinductive Types
 In Proc. Partial Evaluation and SemanticsBased Program Manipulation
, 2003
"... We show that the callbyname monad translation of simply typed lambda calculus extended with sum and product types extends to special and general inductive and coinductive types so that its crucial property of preserving typings and  and commuting reductions is maintained. Speci c similarpu ..."
Abstract

Cited by 5 (0 self)
 Add to MetaCart
We show that the callbyname monad translation of simply typed lambda calculus extended with sum and product types extends to special and general inductive and coinductive types so that its crucial property of preserving typings and  and commuting reductions is maintained. Speci c similarpurpose translations such as CPS translations follow from the general monad translations by specialization for appropriate concrete monads.
Corecursive Algebras: A Study of General Structured Corecursion (Extended Abstract)
"... Abstract. We study general structured corecursion, dualizing the work of Osius, Taylor, and others on general structured recursion. We call an algebra of a functor corecursive if it supports general structured corecursion: there is a unique map to it from any coalgebra of the same functor. The conce ..."
Abstract

Cited by 3 (1 self)
 Add to MetaCart
Abstract. We study general structured corecursion, dualizing the work of Osius, Taylor, and others on general structured recursion. We call an algebra of a functor corecursive if it supports general structured corecursion: there is a unique map to it from any coalgebra of the same functor. The concept of antifounded algebra is a statement of the bisimulation principle. We show that it is independent from corecursiveness: Neither condition implies the other. Finally, we call an algebra focusing if its codomain can be reconstructed by iterating structural refinement. This is the strongest condition and implies all the others. 1
The Recursion Scheme from the Cofree Recursive Comonad
"... We instantiate the general comonadbased construction of recursion schemes for the initial algebra of a functor F to the cofree recursive comonad on F. Differently from the scheme based on the cofree comonad on F in a similar fashion, this scheme allows not only recursive calls on elements structura ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
We instantiate the general comonadbased construction of recursion schemes for the initial algebra of a functor F to the cofree recursive comonad on F. Differently from the scheme based on the cofree comonad on F in a similar fashion, this scheme allows not only recursive calls on elements structurally smaller than the given argument, but also subsidiary recursions. We develop a Mendler formulation of the scheme via a generalized Yoneda lemma for initial algebras involving strong dinaturality and hint a relation to circular proofs à la Cockett, Santocanale.
Least and Greatest Fixed Points in Intuitionistic Natural Deduction
, 2002
"... This paper is a comparative study of a number of (intensionalsemantically distinct) least and greatest fixed point operators that naturaldeduction proof systems for intuitionistic logics can be extended with in a prooftheoretically defendable way. Eight pairs of such operators are analysed. The e ..."
Abstract
 Add to MetaCart
This paper is a comparative study of a number of (intensionalsemantically distinct) least and greatest fixed point operators that naturaldeduction proof systems for intuitionistic logics can be extended with in a prooftheoretically defendable way. Eight pairs of such operators are analysed. The exposition is centered around a cubeshaped classification where each node stands for an axiomatization of one pair of operators as logical constants by intended proof and reduction rules and each arc for a proof and reductionpreserving encoding of one pair in terms of another. The three dimensions of the cube reflect three orthogonal binary options: conventionalstyle vs. Mendlerstyle, basic (``[co]iterative'') vs. enhanced (``primitive[co]recursive''), simple vs. courseofvalue [co]induction. Some of the axiomatizations and encodings are wellknown; others, however, are novel; the classification into a cube is also new. The differences between the least fixed point operators considered are illustrated on the example of the corresponding natural number types.
Adjoint Folds and Unfolds Or: Scything Through the Thicket of Morphisms
"... Abstract. Folds and unfolds are at the heart of the algebra of programming. They allow the cognoscenti to derive and manipulate programs rigorously and effectively. Fundamental laws such as fusion codify basic optimisation principles. However, most, if not all, programs require some tweaking to be g ..."
Abstract
 Add to MetaCart
Abstract. Folds and unfolds are at the heart of the algebra of programming. They allow the cognoscenti to derive and manipulate programs rigorously and effectively. Fundamental laws such as fusion codify basic optimisation principles. However, most, if not all, programs require some tweaking to be given the form of an (un) fold, and thus make them amenable to formal manipulation. In this paper, we remedy the situation by introducing adjoint folds and unfolds. We demonstrate that most programs are already of the required form and thus are directly amenable to manipulation. Central to the development is the categorical notion of an adjunction, which links adjoint (un) folds to standard (un) folds. We discuss a number of adjunctions and show that they are directly relevant to programming.