TEUBNER-TEXTE zur Informatik Band 31 C.H.Cap A Calculus of Distributed and Parallel Processes
TEUBNER-TEXTE zur Informatik Herausgegeben von Prof. Dr. Johannes Buchmann, Darmstadt Prof. Dr. Udo Lipeck, Hannover Prof. Dr. Franz J. Rammig, Paderborn Prof. Dr. Gerd Wechsung, Jena Ais relativ junge Wissenschaft lebt die Informatik ganz wesentlich von aktuellen Beitragen. Viele Ideen und Konzepte werden in Originalarbeiten, Vorlesungsskripten und Konferenzberichten behandelt und sind damit nur einem eingeschrankten Leserkreis zuganglich. LehrbOcher stehen zwar zur VerfOgung, konnen aber wegen der schnellen Entwicklung der Wissenschaft oft nicht den neuesten Stand wiedergeben. Die Reihe "TEUBNER-TEXTE zur Informatik" soli ein Forum for Einzel- und Sammelbeitrage zu aktuellen Themen aus dem gesamten Bereich der Informatik sein. Gedacht ist dabei insbesondere an herausragende Dissertationen und Habilitationsschriften, speziel Ie Vorlesungsskripten sowie wissenschaftlich aufbereitete AbschluBberichte bedeutender Forschungsprojekte. Auf eine verstandliche Darstellung der theoretischen Fundierung und der Perspektiven for Anwendungen wird besonderer Wert gelegt. Das Programm der Reihe reicht von klassischen Themen aus neuen Blickwinkeln bis hin zur Beschreibung neuartiger, noch nicht etablierter Verfahrensansatze. Dabei werden bewubt eine gewisse Vorlaufigkeit und Unvollstandigkeit der Stoffauswahl und Darstellung in Kauf genommen, weil so die Lebendigkeit und Originalitat von Vorlesungen und Forschungsseminaren beibehalten und weitergehende Studien angeregt und erleichtert werden konnen. TEUBNER-TEXTE erscheinen in deutscher oder englischer Sprache.
A Calculus of Distributed and Parallel Processes By Prof. Dr. Clemens H. Cap Universitat Rostock EI3 B.G.Teubner Stuttgart Leipzig 2000
Prof. Dr. Clemens H. Cap Born in 1965 in Innsbruck. Studied mathematics, computer science and physics at Innsbruck. He received his diploma degree in mathematics in 1986 and his PhD in mathematics in 1988. After several years as research assistant, postdoc and assistant professor for formal methods in computer science at the university of Zurich, he moved to Germany where he presently is full professor and Heinz-Nixdorf-Chair for information and communication services at the university of Rostock. His research interests are the specification, implementation and application of distributed communication systems. Gedruckt auf chlorfrei gebleichtem Papier. Die Deutsche Bibliothek - CIP-Einheitsaufnahme Ein Titelsatz fur diese Publikation ist bei Der Deutschen Bibliothek erhaltlich Das Werk einschlieblich alier seiner Teile ist urheberrechtlich geschutzt. Jede Verwertung auberhalb der eng en Grenzen des Urheberrechtsgesetzes ist ohne Zustimmung des Verlages unzulassig und strafbar. Das gilt besonders fur Vervielfaltigungen. Obersetzungen, Mikroverfilmungen und die Einspeicherung und Verarbeitung in elektronischen Systemen. 2000 B.G.Teubner Stuttgart Leipzig ISBN-I3: 978-3-322-86765-0 e-isbn- I 3: 978-3-322-86763-6 DOl: 10.1007/978-3-322-86763-6
Preface It is the good reader that makes the good book. RALPH WALDO EMERSON, Society & Solitude. In the course of two projects, the author of this book was involved in the design of the platforms PARFORM [CS93) and LOLA [Cap94), [CS) for the support of parallel computing in distributed systems. The former system was geared towards the highly efficient use of idle resources in networks of workstations, and the latter system was intended as a scalability study: How many workstations in the global Internet can be used simultaneously for solving a massively parallel problem? In one of the experiments conducted with these systems, up to 800 workstations on all five continents were cooperating for the solution of a search problem from molecular biology [Cap94). The most important lessons which the author was forced to learn during the course of these projects were not to rely on any documentation of network- and low-level system-calls, to use neither common sense nor mathematical logic during the design of a large distributed system, but to be happy with a working program, and not to ask, why it would work. This practical experience is in sharp contrast to the reliability that is generally expected from engineering sciences which utilize the rigor of mathematical methods. The consequent application of mathematical technology allows the prediction of physical phenomena ranging from elementary particles to cosmology. There is an endless number of examples of successful applications of mathematics in nearly every engineering and natural science. Presently, society is just starting to realize the tip of the iceberg of erroneous computer programs. The reader is kindly invited to consider this problem when sitting in a computer controlled airplane, train, or elevator. Recently, one of the largest chip manufacturers had to admit a design error in one of its bestselling microprocessors. The company continued selling the processor for a considerable time before informing the customers. Again, the reader is kindly invited to consider this attitude when sitting in a computer controlled airplane, train, or elevator. Computer science still seems to suffer from two problems: First, for many constructions of applied computer science no satisfactory and successfull mathematical theory is available. There is a long tradition of mathematical concepts for physics but the practical and theoretical problems of correct software have been known only for several decades. Thus, adequate mathematical tools are not yet available. Second, formal concepts have an acceptance prob-
6 Preface lem in the community of applied computer science. The trend to quick-and-dirty solutions prevails systematic approaches, and time-to-market is more important than product quality. To summarize, the tremendous complexity of theoretical computer science and its importance for applications as well as for society is consistently underestimated. In his own research as well as in the present book, the author wants to contribute to narrowing the present gap between theoretical computer science and computer engineering. My first encounter with process theory was the book on Communicating Sequential Processes by Prof. TONY HOARE from Oxford. During a meeting with Prof. JAN BERGSTRA at the Marktoberdorf Summer School I decided to undertake own research in process theory. First ideas for this work originated in a joint seminar on process theory with Prof. ROMAN LIEDL in Innsbruck. A major technical break-through was possible when I spent six weeks in the stimulating atmosphere of the Research Institute for Symbolic Computation (RISC) which is located in an ancient castle in Hagenberg, Upper Austria. I want to thank Prof. BRUNO BUCHBERGER, chairman of RISC, for the opportunity to stay as a guest at his institute and I want to thank the research staff of the institute for all the fruitful discussions. Several results of this work were presented in the process algebra seminar of Prof. JAN BERGSTRA in Amsterdam and at the logic seminar of Prof. ERWIN ENGELER and Prof. GERHARD JAGER in Berne and Zurich. I want to thank Prof. JAN BERGSTRA for three fascinating days in Amsterdam during which I regained much confidence concerning my work, during which I was able to learn much about process theory and efficient ways of research management, and during which I got the opportunity to enjoy the relaxed and friendly way of living in the Netherlands. Prof. ERWIN ENGELER drew my attention to cumulative logic as another logic approach to process theory. Prof. KURT BAUKNECHT and Prof. KARL HANTZSCHMANN, directors of the Departments of Computer Science of the Universities of Zurich and Rostock, the two departments where I worked on this book, are permanently spending all their time and effort to offer and secure an optimal research environment for their departments. Prof. LUTZ RICHTER provided all his guidance and friendly advice through my years as postdoc and young assistant professor. Prof. HELMUT SCHAUER continuously took interest in my work. The financial support of the Swiss government in a special program for supporting young talents provided the financial framework for my work by funding the position of an assistant professor. Prof. G ERD WECHSUNG accepted this work in his series "Teubner-Texte zur Informatik". My friend and colleague Dr. EDGAR LEDERER spent uncounted hours in reading and discussing the topics of this book. CHRISTIAN HIDBER carefully read parts of this work, made highly valuable remarks on my mathematical style, and kept repeating these remarks until I finally managed to make significant progress in my style of presenting mathematical topics. Dr. RUTH MAGDOWSKI shared the ups and downs during the year of writing this book. Many other friends and colleagues at Zurich and Rostock provided invaluable support for my work. I want to thank in alphabetical order CLAUDINE ACKERMANN for ordering and administrating the scientific journals, WOLFRAM BiiTow for setting up the technical infrastructure, MAJA EBNER for her secretarial work, NORBERT FUCHS for porting a linear logic proof system to the local PROLOG dialect, WOLFGANG GEHRKE at Hagenberg for discussions and for pointing out important references, ANKE HANLER for setting up the technical infrastructure, ANGELIKA JUNGE for her secretarial work, NATALIA IOUSTINOVA for many
Preface 7 fruitful discussions, SARA KALVALA at Cambridge for suggestions on an implementation of linear logic in the ISABELLE proof system, LOTTI KUNDIG for her administrative help and for keeping up my moral, MICHAEL KUNZLI and RAFAEL KUNZLI for implementing a subset of the specification language and for fruitful discussions, CORINNE MAURER for her secretarial work, LARRY PAULSON at Cambridge for an introduction to the ISABELLE proof system, BEAT RAGETH for maintaining the workstation environment, KERSTIN REIHER for performing bibliographic research and for allowing me to keep a significant and ever increasing number of library books in my office, MATHIAS RICHTER for discussions and proofreading, PETRA SCHMIDLI for her secretarial work, NATARAJAN SHANKAR from SRI for providing his proof system for multiplicative additive linear logic and for adapting it to my needs, RICO SOLCA for fixing my portable computer, which consistently crashed on Friday afternoon, and VOLKER STRUMPEN for discussions and proofreading. Special thanks to JURGEN WEISS, editor at Teubner-Verlag, for his help and patience during the phase of reformatting and final typesetting. For typesetting this book I used the 'IE;X system by DONALD KNUTH, the macro packages fb.'ie;x by LESLIE LAMPORT, and the diagram and proof style packages from PAUL TAYLOR. The bibliography was produced with the help of BIBTEJX by OREN PATASHNIK, the index was generated with the MAKEINDEX system from PEHONG CHEN, several figures were produced with the X-Windows application IDRAW. All of the above programs are part of one of the most advanced scientific typesetting systems. It is most pleasant to find such elaborate and most reliable software in the public domain. Accompanied by the music of JOHANN SEBASTIAN BACH, typesetting was even more enjoyable. Rostock, September 1999 C. H. Cap
Contents 1 Introduction 13 1.1 What is a Process? - An Introduction 13 1.2 Process Theory as Research Area 14 1.3 Elements of Process Theory... 18 1.4 Classification of Process Theories 22 1.5 How to Use This Book? - A Reading Guide 24 2 Transition Systems 27 2.1 Ordinary Transition Systems 28 2.2 Interpreting Transition Systems. 29 2.3 Typed and Labeled Systems... 34 2.4 Non-Determinism, Causality, and Behaviour. 41 2.5 Sequential Composition 49 2.6 Fairness... 53 3 Distributed Transition Systems 59 3.1 Motivation... 60 3.2 Distributed Transition Systems 61 3.3 Non-Determinism, Causality, and Behaviour. 66 3.4 Examples of Branching Structures... 73 3.5 Branching Structure and Constructions 76 3.6 Branching Structure and Geometry. 84 3.7 Confusion... 93 3.8 First Order Transition Systems 101 3.9 Fairness... 109
10 Contents 4 Higher Order Transition Systems 117 4.1 Motivation... 118 4.2 Higher Order Transition Systems 123 4.3 Reversible and Invertible Transitions 127 4.4 Forgetting the Higher Order Structure 129 5 Process Specification Formalisms 133 5.1 Linear Logic and Transition Systems 133 5.2 Linear Logic Process Specification 140 5.3 Extensions of the Formalism.... 144 5.4 Equivalence and Abstraction for Processes. 149 6 Examples 153 6.1 A Specification Language 154 6.2 The Stack 155 6.3 The,Bag. 163 6.4 Interrupts 170 6.5 Data Replication 173 6.6 The Alternating Bit Protocol 181 6.7 Workflow Management. 194 6.8 FIBONACCI Numbers 197 6.9 An Implementation. 198 7 Categorical Interpretations 201 7.1 The CURRy-HoWARD Correspondence 201 7.2 Transition Systems 203 7.3 Linear Logic.... 205 8 Conclusions, Challenges, and Opportunities 209 8.1 What Has Been Achieved?. 209 8.2 Theoretical Problems. 215 8.3 Practical Problems 219 8.4 Speculations.. 222 8.5 Final Remarks 223
Contents 11 A Mathematical Prerequisites 225 A.1 Order Structures 225 A.2 Monoids. 227 B Linear Logic 231 B.1 Universe of Discourse. 232 B.2 Motivations for Linear Logic. 235 B.3 Syntax and Natural Deduction 240 B.4 Alternate Natural Deduction 245 B.5 Sequent Calculus 255 B.6 Syntactic Results 258 B.7 Interpretation of Linear Formulae. 265 C Category Theory 271 C.1 Category Theory for the Perplexed 272 C.2 Basic Definitions... 272 C.3 Products, Coproducts, and Duality 277 C.4 Functors... 281 C.5 Natural Transformations. 285 C.6 Properties of the Product Functor 287 C.7 Representation of Categories... 293 C.8 Cartesian Closed Categories.... 296 C.9 Symmetric Monoidal Closed Categories 300 Symbols 303 Bibliography 307 Index 321