Towards deriving type systems and implementations for coroutines

  • Authors:
  • Konrad Anton;Peter Thiemann

  • Affiliations:
  • Institut für Informatik, Universität Freiburg;Institut für Informatik, Universität Freiburg

  • Venue:
  • APLAS'10 Proceedings of the 8th Asian conference on Programming languages and systems
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Starting from reduction semantics for several styles of coroutines from the literature, we apply Danvy's method to obtain equivalent functional implementations (definitional interpreters) for them. By applying existing type systems for programs with continuations, we obtain sound type systems for coroutines through the translation. The resulting type systems are similar to earlier hand-crafted ones. As a side product, we obtain implementations for these styles of coroutines in OCaml.