Multiparty Session Types for Safe Runtime Adaptation in an Actor Language

Harvey, P. , Fowler, S. , Dardha, O. and Gay, S. J. (2021) Multiparty Session Types for Safe Runtime Adaptation in an Actor Language. In: 35th European Conference on Object Oriented Programming (ECOOP 2021), 12-17 Jul 2021, (doi: 10.4230/LIPIcs.ECOOP.2021.10)

[img] Text
240733.pdf - Published Version
Available under License Creative Commons Attribution.

1MB

Publisher's URL: https://2021.ecoop.org/details/ecoop-2021-ecoop-research-papers/12/Multiparty-Session-Types-for-Safe-Runtime-Adaptation-in-an-Actor-Language

Abstract

Human fallibility, unpredictable operational environments, and the heterogeneity (and corresponding resource constraints) of hardware devices are driving in the need for software to be able to \textit{adapt} as seen in the Internet of Things or national telecommunication networks. Unfortunately, mainstream programming languages do not readily allow a software component to sense and respond to its operating environment, by \emph{discovering}, \emph{replacing}, and \emph{communicating} with other software components that are not part of the original system design, while maintaining static correctness guarantees. In particular, if a new component is discovered at runtime, there is no guarantee that its communication \emph{behaviour} is compatible with existing components. We address this problem by using \emph{multiparty session types with explicit connection actions}, a type formalism used to model distributed communication protocols. By associating session types with software components, the discovery process can check protocol compatibility and, when required, correctly replace components. Moreover, the use of session types throughout the software system design guarantees the correctness of all communication, whether or not it is adaptive. We present the design and implementation of EnsembleS, the \emph{first} actor-based language with adaptive features and a static session type system. We apply it to a case study based on an adaptive DNS server. Finally, we formalise the type system of EnsembleS and prove the safety of well-typed programs, making essential use of recent advances in \emph{non-classical} multiparty session types.

Item Type:Conference Proceedings
Keywords:Concurrent programming, multiparty session types, runtime adaptation, behavioural types, actor languages.
Status:Published
Refereed:Yes
Glasgow Author(s) Enlighten ID:Gay, Professor Simon and Dardha, Dr Ornela and Fowler, Dr Simon and Harvey, Mr Paul
Authors: Harvey, P., Fowler, S., Dardha, O., and Gay, S. J.
College/School:College of Science and Engineering > School of Computing Science
College of Science and Engineering > School of Engineering > Electronics and Nanoscale Engineering
ISSN:1868-8969
Related URLs:

University Staff: Request a correction | Enlighten Editors: Update this record

Project CodeAward NoProject NamePrincipal InvestigatorFunder's NameFunder RefLead Dept
306912Session Types for Reliable Distributed SystemsSimon GayEngineering and Physical Sciences Research Council (EPSRC)EP/T014628/1Computing Science
168293From Data Types to Session Types - A Basis for Concurrency and Distribution.Simon GayEngineering and Physical Sciences Research Council (EPSRC)EP/K034413/1Computing Science