Population Protocols: Expressiveness, Succinctness and Automatic Verification
Total Page:16
File Type:pdf, Size:1020Kb
Fakultat¨ fur¨ Informatik Technische Universitat¨ Munchen¨ Population Protocols: Expressiveness, Succinctness and Automatic Verification. Stefan Jaax Vollst¨andigerAbdruck der von der Fakult¨atf¨urInformatik der Technischen Universit¨at M¨unchen zur Erlangung des akademischen Grades eines Doktor der Naturwissenschaften (Dr. rer. nat.) genehmigten Dissertation. Vorsitzender: Prof. Dr. Helmut Seidl Pr¨ufendeder Dissertation: 1. Prof. Dr. Francisco Javier Esparza Estaun 2. Prof. Rupak Majumdar, Ph.D., Technische Universit¨atKaiserslautern Die Dissertation wurde am 03.03.2020 bei der Technischen Universit¨atM¨unchen eingereicht und durch die Fakult¨atf¨urInformatik am 04.06.2020 angenommen. Abstract Population protocols (Angluin et al., PODC, 2004) are a model of distributed computa- tion in which identical, finite-state, passively mobile agents interact in pairs to achieve a common goal. In the basic model of population protocols, agents compute number predicates by reaching a stable consensus. It is well known that population protocols compute precisely the semilinear predicates, or, equivalently, the predicates definable in Presburger arithmetic, the first-order theory of the natural numbers equipped with addition and the standard linear order. This thesis investigates three fundamental questions of the theory of population pro- tocols: Space complexity, verification complexity, and expressiveness of reasonable ex- tensions. Space Complexity. We show that every quantifier-free Presburger predicate ' aug- mented with remainder predicates is computable by a population protocol with poly(j'j) states, where j'j denotes the size of ' in binary encoding. Further, the protocol can be constructed in polynomial time. This is a major improvement to the previously known construction, which requires 2poly(j'j) states. As a special case, we consider predicates of the form 'c(x) = x ≥ c, where c is a positive integer constant. We provide upper and lower bounds for the number of states needed to represent 'c(x). Verification Complexity. Verification complexity is concerned with automatic solu- tions to the correctness problem: Given a population protocol P and some Presburger formula ', decide whether P computes '. Esparza et al. showed that the correctness problem is decidable, albeit of very high complexity: It is at least as hard as the Petri net reachability problem, which has non-elementary complexity (Esparza et al., Acta Informatica, 2017). The high complexity of the correctness problem is essentially due to its parametricity: The verifying procedure has to decide whether the protocol stabilizes to the correct consensus for all inputs (of which there are infinitely many). We exhibit a subclass of population protocols that is efficiently decidable and suitable for automatic verification. We implemented our approach in the first fully-automatic and parametric verification tool of its kind, and show its viability with benchmarks from the literature. Expressiveness of Extensions. We show that under very weak assumptions, exten- sions of the basic model of population protocols compute at most the number predicates in NL, when the input is given in unary. As a very natural example of an extension matching this upper bound, we introduce broadcast protocols, which extend population protocols by the ability to transmit reliable broadcast signals simultaneously received by all agents. iii Zusammenfassung Populationsprotokolle (Angluin et al., PODC, 2004) sind ein distribuiertes Rechenmodell von baugleichen, passiv-mobilen Agenten mit endlichem Speicher, welche in paarweisen Interaktionen Rechnungen durchf¨uhren. In dem Standardmodell berechnen Agenten Zahlenpr¨adikate durch Erlangen eines stabilen Konsenses. Bekanntermaßen berechnen Populationsprotokolle genau die semilinearen Pr¨adikate; dies sind die Pr¨adikate definier- bar in Presburger-Arithmetik, der Theorie der Pr¨adikatenlogik erster Stufe der ganzen Zahlen mit Addition und der gew¨ohnlichen linearen Ordnung. Die vorliegende Arbeit untersucht Populationsprotokolle aus dreierlei Blickwinkeln: Platzkomplexit¨at,Verifikationskomplexit¨at,und Ausdr¨ucksst¨arke von Erweiterungen. Speicherkomplexit¨at. Wir zeigen, dass sich jedes Quantoren-freie Presburger-Pr¨adikat ' (erweitert um Modulo-Pr¨adikate) durch ein Protokoll mit poly(j'j) Zust¨andenberech- nen l¨asst,wobei j'j die L¨angevon ' in Bin¨arkodierung bezeichnet. Ferner l¨asstsich das Protokoll in Polynomialzeit konstruieren. Dies ist eine deutliche Verbesserung zu der bekannten Vorl¨auferkonstruktion, welche 2poly(j'j) Zust¨andeben¨otigt. Als Spezialfall betrachten wir Pr¨adikate der Form 'c(x) = x ≥ c mit c 2 N. Wir geben obere und untere Schranken f¨urdie Anzahl an ben¨otigtenZust¨andenzur Berechnung von 'c(x). Verifikationskomplexit¨at. Verifikationskomplexit¨atbezieht sich auf automatische L¨osungsans¨atzef¨urdas Korrektheitsproblem: Entscheide, ob ein gegebenes Protokoll P ein gegebenes Pr¨adikat ' berechnet. Esparza et al. wiesen Entscheidbarkeit des Kor- rektheitsproblems nach, wenngleich mit hoher Komplexit¨at:Das Problem ist mindestens so schwer wie das Erreichbarkeitsproblem f¨urPetrinetze, welches nicht-elementare Kom- plexit¨ataufweist (Esparza et al., Acta Informatica, 2017). Diese hohe Komplexit¨at l¨asstsich im Wesentlichen auf die Parametrizit¨atdes Problems zur¨uckf¨uhren: Die ver- ifizierende Prozedur muss entscheiden, ob das Protokoll zum richtigen Konsens kon- vergiert, und zwar f¨ur alle Eingaben (wovon es unendlich viele gibt). Wir stellen eine Teilklasse von Populationsprotokollen vor, welche sich f¨urautomatische Verifika- tion eignet. Wir implementieren den daraus resultierenden Ansatz in dem ersten vol- lautomatischen und parametrischen Verifikationswerkzeug seiner Art, und f¨uhreneine Machbarkeitsstudie mit Benchmarks aus der Literatur durch. Ausdrucksst¨arke von Erweiterungen. Wir zeigen, dass Erweiterungen von Pop- ulationsprotokollen unter relativ schwachen Annahmen h¨ochstens die Pr¨adikate in NL berechnen, wobei die Eingabe als un¨ar-kodiert angenommen wird. Als nat¨urliche Er- weiterung, welche an diese obere Schranke heranreicht, stellen wir Broadcast-Protokolle vor; diese erweitern Populationprotokolle um globale, verl¨assliche Broadcasts, die simul- tan von allen Agenten empfangen werden. v Acknowledgments First and foremost, I would like to thank my doctoral advisor, Javier Esparza, for his invaluable guidance and support. Javier gave me plenty of opportunities for personal growth; his focus on clarity and precision helped me become a better researcher, and a better communicator of ideas. With sincere gratitude, I would like to thank my Canadian co-author Michael Blondin, who I now consider a good friend. Even by Canadian standards, Michael is exceptionally nice and considerate; it is always a joy to work with him. In autumn 2018, Michael hosted me at his home university in Sherbrooke, Canada. Together with his partner Fannie he went out of his way to make my research stay pleasant and memorable. I would also like to thank Stefan Kiefer for hosting me at the University of Oxford in spring 2019. Stefan introduced me to the academic culture of Oxford (with all its arcane customs and traditions), and he reserved a good chunk of his time for a rewarding exchange of ideas. The two research stays in Oxford and Sherbrooke were made possible by my graduate school IGSSE, which provided extensive funding. I would like to thank the team of IGSSE for their great support. I am also grateful for the support I received by an ERC Advanced Grant (787367: PaVeS). Furthermore, I would like to thank my other co-authors for their fruitful collaboration: Blaise Genest, Martin Helfrich, Anton´ınKuˇcera,Philipp Meyer, Michael Raskin, and Chana Weil-Kennedy. Special thanks go to Philipp, who implemented our verification approach quickly and efficiently. I would also like to thank all my colleagues from Lehrstuhl VII for the insightful discussions and the welcoming atmosphere; in particular, I would like to thank Salomon Sickert for always surprising me with neat presents, Michael Luttenberger for his efforts to make organizational matters easier for us, and Stefan Kugele for bringing a breath of fresh air. Finally, I would like to thank friends and family for their support. I am grateful for being surrounded by a circle of friends that call themselves Dehaan-Bros; their quirky and whimsical humor never fails to cheer me up. I would like to thank my friends Fari, Hannah, Jens, Niklas, Vincent, Pauline and Rasty for giving me strength, especially in difficult times. The biggest thanks of all go to my parents for their limitless love, patience and support. vii Contents Abstract iii Zusammenfassung v Acknowledgments vii Contents ix List of Figures xi List of Tables xii Acronyms xiii 1 Introduction 1 1.1 Literature Overview . .3 1.2 Summary of Contributions . .4 1.3 Publication Summary . .4 1.4 Outline of the Thesis . .5 2 Preliminaries 6 2.1 Basic Notation . .6 2.2 Vector Addition Systems . .6 2.3 Presburger Arithmetic and Semilinear Sets . .7 3 The Basic Model of Population Protocols 8 3.1 Formal Definition . .8 3.2 Examples of Population Protocols . .9 3.3 Population Protocols compute precisely the Semilinear Predicates . 10 3.4 Global Fairness and other Fairness Notions . 11 3.5 Protocols with Leaders . 13 4 Space Complexity 15 4.1 Problem Statement . 15 4.2 New Contributions . 15 4.2.1 Overview for x ≥ c ........................... 15 4.2.2 Overview for QFPA . 16 4.2.3 Multi-Way Protocols . 18 4.2.4 Dynamic Initialization for Succinct Parallelism