Abstract

A binary session is a private communication channel that connects two processes, each adhering to a protocol description called session type . In this work, we study the first type system that ensures the fair termination of binary sessions. A session fairly terminates if all of the infinite executions admitted by its protocol are deemed unrealistic because they violate certain fairness assumptions . Fair termination entails the eventual completion of all pending input/output actions, including those that depend on the completion of an unbounded number of other actions in possibly different sessions. This form of lock freedom allows us to address a large family of natural communication patterns that fall outside the scope of existing type systems. Our type system is also the first to adopt fair subtyping , a liveness-preserving refinement of the standard subtyping relation for session types that so far has only been studied theoretically. Fair subtyping is surprisingly subtle not only to characterize concisely but also to use appropriately, to the point that the type system must carefully account for all usages of fair subtyping to avoid compromising its liveness-preserving properties.

Highlights

  • Session type systems [Honda 1993; Honda et al 1998; Hüttel et al 2016] are an established formalism for the static analysis of communicating processes: a binary session is a private communication channel that connects two processes, each using one endpoint of the session; a session type is a type-level description of the sequences of input/output actions performed by a process with respect to a session endpoint

  • Type systems ensuring this liveness property have been studied by Kobayashi [2002] and Kobayashi and Sangiorgi [2010] for the π-calculus, by Padovani [2014] for the linear π-calculus and calculi based on binary sessions, and by Padovani et al [2014] for the conversation calculus, a calculus of multiparty sessions

  • We have presented the first type system ensuring the fair termination of binary sessions (Theorem 6.4)

Read more

Summary

INTRODUCTION

Session type systems [Honda 1993; Honda et al 1998; Hüttel et al 2016] are an established formalism for the static analysis of communicating processes: a binary session is a private communication channel that connects two processes, each using one endpoint of the session; a session type is a type-level description of the sequences of input/output actions performed by a process with respect to a session endpoint. Currently available type systems ensuring lock freedom have an important limitation: they can only handle those processes in which the completion of pending actions on a channel is attainable regardless of the content of messages exchanged in other channels This is not the case for the action y!ship on session y, which is performed only provided that a pay message is exchanged in session x. The acquirer in (1) could always purchase an odd number of items, or at least n items, or no more than n items, even if the session type associated with x allows sending an arbitrary number of add messages These mismatches between processes and protocols are usually reconciled by a subtyping relation for session types [Bernardi and Hennessy 2016; Gay and Hole 2005]. Proofs and further definitions and results can be found in the Appendix, which is published in the supplemental material section of the ACM Digital Library page for this paper

GENERALIZED INFERENCE SYSTEMS IN A NUTSHELL
Syntax and Semantics
Fair Subtyping
Compatibility
Rank of a Session
LANGUAGE SYNTAX AND SEMANTICS
THE TYPE SYSTEM BY EXAMPLES
Action Boundedness
Session Boundedness
Cast Boundedness
ON FAIR SUBTYPING AND HIGHER-ORDER SESSION TYPES
RELATED WORK
CONCLUDING REMARKS
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call