Type Systems for Distributed Programs: Components and Sessions

Type Systems for Distributed Programs: Components and Sessions

Type Systems for Distributed Programs: Components and Sessions Ornela Dardha ii Foreword The Italian Chapter of the EATCS (European Association for Theoretical Com- puter Science) was founded in 1988, and aims at facilitating the exchange of ideas and results among Italian theoretical computer scientists, and at stimulating coop- eration between the theoretical and the applied communities in Italy. One of the major activities of this Chapter is to promote research in theoretical computer science, stimulating scientific excellence by supporting and encouraging the very best and creative young Italian theoretical computer scientists. This is done also by sponsoring a prize for the best PhD thesis. An interdisciplinary committee selects the best PhD thesis, among those defended in the previous year and dealing with one of the many themes in theoretical computer science. In 2012 we started a cooperation with Atlantis Press so that the selected PhD theses will be published as volumes in the Atlantis Studies in Computing. The present volume contains the thesis selected for publication in 2015: Type Systems for Distributed Programs: Components and Sessions by Ornela Dardha (supervisor: Prof. Davide Sangiorgi, Univ. of Bologna, Italy) The scientific committee that selected this thesis was composed of Professors Margherita Napoli (Univ. of Salerno), Paolo Santi (CNR of Pisa) and Andrea Masini (Univ. of Verona). They gave the following motivation to justify the assignment of the award to the thesis by Ornela Dardha: The PhD thesis “Type Systems for Distributed Programs: Components and Sessions” by Ornela Dardha deals with type-based systems for distributed pro- grams. The goal of the thesis is the development of static techniques based on type systems aimed at dealing with consistency and safety properties related with dynamic reconfiguration and communication in complex distributed systems. The main original contributions of the thesis are: • the design of a type system for a realistic concurrent object-oriented calcu- lus to statically guarantee the consistency of dynamic reconfigurations; iii • the study of concrete, non-trivial safety properties of complex distributed systems, namely deadlock freedom, livelock freedom, and progress. All the theoretical proposals of the thesis are original and extremely interesting. They represent a major breakthrough in the study of type systems for concurrent languages. It is our opinion that the ideas of this thesis could also help in the design and implementation of real type systems for concrete distributed program- ming languages. I would like to thank the members of the scientific committee, and I hope that this initiative will further contribute to strengthen the sense of belonging to the same community of all the young researchers that have accepted the challenges posed by any branch of theoretical computer science. Rome, January 2016 Tiziana Calamoneri President of the Italian Chapter of the EATCS iv Preface It is a pleasure for me to write a preface for Ornela Dardha’s PhD thesis in the occasion of its publication in the Atlantis Studies in Computing, as recipient of a prize for “Best Italian 2015 PhD Thesis in Theoretical Computer Science” awarded by the Italian Chapter of EATCS. I am happy that Ornela has obtained the prize, as a reward for the time and the energy that she has invested into research during the PhD period. Ornela’s achievement is also gratifying for the Focus team and the whole Department of Computer Science of the University of Bologna, in which the thesis has been carried out. I like to think that Focus and the Department have provided a fertile environment in which her desire of learning and growing has been nourished. The general topic of Ornela’s thesis is type systems for programming lan- guages. Type systems have been developed in sequential languages, initially with the goal of improving the efficiency of programs, and later also with the goals of ensuring certain correctness properties during execution and of specifying the inteded use of certain objects or components in a program. The application of type systems to concurrency is more recent. The field has presented, and still presents, a number of challenges: in a concurrent system new features, such as interactions, have to be taken into account; other features, such as dynamic recon- figurations, take a prominent role. Concurrency has sometimes led to the design of new type systems. A relevant example are the so-called session types, roughly types capable of specifying the protocols that a set of components should follow, in order to accomplish a certain task. The past two decades have seen a thorough investigation of session types. Ornela’s thesis shows how types can be used in presence of interactions and dynamic reconfiguration to guarantee some fundamental behavioural properties of distributed systems, such as forms of consistency, deadlock freedom, progress. Moreover, the thesis sheds light into the foundations of session types. The thesis shows that session types, at least in their most common format, are not a primitive concept, as they had been treated in the literature: they can be derived from more basic and well-known type constructs. This is important, both to understand better the concept, and to develop its metatheory. v I would like to conclude with my personal congratulations to Ornela for the work done, and my warmest wishes for her future. Bologna, Gennaio 2016 Davide Sangiorgi vi Acknowledgments The work for the PhD thesis was carried out while I was a PhD student at the Computer Science Department of the University of Bologna and a member of the Focus team, and also during my one-year visit at the IT University of Copenhagen. I am very grateful to my supervisor Davide Sangiorgi, who during my PhD has been of great support and guidance. I also want to thank the external reviewers of my PhD thesis: Ilaria Castellani and Vasco T. Vasconcelos for their careful work and useful feedbacks. Currently I am a Research Associate at the School od Computing Science of the University of Glasgow, working with Simon J. Gay and supported by the UK EPSRC project From Data Types to Session Types: A Basis for Concurrency and Distribution (ABCD) (EP/K034413/1). A very special thanks goes to Elena Giachino for her help and support, for the scientific and life-related advice she gave me during those years. I also want to thank Jorge A. Perez,´ for being a very good friend and a very good “older academic brother”. Thank you for your prompt response every time I needed your help. During my one-year visit at ITU of Copenhagen, I had the pleasure to work with Marco Carbone and Fabrizio Montesi. Thank you for the very nice year at ITU and for making research a lot fun. An enormous hug goes to all my friends around the world, especially the ones in Rome, Bologna, Copenhagen, Glasgow and London. Thank you for the great time together, for being of inspiration and support and above all for making me feel home whenever I visit you. Falenderoj familjen time babin, mamin dhe dy motrat e mia te mrekullueshme, per prezencen,¨ durimin dhe dashurine¨ e tyre te¨ pakushtezuar.¨ Ju dua shume!¨ Ringrazio la mia (seconda) famiglia, mamma, papi, Titi e Ernesto: il tempo con voi non e` mai abbastanza... Vi voglio un mondo di bene! Last, but absolutely not least, I want to thank my Simon. During the time I was writing this book he has been very supportive, understanding and caring. You are truly a wonderful person! vii viii Contents Foreword iii Preface v Acknowledgements vii List of Figures xiii Introduction to the PhD Thesis 1 I Safe Dynamic Reconfiguration of Components 7 Introduction to Part I 9 1 Background on Components 13 1.1 Syntax . 13 1.2 Semantics . 17 1.2.1 Runtime Syntax . 17 1.2.2 Functions and Predicates . 18 1.2.3 Evaluation of Pure and Guard Expressions . 19 1.2.4 Reduction Rules . 21 1.3 Server and Client Example . 25 2 A Type System for Components 29 2.1 Typing Features . 29 2.2 Subtyping Relation . 30 2.3 Functions and Predicates . 32 2.4 Typing Rules . 35 2.5 Typing Rules for Runtime Configurations . 41 ix 3 Properties of the Type System 43 3.1 Main Results . 43 3.2 Proofs . 44 Related Work of Part I 53 II Safe Communication by Encoding 57 Introduction to Part II 59 4 Background on π-Types 63 4.1 Syntax . 63 4.2 Semantics . 65 4.3 π-Types . 66 4.4 π-Typing Rules . 67 4.5 Main Results . 71 5 Background on Session Types 73 5.1 Syntax . 75 5.2 Semantics . 76 5.3 Session Types . 78 5.4 Session Typing Rules . 79 5.5 Main Results . 83 6 Session Types Revisited 85 6.1 Types Encoding . 85 6.2 Terms Encoding . 87 6.3 Properties of the Encoding . 89 6.3.1 Auxiliary Results . 90 6.3.2 Typing Values by Encoding . 92 6.3.3 Typing Processes by Encoding . 93 6.3.4 Operational Correspondence . 102 6.4 Corollaries from the Encoding . 109 III Advanced Features on Safety by Encoding 111 Introduction to Part III 113 x 7 Subtyping 115 7.1 Subtyping Rules . 115 7.2 Properties . 116 8 Polymorphism 121 8.1 Parametric Polymorphism . 121 8.1.1 Syntax . 122 8.1.2 Semantics . 122 8.1.3 Typing Rules . 123 8.1.4 Encoding . 123 8.1.5 Properties of the Encoding . 124 8.2 Bounded Polymorphism . 127 8.2.1 Syntax . 127 8.2.2 Semantics . 129 8.2.3 Typing Rules . 130 8.2.4 Encoding . 131 8.2.5 Properties of the Encoding . 132 9 Higher-Order Communication 141 9.1 Syntax .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    236 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us