Arrow Research search
Back to I&C

I&C 2018

Complexity bounds for container functors and comonads

Journal Article journal-article Computer Science ยท Theoretical Computer Science

Abstract

Abbott et al. 's notion of containers characterises a subset of parametric data types which can be described by a set of shapes and set of positions for each shape. This captures common data types such as tuples, lists, trees, arrays, and graphs. Various useful categorical structures can be derived for containers given additional information. For example, directed containers give rise to container comonads (Ahman et al.). Containers provide a useful reasoning principle and asbtraction mechanism for programming. This paper studies the performance characteristics of traversal schemes over containers, modelled by functor and comonad structures. A cost model for container transformations is defined from which complexity bounds for the operations of container functors and comonads are derived. These bounds suggest optimisations for programs structured using these idioms. The abstract interface provided by the syntax of containers and category theory provides complexity bounds and subsequent optimisations that are implementation agnostic (machine free).

Authors

Keywords

No keywords are indexed for this paper.

Context

Venue
Information and Computation
Archive span
1987-2026
Indexed papers
3021
Paper id
461172986755788863
v2026.09.13