English

Enhancing expressivity of checked corecursive streams (extended version)

Programming Languages 2022-02-15 v1

Abstract

We propose a novel approach to stream definition and manipulation. Our solution is based on two key ideas. Regular corecursion, which avoids non termination by detecting cyclic calls, is enhanced, by allowing in equations defining streams other operators besides the stream constructor. In this way, some non-regular streams are definable. Furthermore, execution includes a runtime check to ensure that the stream generated by a function call is well-defined, in the sense that access to an arbitrary index always succeeds. We extend the technique beyond the simple stream operators considered in previous work, notably by adding an interleaving combinator which has a non-trivial recursion scheme.

Keywords

Cite

@article{arxiv.2202.06868,
  title  = {Enhancing expressivity of checked corecursive streams (extended version)},
  author = {Davide Ancona and Pietro Barbieri and Elena Zucca},
  journal= {arXiv preprint arXiv:2202.06868},
  year   = {2022}
}

Comments

23 pages. arXiv admin note: substantial text overlap with arXiv:2108.00281

R2 v1 2026-06-24T09:35:46.783Z