A Theory of Available-by-Design Communicating Systems

Choreographic programming is a programming-language design approach that drives error-safe protocol development in distributed systems. Starting from a global specification (choreography) one can generate distributed implementations. The advantages of this top-down approach lie in the correctness-by-design principle, where implementations (endpoints) generated from a choreography behave according to the strict control flow described in the choreography, and do not deadlock. Motivated by challenging scenarios in Cyber-Physical Systems (CPS), we study how choreographic programming can cater for dynamic infrastructures where not all endpoints are always available. We introduce the Global Quality Calculus ($GC_q$), a variant of choreographic programming for the description of communication systems where some of the components involved in a communication might fail. GCq features novel operators for multiparty, partial and collective communications. This paper studies the nature of failure-aware communication: First, we introduce $GC_q$ syntax, semantics and examples of its use. The interplay between failures and collective communications in a choreography can lead to choreographies that cannot progress due to absence of resources. In our second contribution, we provide a type system that ensures that choreographies can be realized despite changing availability conditions. A specification in $GC_q$ guides the implementation of distributed endpoints when paired with global (session) types. Our third contribution provides an endpoint-projection based methodology for the generation of failure-aware distributed processes. We show the correctness of the projection, and that well-typed choreographies with availability considerations enjoy progress.

[1]  Anantha P. Chandrakasan,et al.  An application-specific protocol architecture for wireless microsensor networks , 2002, IEEE Trans. Wirel. Commun..

[2]  Nobuko Yoshida,et al.  The Scribble Protocol Language , 2013, TGC.

[3]  Francisco Martins,et al.  Coordinating Phased Activities while Maintaining Progress , 2013, COORDINATION.

[4]  Robert Harper,et al.  Programming in Standard ML , 2002 .

[5]  Dimitrios Kouzapas,et al.  Session Types for Broadcasting , 2014, PLACES.

[6]  Parosh Aziz Abdulla,et al.  What's Decidable about Availability Languages? , 2015, FSTTCS.

[7]  Marco Carbone,et al.  Session-based Choreography with Exceptions , 2009, PLACES@DisCoTec.

[8]  Wendi B. Heinzelman,et al.  Adaptive protocols for information dissemination in wireless sensor networks , 1999, MobiCom.

[9]  Nobuko Yoshida,et al.  On Asynchronous Session Semantics , 2011, FMOODS/FORTE.

[10]  Laura Bocchi,et al.  Timed Multiparty Session Types , 2014, CONCUR.

[11]  Rajeev Alur,et al.  Principles of Cyber-Physical Systems , 2015 .

[12]  Jean-Yves Girard,et al.  Linear Logic , 1987, Theor. Comput. Sci..

[13]  Nobuko Yoshida,et al.  Structured Interactional Exceptions in Session Types , 2008, CONCUR.

[14]  Luca Padovani,et al.  On Global Types and Multi-party Sessions , 2011, FMOODS/FORTE.

[15]  Flemming Nielson,et al.  Type and Effect Systems , 1999 .

[16]  Wendi B. Heinzelman,et al.  Wireless Sensor Network Protocols , 2005, Handbook of Algorithms for Wireless Networking and Mobile Computing.

[17]  Laura Bocchi,et al.  Monitoring networks through multiparty session types , 2017, Theor. Comput. Sci..

[18]  Jochen Hoenicke,et al.  Kleene, Rabin, and Scott Are Available , 2010, CONCUR.

[19]  Gianluigi Zavattaro,et al.  Composing Services with JOLIE , 2007, Fifth European Conference on Web Services (ECOWS'07).

[20]  Flemming Nielson,et al.  Enforcing Availability in Failure-Aware Communicating Systems , 2016, FORTE.

[21]  P. Lincoln Deciding provability of linear logic formulas , 1995 .

[22]  R. Milner,et al.  A Theoretical Basis of Communication-Centred Concurrent Programming , 2005 .

[23]  Nobuko Yoshida,et al.  Parameterised Multiparty Session Types , 2010, Log. Methods Comput. Sci..

[24]  Vasco Thudichum Vasconcelos,et al.  Language Primitives and Type Discipline for Structured Communication-Based Programming Revisited: Two Systems for Higher-Order Session Communication , 1998, SecReT@ICALP.

[25]  Flemming Nielson,et al.  A Calculus for Quality , 2012, FACS.

[26]  Laura Bocchi,et al.  Meeting Deadlines Together , 2015, CONCUR.

[27]  Nuno Pratas,et al.  Broadcast and aggregation in BBC , 2015, PLACES.

[28]  Laura Bocchi,et al.  A Theory of Design-by-Contract for Distributed Multiparty Interactions , 2010, CONCUR.

[29]  Nobuko Yoshida,et al.  Structured Communication-Centred Programming for Web Services , 2007, ESOP.

[30]  Nobuko Yoshida,et al.  Multiparty Session Types Meet Communicating Automata , 2012, ESOP.

[31]  Wei Hong,et al.  The design of an acquisitional query processor for sensor networks , 2003, SIGMOD '03.

[32]  Laura Bocchi,et al.  Timed runtime monitoring for multiparty conversations , 2017, Formal Aspects of Computing.

[33]  C. A. R. Hoare,et al.  An Axiomatic Basis for Computer Programming (Reprint) , 2002, Software Pioneers.

[34]  Nobuko Yoshida,et al.  Protocol-based verification of message-passing parallel programs , 2015, OOPSLA.

[35]  Nobuko Yoshida,et al.  Structured Communication-Centered Programming for Web Services , 2007, TOPL.

[36]  Fabrizio Montesi,et al.  Deadlock-freedom-by-design: multiparty asynchronous global programming , 2013, POPL.

[37]  Ramesh Govindan,et al.  The impact of spatial correlation on routing with compression in wireless sensor networks , 2004, Third International Symposium on Information Processing in Sensor Networks, 2004. IPSN 2004.

[38]  Yunghsiang Sam Han,et al.  Balanced-energy sleep scheduling scheme for high density cluster-based sensor networks , 2004, 2004 4th Workshop on Applications and Services in Wireless Networks, 2004. ASWN 2004..

[39]  Wei Hong,et al.  Proceedings of the 5th Symposium on Operating Systems Design and Implementation Tag: a Tiny Aggregation Service for Ad-hoc Sensor Networks , 2022 .

[40]  Laura Bocchi,et al.  Monitoring Networks through Multiparty Session Types , 2013, FMOODS/FORTE.