## Build, augment and destroy. Universally (2004)

Venue: | In Asian Symposium on Programming Languages, Proceedings |

Citations: | 4 - 3 self |

### BibTeX

@INPROCEEDINGS{Ghani04build,augment,

author = {Neil Ghani and Tarmo Uustalu and Varmo Vene},

title = {Build, augment and destroy. Universally},

booktitle = {In Asian Symposium on Programming Languages, Proceedings},

year = {2004},

pages = {327--347},

publisher = {Springer-Verlag}

}

### OpenURL

### Abstract

Abstract. We give a semantic footing to the fold/build syntax of programming with inductive types, covering shortcut deforestation, based on a universal property. Specifically, we give a semantics for inductive types based on limits of algebra structure forgetting functors and show that it is equivalent to the usual initial algebra semantics. We also give a similar semantic account of the augment generalization of build and of the unfold/destroy syntax of coinductive types. 1

### Citations

195 | A short cut to deforestation
- Gill, Launchbury, et al.
- 1993
(Show Context)
Citation Context ...its semantics as an initial algebra. The same can be said about coinductive types and their final coalgebra semantics. Recently there has been a significant amount of work starting with Gill et al.’s =-=[10]-=- which proposes an alternative approach to programming with inductive types based on using the fold-combinator in interaction with a new W.-N. Chin (Ed.): APLAS 2004, LNCS 3302, pp. 327–347, 2004. c○ ... |

62 | Cheap Deforestation for Non-strict Functional Languages
- Gill
- 1996
(Show Context)
Citation Context ...ce to define the in/fold syntax validating all in/fold axioms. – The flexibility of this semantic approach is demonstrated by the ease with which we extend it to cover the fold/augment fusion of Gill =-=[11]-=- and the unfold/destroy paradigm of programming with coinductive types. (As a matter of fact, helped by the transparency of the framework, we have found that a useful augment combinator is definable n... |

46 | A typed lambda calculus with categorical type constructors
- Hagino
- 1987
(Show Context)
Citation Context ...ment generalization of build and of the unfold/destroy syntax of coinductive types. 1 Introduction The beauty of the in/fold and out/unfold syntax for programming with inductive and coinductive types =-=[13, 21]-=- is thanks to the fact that it is based directly on the semantic interpretation of such types as initial algebras and final coalgebras. Apart from the clarity provided by this close match between synt... |

45 |
Functorial polymorphism
- Bainbridge, Freyd, et al.
- 1990
(Show Context)
Citation Context ... in [30, 18]. The landmark works on parametricity are Reynold’s and Wadler’s papers [26, 27, 34], categorical studies on the semantics of polymorphism based on dinaturality and strengthenings include =-=[12, 2, 8]-=-. Some discussions of the implications of parametricity for (co)inductive types are [36, 14, 1]. Strong dinaturality, most probably first introduced in [23], has recently been studied closely in [5, 6... |

44 |
Automatic synthesis of typed Λ-programs on term algebras
- Böhm, Berarducci
- 1985
(Show Context)
Citation Context ...ositions, and it is exactly these constructor occurrences that folds replace. More generally, we have constructed a categorical version of the type quantification based encoding of inductive types of =-=[19, 3]-=-.sBuild, Augment and Destroy, Universally 335 2.4 Strong Dinatural Transformations We now turn to the question about the coherence condition of UF -cones. It is rather well-behaved: we will shortly se... |

26 |
Categorical data types in parametric polymorphism
- Hasegawa
- 1994
(Show Context)
Citation Context ...4], categorical studies on the semantics of polymorphism based on dinaturality and strengthenings include [12, 2, 8]. Some discussions of the implications of parametricity for (co)inductive types are =-=[36, 14, 1]-=-. Strong dinaturality, most probably first introduced in [23], has recently been studied closely in [5, 6]. Most closely related to the work reported here, Johann [16, 15] has given a thorough proof o... |

18 | Logical relations and inductive/coinductive types
- Altenkirch
- 1999
(Show Context)
Citation Context ...4], categorical studies on the semantics of polymorphism based on dinaturality and strengthenings include [12, 2, 8]. Some discussions of the implications of parametricity for (co)inductive types are =-=[36, 14, 1]-=-. Strong dinaturality, most probably first introduced in [23], has recently been studied closely in [5, 6]. Most closely related to the work reported here, Johann [16, 15] has given a thorough proof o... |

17 |
A generalization of short-cut fusion and its correctness proof
- Johann
(Show Context)
Citation Context ...to arbitrary inductive types by abstracting over non-recursive constructors, to obtain a version of shortcut deforestation tailored specifically for functions that graft. This has been done by Johann =-=[15]-=-. We present however a slightly more general version and, following our general methodology, derive it from a unique existence situation. Let H : C→Cbe a functor and let T ′ : C→[C, C] be the functor ... |

12 | Normal forms and cutfree proofs as natural transformations
- Girard, Scedrov, et al.
- 1989
(Show Context)
Citation Context ... in [30, 18]. The landmark works on parametricity are Reynold’s and Wadler’s papers [26, 27, 34], categorical studies on the semantics of polymorphism based on dinaturality and strengthenings include =-=[12, 2, 8]-=-. Some discussions of the implications of parametricity for (co)inductive types are [36, 14, 1]. Strong dinaturality, most probably first introduced in [23], has recently been studied closely in [5, 6... |

10 |
Short cut fusion is correct
- Johann
- 2003
(Show Context)
Citation Context ...r (co)inductive types are [36, 14, 1]. Strong dinaturality, most probably first introduced in [23], has recently been studied closely in [5, 6]. Most closely related to the work reported here, Johann =-=[16, 15]-=- has given a thorough proof of the correctness of fold/build and fold/augment fusion via parametricity of contextual equivalence. Pavlovic [25] has analyzed fold/build fusion in terms of “paranatural”... |

7 | Coalgebraic monads
- Ghani, Luth, et al.
- 2002
(Show Context)
Citation Context ... brings. As future work we intend to give an account of rational types (essentially non-wellfounded trees with finitely many distinct subtrees) based on the general theory put forward in Ghani et al. =-=[9]-=- in order to systematically study disciplines for programming with rational types such as the “cycle therapy” of Turbak and Wells [31]. We also plan to achieve a similar account for the vanish combina... |

7 |
Categories of processes enriched in final coalgebras
- Krstić, Launchbury, et al.
(Show Context)
Citation Context ... via initial algebras as described in [32]. Some parameterized inductive types covered by this more general construction are, e.g., finitely branching node labelled trees and inductive hyperfunctions =-=[17]-=-. 4 Coinductive Types and Destroy Since coinductive types are dual to inductive types, it is clear that, if inductive types admit a universal characterization with builds as the mediating maps, then t... |

5 |
Dinatural transformations
- Dubuc, Street
- 1970
(Show Context)
Citation Context ...formations and strongly dinatural transformations are two generalizations of the concept of natural transformation for mixed-variant functors. Standard dinaturality, as introduced by Dubuc and Street =-=[4]-=-, is fairly well known, but, for reference, we record the definition. Definition 3 (Dinaturality). Let H, K : C op ×C → D be functors. A dinatural transformation Θ : H → K is a family of maps ΘX : H(X... |

2 | Categories and Types for Axiomatic Domain Theory
- Eppendahl
- 2003
(Show Context)
Citation Context ...2, 8]. Some discussions of the implications of parametricity for (co)inductive types are [36, 14, 1]. Strong dinaturality, most probably first introduced in [23], has recently been studied closely in =-=[5, 6]-=-. Most closely related to the work reported here, Johann [16, 15] has given a thorough proof of the correctness of fold/build and fold/augment fusion via parametricity of contextual equivalence. Pavlo... |

1 |
Parametricity and Mulry’s strong dinaturality
- Eppendahl
- 1999
(Show Context)
Citation Context ...2, 8]. Some discussions of the implications of parametricity for (co)inductive types are [36, 14, 1]. Strong dinaturality, most probably first introduced in [23], has recently been studied closely in =-=[5, 6]-=-. Most closely related to the work reported here, Johann [16, 15] has given a thorough proof of the correctness of fold/build and fold/augment fusion via parametricity of contextual equivalence. Pavlo... |

1 | Using the parametricity proposition for program fusion - Fegaras - 1996 |