Categorical Programming with Abstract Data Types

  • Authors:
  • Martin Erwig

  • Affiliations:
  • -

  • Venue:
  • AMAST '98 Proceedings of the 7th International Conference on Algebraic Methodology and Software Technology
  • Year:
  • 1999

Quantified Score

Hi-index 0.00

Visualization

Abstract

We show how to define fold operators for abstract data types. The main idea is to represent an ADT by a bialgebra, that is, an algebra/coalgebra pair with a common carrier. A program operating on an ADT is given by a mapping to another ADT. Such a mapping, called metamorphism, is basically a composition of the algebra of the second with the coalgebra of the first ADT. We investigate some properties of metamorphisms, and we show that the metamorphic programming style offers far-reaching opportunities for program optimization that cover and even extend those known for algebraic data types.