
BRICS Basic Research in Computer Science BRICS DS-03-13 M. Nygaard: Domain Theory for Concurrency Domain Theory for Concurrency Mikkel Nygaard BRICS Dissertation Series DS-03-13 ISSN 1396-7002 November 2003 Copyright c 2003, Mikkel Nygaard. BRICS, Department of Computer Science University of Aarhus. All rights reserved. Reproduction of all or part of this work is permitted for educational or research use on condition that this copyright notice is included in any copy. See back inner page for a list of recent BRICS Dissertation Series publi- cations. Copies may be obtained by contacting: BRICS Department of Computer Science University of Aarhus Ny Munkegade, building 540 DK–8000 Aarhus C Denmark Telephone: +45 8942 3360 Telefax: +45 8942 3255 Internet: [email protected] BRICS publications are in general accessible through the World Wide Web and anonymous FTP through these URLs: http://www.brics.dk ftp://ftp.brics.dk This document in subdirectory DS/03/13/ Domain Theory for Concurrency Mikkel Nygaard PhD Dissertation Department of Computer Science University of Aarhus Denmark Domain Theory for Concurrency A Dissertation Presented to the Faculty of Science of the University of Aarhus in Partial Fulfilment of the Requirements for the PhD Degree by Mikkel Nygaard July 31st, 2003 (Revised on December 4th, 2003) Abstract Concurrent computation can be given an abstract mathematical treatment very similar to that provided for sequential computation by domain theory and denotational semantics of Scott and Strachey. A simple domain theory for concurrency is presented. Based on a cat- egorical model of linear logic and associated comonads, it highlights the role of linearity in concurrent computation. Two choices of comonad yield two expressive metalanguages for higher-order processes, both arising from canonical constructions in the model. Their denotational semantics are fully abstract with respect to contextual equivalence. One language, called HOPLA for Higher-Order Process LAnguage, de- rives from an exponential of linear logic. It can be viewed as an extension of the simply-typed lambda calculus with CCS-like nondeterministic sum and prefix operations, in which types express the form of computation path of which a process is capable. HOPLA can directly encode calculi like CCS, CCS with process passing, and mobile ambients with public names, and it can be given a straightforward operational semantics supporting a stan- dard bisimulation congruence. The denotational and operational semantics are related with simple proofs of soundness and adequacy. Full abstraction implies that contextual equivalence coincides with logical equivalence for a fragment of Hennessy-Milner logic, linking up with simulation equivalence. The other language is called Affine HOPLA and is based on a weakening comonad that yields a model of affine-linear logic. This language adds to HOPLA an interesting tensor operation at the price of linearity constraints on the occurrences of variables. The tensor can be understood as a jux- taposition of independent processes, and allows Affine HOPLA to encode processes of the kind found in treatments of nondeterministic dataflow. The domain theory can be generalised to presheaf models, providing a more refined treatment of nondeterministic branching and supporting no- tions of bisimulation. The operational semantics for HOPLA is guided by the idea that derivations of transitions in the operational semantics should correspond to elements of the presheaf denotations. Similar guidelines lead to an operational semantics for the first-order fragment of Affine HOPLA. An extension of the operational semantics to the full language is based on a stable denotational semantics which associates to each computation the minimal input necessary for it. Such a semantics is provided, based on event structures; it agrees with the presheaf semantics at first order and exposes the tensor operation as a simple parallel composition of event structures. The categorical model obtained from presheaves is very rich in struc- ture and points towards more expressive languages than HOPLA and Affine HOPLA—in particular concerning extensions to cover independence mod- els. The thesis concludes with a discussion of related work towards a fully fledged domain theory for concurrency. v Acknowledgments Thanks to my supervisor, Glynn Winskel, for four years of joint work under his expert leadership—and for introducing me to some of the good things in life besides research, like Jalfrezi and Habit Ale; my committee members Pierre-Louis Curien and Guy McCusker for their thoughtful and detailed comments, corrections and sug- gestions for improving the thesis; Pino Rosolini and the people at DISI, University of Genoa, for their hospitality during my stay there and for helpful comments on my work—and especially to Mat´ıas Menni for his friendship; Marcelo Fiore for his insightful suggestions at my Part A exam; Erik Meineche Schmidt and Mogens Nielsen for their early en- couragement; the staff and students at Daimi/BRICS for creating a stimulating working environment; “Læsegruppen” and “Frokostklubben” for forcing me to have a life besides my studies (or, at least for trying); my family for boldly asking questions about my research even though my answers were often incomprehensible. Last, but certainly not least, I wish to thank my wife Mette for her support, her patience, and her unwavering faith in me. Mikkel Nygaard Arhus,˚ Denmark December 2003 vi Contents 1 Introduction 1 1.1SequentialComputation..................... 2 1.2ConcurrentComputation.................... 12 1.3TowardsaDomainTheoryforConcurrency.......... 18 I Path Semantics 25 2 Domain Theory from Path Sets 27 2.1ProcessesasPathSets...................... 27 2.2 Nondeterministic Domains .................... 29 2.3LinearandNonlinearMaps................... 30 3HOPLA 37 3.1DenotationalSemantics..................... 40 3.2UsefulIdentities......................... 44 3.3FullAbstraction......................... 51 3.4OperationalSemantics...................... 52 3.5Simulation............................. 61 3.6ExpressivePower......................... 68 4 Affine HOPLA 73 4.1DenotationalSemantics..................... 75 4.2UsefulIdentities......................... 77 4.3FullAbstraction......................... 79 4.4OperationalSemantics...................... 80 4.5ExpressivePower......................... 92 vii II Presheaf Semantics 95 5 Domain Theory from Presheaves 97 5.1ProcessesasPresheaves..................... 98 5.2PresheafCategories........................ 99 5.3LinearandNonlinearMaps...................102 6 Strong Correspondence 105 6.1FinitaryHOPLA.........................106 6.2FullHOPLA...........................108 6.3AffineHOPLA..........................116 7 Event-Structure Representation 119 7.1EventStructures.........................120 7.2Representations..........................122 7.3StableDenotationalSemantics.................129 7.4StableOperationalSemantics..................132 7.5Higher-OrderProcesses.....................145 8 Conclusion 149 8.1Summary.............................149 8.2RelatedWork...........................150 viii Chapter 1 Introduction Theories of sequential computation concern transformations of input to out- put following a well-defined sequence of basic computational steps. Sequen- tial programs implement mathematical functions mapping from the set of possible inputs to the set of possible outputs. The class of functions aris- ing in this way is very well understood. Even before the first computer was built, the work of Church, Kleene, and Turing had established the notion of computable function, captured by the untyped lambda calculus, recursive functions, and Turing machines in unison [21, 45, 89]. While these basic models give little guidance on how to design and reason about programming languages, domain theory and denotational semantics of Scott and Strachey provide a global mathematical setting for sequential computation, building on top of the foundational theories [82]. It places programming languages in connection with each other; connects with the mathematical worlds of algebra, topology, and logic; and inspires program- ming languages, type disciplines, and methods of reasoning. However, the majority of real computer systems are not merely comput- ing output from input. Rather, their main purpose is to be in ongoing interac- tion with the environment, and the central aspect of their behaviour is there- fore their changing patterns of interaction over time. So the input/output paradigm of sequential computation is not immediately applicable. Theories of concurrent computation concern the behaviour of systems of communicating, autonomous processes. In contrast to sequential computa- tion, there is no class of “computable processes” with universal status, and the global mathematical guidance provided by a domain theory is missing. As a consequence, theories of concurrency form a rather fragmented picture. The point of the thesis is to show that this state of affairs need not persist. We develop a simple domain theory for processes. It inspires process programming languages whose denotational semantics will map programs to mathematical functions on processes, thus combining the input/output paradigm with the notion of a process interacting with its environment. 1 2 CHAPTER 1. INTRODUCTION Section 1.1 recalls the prominent features of Scott and Strachey’s ap- proach, focusing on the structure it provides to theories of sequential com- putation. This is contrasted with the situation
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages172 Page
-
File Size-