English

Safe asynchronous mixed-choice for timed interactions

Programming Languages 2023-07-25 v1

Abstract

Mixed-choice has long been barred from models of asynchronous communication since it compromises key properties of communicating finite-state machines. Session types inherit this restriction, which precludes them from fully modelling timeouts -- a key programming feature to handle failures. To address this deficiency, we present (binary) TimeOut Asynchronous Session Types ({TOAST}) as an extension to (binary) asynchronous timed session types to permit mixed-choice. {TOAST} deploy timing constraints to regulate the use of mixed-choice so as to preserve communication safety. We provide a new behavioural semantics for {TOAST} which guarantees progress in the presence of mixed-choice. Building upon {TOAST}, we provide a calculus featuring process timers which is capable of modelling timeouts using a receive-after\mathtt{receive\text{-}after} pattern, much like Erlang, and informally illustrate the correspondence with TOAST specifications.

Keywords

Cite

@article{arxiv.2307.12688,
  title  = {Safe asynchronous mixed-choice for timed interactions},
  author = {Jonah Pears and Laura Bocchi and Andy King},
  journal= {arXiv preprint arXiv:2307.12688},
  year   = {2023}
}

Comments

18 pages, 8 figures, accepted at COORDINATION 2023

R2 v1 2026-06-28T11:38:31.100Z