Parametric (co)iteration vs. primitive direcursion

  • Authors:
  • Johan Glimming

  • Affiliations:
  • Department of Numerical Analysis and Computer Science, Stockholm University, Sweden

  • Venue:
  • CALCO'07 Proceedings of the 2nd international conference on Algebra and coalgebra in computer science
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

Freyd showed that in certain CPO-categories, locally continuous functors have minimal invariants, which possess a structure that he termed dialgebra. This gives rise to a category of dialgebras and homomorphisms, where the minimal invariants are initial, inducing a powerful recursion scheme (direcursion) on a cpo. In this paper, we identify a problem appearing when translating (co)iterative functions (on a fixed parameterised datatype) to direcursion (on the same datatype), and present a solution to this problem as a recursion scheme (primitive direcursion), generalising and symmetrising primitive (co)recursion for endofunctors. To this end, we give a uniform technique for translating (co)iterative maps into direcursive maps. This immediately gives a plethora of examples of direcursive functions, improving on the situation in the literature where only a few examples have appeared. Moreover, a technical trick proposed in a POPL paper is avoided for the translated maps. We conclude the paper by applying the results to a denotational semantics of Abadi and Cardelli's typed object calculus, and linking them to previous work on higher-order coalgebra and to bisimulations.