Type-Based Termination for Futures
Siva Somayyajula, Frank Pfenning
TL;DR
Type-Based Termination for Futures develops a general framework of arithmetic-refined sized types for futures-based concurrency. It introduces SAX$^\infty$, extending SAX with recursion and size refinements, and SAX$^\omega$, a finitely-deep, translatable counterpart to prove termination via a novel logical-relations argument over configurations. The approach allows infinitely deep typing derivations to be reduced to infinitely wide but finite-depth proofs, enabling a compositional termination criterion in a concurrent setting. This work advances termination guarantees for mixed inductive-coinductive programs and provides a foundation for future extensions to richer types and practical implementations in concurrent functional languages.
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.
