A widespread approach to software service analysis uses session types. Very different type theories for binary and multiparty protocols have been developed; establishing precise connections between them remains an open problem. We present the first formal relation between two existing theories of binary and multiparty session types: a binary system rooted in linear logic, and a multiparty system based on automata theory. Our results enable the analysis of multiparty protocols using a (much simpler) type theory for binary protocols, ensuring protocol fidelity and deadlock-freedom. As an application, we offer the first theory of multiparty session types with behavioral genericity. This theory is natural and powerful; its analysis techniques reuse results for binary session types.
By integrating constructs from the \(\lambda \)-calculus and the \(\pi \)-calculus, in higher-order process calculi exchanged values may contain processes. This paper studies the relative expressiveness of \(\mathsf {HO}\pi \), the higher-order \(\pi \)-calculus in which communications are governed by session types. Our main discovery is that \(\mathsf {HO}\), a subcalculus of \(\mathsf {HO}\pi \) which lacks name-passing and recursion, can serve as a new core calculus for session-typed higher-order concurrency. By exploring a new bisimulation for \(\mathsf {HO}\), we show that \(\mathsf {HO}\) can encode \(\mathsf {HO}\pi \) fully abstractly (up to typed contextual equivalence) more precisely and efficiently than the first-order session \(\pi \)-calculus (\(\pi \)). Overall, under session types, \(\mathsf {HO}\pi \), \(\mathsf {HO} \), and \(\pi \) are equally expressive; however, \(\mathsf {HO}\pi \) and \(\mathsf {HO} \) are more tightly related than \(\mathsf {HO}\pi \) and \(\pi \).
We present a comprehensive model of structured communications in which self-adaptation and security concerns are jointly addressed. More specifically, we propose a model of multiparty, self-adaptive communications with access control and secure information flow guarantees. In our model, multiparty protocols (choreographies) are described as global types; security violations occur when process implementations of protocol participants attempt to read or write messages of inappropriate security levels within directed exchanges. Such violations trigger adaptation mechanisms that prevent the violations to occur and/or to propagate their effect in the choreography. Our model is equipped with local and global adaptation mechanisms for reacting to security violations of different gravity; type soundness results ensure that the overall multiparty protocol is still correctly executed while the system adapts itself to preserve the participants’ security.