Type Systems for Distributed Programs: Components and Sessions

Modern software systems, in particular distributed ones, are everywhere around us and are at the basis of our everyday activities. Hence, guaranteeing their correctness, consistency and safety is of paramount importance. Their complexity makes the verification of such properties a very challenging task. It is natural to expect that these systems are reliable and above all usable. i) In order to be reliable, compositional models of software systems need to account for consistent dynamic reconfiguration, i.e., changing at runtime the communication patterns of a program. ii) In order to be useful, compositional models of software systems need to account for interaction, which can be seen as communication patterns among components which collaborate together to achieve a common task. The aim of the Ph.D. was to develop powerful techniques based on formal methods for the verification of correctness, consistency and safety properties related to dynamic reconfiguration and communication in complex distributed systems. In particular, static analysis techniques based on types and type systems appeared to be an adequate methodology, considering their success in guaranteeing not only basic safety properties, but also more sophisticated ones like, deadlock or livelock freedom in a concurrent setting. The main contributions of this dissertation are twofold. i) On the components side: we design types and a type system for a concurrent object-oriented calculus to statically ensure consistency of dynamic reconfigurations related to modifications of communication patterns in a program during execution time. ii) On the communication side: we study advanced safety properties related to communication in complex distributed systems like deadlock-freedom, livelock-freedom and progress. Most importantly, we exploit an encoding of types and terms of a typical distributed language, session π-calculus, into the standard typed π-calculus, in order to understand the expressive power of concurrent calculi with structured communication primitives and how they stand with respect to the standard typed concurrent calculi, namely (variants) of typed π-calculus. Then, we show how to derive in the session π-calculus basic properties, like type safety or complex ones, like progress, by encoding.

[1]  Mariangiola Dezani-Ciancaglini,et al.  On Progress for Structured Communications , 2007, TGC.

[2]  Gul A. Agha,et al.  ACTORS - a model of concurrent computation in distributed systems , 1985, MIT Press series in artificial intelligence.

[3]  Gordon S. Blair,et al.  A component model for building systems software , 2004, IASTED Conf. on Software Engineering and Applications.

[4]  Reiner Hähnle,et al.  ABS: A Core Language for Abstract Behavioral Specification , 2010, FMCO.

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

[6]  Richard C. Holt,et al.  The Geneva convention on the treatment of object aliasing , 1992, OOPS.

[7]  Shin Saito,et al.  An Implicitly-Typed Deadlock-Free Process Calculus , 2000, CONCUR.

[8]  António Ravara,et al.  Modular Session Types for Objects , 2015, Log. Methods Comput. Sci..

[9]  Søren Debois,et al.  A Graphical Approach to Progress for Structured Communication in Web Services , 2010, ICE.

[10]  James Noble,et al.  Ownership types for flexible alias protection , 1998, OOPSLA '98.

[11]  Davide Sangiorgi,et al.  A Model of Evolvable Components , 2010, TGC.

[12]  Gianluigi Zavattaro,et al.  Service-Oriented Programming with Jolie , 2014, Web Services Foundations.

[13]  Bernardo Toninho,et al.  Linear Logical Relations for Session-Based Concurrency , 2012, ESOP.

[14]  Robin Milner,et al.  Communication and concurrency , 1989, PHI Series in computer science.

[15]  João Costa Seco,et al.  The Conversation Calculus: A Model of Service-Oriented Computation , 2008, ESOP.

[16]  Philip Wadler,et al.  Featherweight Java: a minimal core calculus for Java and GJ , 2001, TOPL.

[17]  Philip Wadler Propositions as sessions , 2014, J. Funct. Program..

[18]  Romain Demangeon,et al.  Full Abstraction in a Subtyped pi-Calculus with Linear Types , 2011, CONCUR.

[19]  Sophia Drossopoulou,et al.  Amalgamating sessions and methods in object-oriented languages with generics , 2009, Theor. Comput. Sci..

[20]  Denis Caromel,et al.  Asynchronous and deterministic objects , 2004, POPL '04.

[21]  Naoki Kobayashi,et al.  A Type System for Lock-Free Processes , 2002, Inf. Comput..

[22]  Kathleen Fisher,et al.  A Calculus for Concurrent Objects , 1996, CONCUR.

[23]  Luca Padovani,et al.  From Lock Freedom to Progress Using Session Types , 2013, PLACES.

[24]  Itay Maman,et al.  Whiteoak: introducing structural typing into java , 2008, OOPSLA.

[25]  QuémaVivien,et al.  The FRACTAL component model and its support in Java , 2006 .

[26]  Nobuko Yoshida,et al.  Two Session Typing Systems for Higher-Order Mobile Processes , 2007, TLCA.

[27]  António Ravara,et al.  Session Types as Generic Process Types , 2014, EXPRESS/SOS.

[28]  Wolfgang Ahrendt,et al.  A system for compositional verification of asynchronous objects , 2012, Sci. Comput. Program..

[29]  Naoki Kobayashi,et al.  A New Type System for Deadlock-Free Processes , 2006, CONCUR.

[30]  Davide Sangiorgi,et al.  A hybrid type system for lock-freedom of mobile processes , 2008, TOPL.

[31]  Gerardo Costa,et al.  Weak and Strong Fairness in CCS , 1987, Inf. Comput..

[32]  António Ravara,et al.  Session Types for Functional Multithreading , 2004, CONCUR.

[33]  Kohei Honda,et al.  An Interaction-based Language and its Typing System , 1994, PARLE.

[34]  C. A. R. Hoare,et al.  Monitors: an operating system structuring concept , 1974, CACM.

[35]  Nobuko Yoshida,et al.  Compositional Choreographies , 2013, CONCUR.

[36]  Nobuko Yoshida,et al.  Language Primitives and Type Discipline for Structured Communication-Based Programming Revisited: Two Systems for Higher-Order Session Communication , 2007, Electron. Notes Theor. Comput. Sci..

[37]  Matthias Felleisen,et al.  A Syntactic Approach to Type Soundness , 1994, Inf. Comput..

[38]  Thaís Vasconcelos Batista,et al.  Managing Dynamic Reconfiguration in Component-Based Systems , 2005, EWSA.

[39]  Naoki Kobayashi A partially deadlock-free typed process calculus , 1998, TOPL.

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

[41]  Robin Milner,et al.  A Calculus of Communicating Systems , 1980, Lecture Notes in Computer Science.

[42]  Farhad Arbab,et al.  Modeling dynamic reconfigurations in Reo using high-level replacement systems , 2011, Sci. Comput. Program..

[43]  Francisco Curbera,et al.  Web Services Business Process Execution Language Version 2.0 , 2007 .

[44]  Davide Sangiorgi,et al.  Communicating and Mobile Systems: the π-calculus, , 2000 .

[45]  Luca Padovani,et al.  Inference of Global Progress Properties for Dynamically Interleaved Multiparty Sessions , 2013, COORDINATION.

[46]  Suresh Jagannathan,et al.  Safe futures for Java , 2005, OOPSLA '05.

[47]  Vasco Thudichum Vasconcelos,et al.  Fundamentals of session types , 2009, Inf. Comput..

[48]  Davide Sangiorgi,et al.  Session types revisited , 2012, PPDP.

[49]  Luca Padovani,et al.  Global progress for dynamically interleaved multiparty sessions , 2014, Mathematical Structures in Computer Science.

[50]  Naoki Kobayashi Type-based information flow analysis for the π-calculus , 2005, Acta Informatica.

[51]  Henk Barendregt,et al.  The Lambda Calculus: Its Syntax and Semantics , 1985 .

[52]  Matti A. Hiltunen,et al.  Coyote: a system for constructing fine-grain configurable communication services , 1998, TOCS.

[53]  Sophia Drossopoulou,et al.  A Distributed Object-Oriented Language with Session Types , 2005, TGC.

[54]  Frank D. Valencia,et al.  Recursion vs Replication in Process Calculi: Expressiveness , 2005, Bull. EATCS.

[55]  Yannick Welsch,et al.  Location Types for Safe Distributed Object-Oriented Programming , 2011, TOOLS.

[56]  Michael Lienhardt,et al.  A Type System for Components , 2013, SEFM.

[57]  Davide Sangiorgi,et al.  Typing and subtyping for mobile processes , 1993, [1993] Proceedings Eighth Annual IEEE Symposium on Logic in Computer Science.

[58]  Frank Pfenning,et al.  Session Types as Intuitionistic Linear Propositions , 2010, CONCUR.

[59]  Luís E. T. Rodrigues,et al.  Appia, a flexible protocol kernel supporting multiple coordinated channels , 2001, Proceedings 21st International Conference on Distributed Computing Systems.

[60]  Einar Broch Johnsen,et al.  An Asynchronous Communication Model for Distributed Concurrent Objects , 2004, SEFM.

[61]  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.

[62]  Robin Milner,et al.  A Calculus of Mobile Processes, II , 1992, Inf. Comput..

[63]  Kohei Honda,et al.  Types for Dyadic Interaction , 1993, CONCUR.

[64]  Davide Sangiorgi,et al.  Ensuring termination by typability , 2006, Inf. Comput..

[65]  Thierry Coupaye,et al.  The FRACTAL component model and its support in Java , 2006, Softw. Pract. Exp..

[66]  Ivan Lanese,et al.  A Component Model for the ABS Language , 2010, FMCO.

[67]  Hugo Torres Vieira,et al.  Conversation types , 2009, Theor. Comput. Sci..

[68]  Matthew Hennessy,et al.  Using higher-order contracts to model session types , 2016, Log. Methods Comput. Sci..

[69]  Cosimo Laneve,et al.  Deadlock Analysis of Concurrent Objects: Theory and Practice , 2013, IFM.

[70]  Michael Lienhardt,et al.  Oz/K: a kernel language for component-based open programming , 2007, GPCE '07.

[71]  Fabrizio Montesi,et al.  Programming Services with Correlation Sets , 2011, ICSOC.

[72]  Robin Milner,et al.  Handbook of Theoretical Computer Science (Vol. B) , 1990 .

[73]  Bernardo Toninho,et al.  Linear logical relations and observational equivalences for session-based concurrency , 2014, Inf. Comput..

[74]  Mariangiola Dezani-Ciancaglini,et al.  Sessions and Session Types: An Overview , 2009, WS-FM.

[75]  Ornela Dardha,et al.  Comparing Deadlock-Free Session Typed Processes , 2015, EXPRESS/SOS.

[76]  Antonio Vallecillo,et al.  Typing the Behavior of Software Components using Session Types , 2006, Fundam. Informaticae.

[77]  Fabrizio Montesi,et al.  Progress as Compositional Lock-Freedom , 2014, COORDINATION.

[78]  Luca Padovani,et al.  Deadlock and lock freedom in the linear π-calculus , 2014, CSL-LICS.

[79]  Gregory R. Andrews,et al.  Foundations of Multithreaded, Parallel, and Distributed Programming , 1999 .

[80]  Einar Broch Johnsen,et al.  An Asynchronous Communication Model for Distributed Concurrent Objects , 2004, Proceedings of the Second International Conference on Software Engineering and Formal Methods, 2004. SEFM 2004..

[81]  Davide Sangiorgi,et al.  Termination of processes , 2006, Mathematical Structures in Computer Science.

[82]  Eddie Kohler,et al.  The Click modular router , 1999, SOSP.

[83]  David K. Gifford,et al.  Polymorphic effect systems , 1988, POPL '88.

[84]  Dimitrios Kouzapas,et al.  On Duality Relations for Session Types , 2014, TGC.

[85]  Luca Cardelli,et al.  Types for the Ambient Calculus , 2002, Inf. Comput..

[86]  Jonathan Aldrich,et al.  Integrating Nominal and Structural Subtyping , 2008, ECOOP.

[87]  Vasco Thudichum Vasconcelos,et al.  Linear type theory for asynchronous session types , 2009, Journal of Functional Programming.

[88]  Martin Odersky,et al.  Scala Actors: Unifying thread-based and event-based programming , 2009, Theor. Comput. Sci..

[89]  Raheel Ahmad,et al.  The π-Calculus: A theory of mobile processes , 2008, Scalable Comput. Pract. Exp..

[90]  Einar Broch Johnsen,et al.  Creol: A type-safe object-oriented model for distributed concurrent systems , 2006, Theor. Comput. Sci..

[91]  Simon J. Gay,et al.  Subtyping for session types in the pi calculus , 2005, Acta Informatica.

[92]  Daniele Gorla Towards a unified approach to encodability and separation results for process calculi , 2010, Inf. Comput..

[93]  Gordon S. Blair,et al.  A generic component model for building systems software , 2008, TOCS.

[94]  Benjamin C. Pierce,et al.  Linearity and the pi-calculus , 1999, TOPL.

[95]  Naoki Kobayashi Type Systems for Concurrent Processes: From Deadlock-Freedom to Livelock-Freedom, Time-Boundedness , 2000, IFIP TCS.

[96]  Bernardo Toninho,et al.  Behavioral Polymorphism and Parametricity in Session-Based Communication , 2013, ESOP.

[97]  António Ravara,et al.  Type checking a multithreaded functional language with session types , 2006, Theor. Comput. Sci..

[98]  Matthias Felleisen,et al.  Semantic Casts: Contracts and Structural Subtyping in a Nominal World , 2004, ECOOP.

[99]  Frank S. de Boer,et al.  A Complete Guide to the Future , 2007, ESOP.

[100]  Benjamin C. Pierce,et al.  Types and programming languages: the next generation , 2003, 18th Annual IEEE Symposium of Logic in Computer Science, 2003. Proceedings..

[101]  Sophia Drossopoulou,et al.  Bounded Session Types for Object Oriented Languages , 2006, FMCO.

[102]  Nobuko Yoshida,et al.  Dynamic multirole session types , 2011, POPL '11.

[103]  Arnd Poetzsch-Heffter,et al.  JCoBox: Generalizing Active Objects to Concurrent Components , 2010, ECOOP.

[104]  ROBIN MILNER,et al.  Edinburgh Research Explorer A Calculus of Mobile Processes, I , 2003 .

[105]  Sophia Drossopoulou,et al.  Session Types for Object-Oriented Languages , 2006, ECOOP.

[106]  Osgi Alliance,et al.  Osgi Service Platform, Release 3 , 2003 .

[107]  Davide Sangiorgi An Interpretation of Typed Objects into Typed pi-Calculus , 1998, Inf. Comput..

[108]  Simon J. Gay Bounded polymorphism in session types , 2008, Math. Struct. Comput. Sci..

[109]  Elvira Albert,et al.  Analysis of May-Happen-in-Parallel in Concurrent Objects , 2012, FMOODS/FORTE.

[110]  Naoki Kobayashi,et al.  Type Systems for Concurrent Programs , 2002, 10th Anniversary Colloquium of UNU/IIST.

[111]  Jonathan Aldrich,et al.  Is Structural Subtyping Useful? An Empirical Study , 2009, European Symposium on Programming.

[112]  Klaus Ostermann,et al.  Nominal and Structural Subtyping in Component-Based Programming , 2008, J. Object Technol..

[113]  Ornela Dardha,et al.  Recursive Session Types Revisited , 2014, BEAT.

[114]  Atsushi Igarashi,et al.  A generic type system for the Pi-calculus , 2004, Theor. Comput. Sci..