Section: New Results

Session Types

Session types describe communication protocols between two or more parties by specifying the sequence of exchanged messages and their functionality (sender, receiver and type of carried data). They may be viewed as the analogue, for concurrency and distribution, of data types for sequential computation. Originally conceived as a static analysis technique for an enhanced version of the π-calculus, session types have been subsequently embedded into a range of functional, concurrent, and object-oriented programming languages.

While binary sessions can be described by a single session type, multiparty sessions require two kinds of types: a global type that describes the whole session protocol, and local types that describe the contributions of the various participants to the protocol. The key requirement to achieve safety properties such as the absence of communication errors and deadlock-freedom, is that the local types of the processes implementing the participants be obtained as projections from the same global type (the one describing the session protocol).

We have pursued our work on multiparty session types along four main directions, in collaboration with colleagues from the Universities of Groningen, Luxemburg, Nice Sophia Antipolis, Turin and Eastern Piedmont. One of these directions is described in Section 6.8.3, the others are described below.

Reversible Sessions with Flexible Choices

Reversibility has been an active trend of research for the last fifteen years. A reversible computation is a computation that may roll back to a past state. Allowing computations to reverse is a means to improve system flexibility and reliability. In the setting of concurrent process calculi, reversible computations have been first studied for Milner's calculus CCS, then for the π-calculus, and only recently for typed session calculi.

Following up on our previous work on concurrent reversible sessions, we studied a simpler but somewhat more realistic calculus for concurrent reversible multiparty sessions, equipped with a flexible choice operator allowing for different sets of participants in each branch of a choice. This operator was inspired by the notion of connecting communication introduced by other authors to describe protocols with optional participants. Our calculus supports a compact representation of the history of processes and types, which facilitates the definition of rollback. Moreover, it implements a fine-tuned strategy for backward computation, where only some specific participants, the “choice leaders”, can trigger a rollback. We present a session type system for this calculus and show that it enforces the expected properties of session fidelity, forward progress and backward progress. This work has been published in the journal [11].

Multiparty Sessions with Internal Delegation

We have investigated a new form of delegation for multiparty session calculi. Usually, the delegation mechanism allows a session participant to appoint a participant in another session to act on her behalf. This means that delegation is inherently an inter-session mechanism, which requires session interleaving. Hence delegation falls outside the descriptive power of global types, which specify single multiparty sessions. As a consequence, properties such as deadlock-freedom or lock-freedom are difficult to ensure in the presence of delegation. In our work, we adopt a different view of delegation, by allowing participants to delegate tasks to each other within the same multiparty session. This way, delegation occurs within a single session (whence the name “internal delegation”) and may be captured by its global type. To increase flexibility in the use of delegation, we use again connecting communications, in order to accommodate optional participants in the branches of choices. By this means, we are also able to express conditional delegation. We present a session type system based on global types with internal delegation, and show that it ensures the usual safety properties of multiparty sessions, together with a progress property.

This work has been published in a special issue of TCS dedicated to Maurice Nivat [12].

Event Structure Semantics for Multiparty Sessions

In the work [14] we investigate the relationship between multiparty session calculi and other concurrency models, by focussing on Event Structures as proposed in the late 80's. We consider a standard multiparty session calculus where sessions are described as networks of sequential processes, and each process implements a participant in the session. We propose an interpretation of such networks as Flow Event Structures (FESs) (a subclass of Winskel's Stable Event Structures), which allows concurrency between session communications to be explicitly represented. We then introduce global types for these networks, and define an interpretation of global types as Prime Event Structures (PESs). Since the syntax of global types does not allow all the concurrency among communications to be expressed, the events of the associated PES need to be defined as equivalence classes of communication sequences up to permutation equivalence. We show that when a network is typable by a global type, the FES semantics of the former is equivalent, in a precise technical sense, to the PES semantics of the latter.

This work has been published in a volume dedicated to Rocco De Nicola on the occasion of his 65th birthday [14]. An extended version is available as Research Report [21].