English

Type-Based Termination for Futures

Programming Languages 2024-04-16 v6 Logic in Computer Science

Abstract

In sequential functional languages, sized types enable termination checking of programs with complex patterns of recursion in the presence of mixed inductive-coinductive types. In this paper, we adapt sized types and their metatheory to the concurrent setting. We extend the semi-axiomatic sequent calculus, a subsuming paradigm for futures-based functional concurrency, and its underlying operational semantics with recursion and arithmetic refinements. The latter enables a new and highly general sized type scheme we call sized type refinements. As a widely applicable technical device, we type recursive programs with infinitely deep typing derivations that unfold all recursive calls. Then, we observe that certain such derivations can be made infinitely wide but finitely deep. The resulting trees serve as the induction target of our termination result, which we develop via a novel logical relations argument.

Keywords

Cite

@article{arxiv.2105.06024,
  title  = {Type-Based Termination for Futures},
  author = {Siva Somayyajula and Frank Pfenning},
  journal= {arXiv preprint arXiv:2105.06024},
  year   = {2024}
}

Comments

23 pages. Extended version

R2 v1 2026-06-24T02:03:43.264Z