Parity Games: Descriptive Complexity and Algorithms for New Solvers
Total Page:16
File Type:pdf, Size:1020Kb
Imperial College London Department of Computing Parity Games: Descriptive Complexity and Algorithms for New Solvers Huan-Pu Kuo 2013 Supervised by Prof Michael Huth, and Dr Nir Piterman Submitted in part fulfilment of the requirements for the degree of Doctor of Philosophy in Computing of Imperial College London and the Diploma of Imperial College London 1 Declaration I herewith certify that all material in this dissertation which is not my own work has been duly acknowledged. Selected results from this dissertation have been disseminated in scientific publications detailed in Chapter 1.4. Huan-Pu Kuo 2 Copyright Declaration The copyright of this thesis rests with the author and is made available under a Creative Commons Attribution Non-Commercial No Derivatives licence. Researchers are free to copy, distribute or transmit the thesis on the condition that they attribute it, that they do not use it for commercial purposes and that they do not alter, transform or build upon it. For any reuse or redistribution, researchers must make clear to others the licence terms of this work. 3 Abstract Parity games are 2-person, 0-sum, graph-based, and determined games that form an important foundational concept in formal methods (see e.g., [Zie98]), and their exact computational complexity has been an open prob- lem for over twenty years now. In this thesis, we study algorithms that solve parity games in that they determine which nodes are won by which player, and where such decisions are supported with winning strategies. We modify and so improve a known algorithm but also propose new algorithmic approaches to solving parity games and to understanding their descriptive complexity. For all of our contributions, we write our own custom frameworks, in the Scala programming language, to perform tailored experiments and empirical studies to demonstrate and support our theoretical findings. First, we improve on one of the solver algorithms, based on small progress measures [Jur00], by use of concurrency. We show that, for many parity games, it is possible to deliver extra performance using this technique in a multi-core environment. Second, we design algorithms to reduce the computational complexity of parity games, and create implementations to observe and evaluate the behaviours of these reductions in our experimental settings. The measure Rabin index, arising from the design of the said algorithm, is shown to be a new descriptive complexity for parity games. Finally, we define a new family of attractors and derive new parity game 4 solvers from them. Although these new solvers are “partial”, in that they do not solve all parity games completely, our experiments show that they do solve a set of benchmark games (i.e., games with known structures) designed to stress test solvers from PGSolver toolkit [FL10] completely, and some of these partial solvers deliver favourable performance against a known high performance solver in many circumstances. 5 Acknowledgement I would like to express my sincere gratitude to my supervisor Professor Michael Huth, and my external supervisor Dr Nir Piterman. Without Pro- fessor Huth’s advice and guidance, and Dr Piterman’s ability to make sense of the intricate details of this research, the making of this thesis would not have been possible, and I would have suffered a significantly greater deal of hardship in trying. In addition, their patience and willingness in answer- ing my numerous (in the order of thousands) and quite often fundamental emails/questions, have helped me tremendously in the progress of this work. I would also like to thank my good colleagues in Huxley Room 502, Dr Luke Dickens, Dr Jiefei Ma, Dr Ryan Wishart, Dr Dalal Alrajeh, Dr Robert Craven, and Graham Deane. The knowledge and experience they shared with me have eased my transition, from industrial, into academic life, and their friendships have made my stay in the office very fun and enjoyable. Finally, I thank my adopted country the United Kingdom, for making it possible for me to pursue a research career at this stage of my life. 6 This thesis is dedicated to my dear wife Priya, who has stood by me for the duration of the PhD, and endured numerous rehearsals of my talks. 7 Contents 1. Introduction 19 1.1. Applications of parity games . 20 1.1.1. Design synthesis process . 20 1.1.2. Model checking in µ-calculus . 21 1.1.3. Model checking and satisfiability in CTL* . 23 1.2. Recent approaches in speeding up parity game solving . 23 1.3. Objectives . 24 1.4. Publications . 25 1.5. Scope/Assumptions . 26 1.6. Outline of thesis . 27 2. Background 29 2.1. Parity games . 30 2.2. Winning the game . 32 2.3. Strategies . 35 2.4. Dead-ends . 36 2.5. Winning strategies and regions . 37 2.6. Determinacy . 38 2.6.1. Subgames . 38 2.6.2. p-Traps . 39 2.6.3. p-Attractors . 40 2.6.4. p-Paradise . 43 8 2.6.5. Determinacy proof . 43 2.7. Solver algorithms and tools . 48 2.7.1. Zielonka’s recursive solver . 48 2.7.2. The SPM solver . 49 2.7.3. PGSolver . 50 3. Improved Parity Game Solving by Concurrency 52 3.1. Introduction . 52 3.2. Jurdziński’s small progress measures (SPM) . 54 3.2.1. Structure of a small progress measure . 54 3.2.2. Small progress measure comparison . 56 3.2.3. Small progress measure incrementation . 57 3.2.4. Small progress measure algorithm . 58 3.3. Enhancement of SPM through concurrency . 65 3.4. Known concurrent implementation, PW solver . 65 3.5. CSPM: our concurrent solution . 68 3.6. Correctness of CSPM solution . 73 3.7. Experimental evaluation . 79 3.7.1. Experimental assumptions and setup . 79 3.7.2. Experimental results on random games . 84 3.7.3. Experimental results on non-random games . 87 3.8. Conclusion . 89 4. Descriptive Complexity of Parity Games 92 4.1. Introduction . 92 4.2. Background . 96 4.2.1. Descriptive complexity . 96 4.2.2. Cycles and simple cycles . 98 4.2.3. Satisfiability problem . 98 4.2.4. Static colour compression . 100 9 4.3. Colour compression by Rabin index computation . 103 4.3.1. Rabin index computation . 107 4.3.2. Complexity . 114 4.3.3. Abstracting in the Rabin index by over-approximation 117 4.4. Implementation details . 122 4.4.1. Cycle detection using Tarjan’s DFS algorithm . 122 4.4.2. Simple cycle detection using SAT . 123 4.4.3. Implementation of the chosen parity game solver . 131 4.5. Test framework . 132 4.6. Experimental results . 132 4.7. Related work . 135 4.7.1. Priority propagation . 135 4.7.2. Rabin index in parity automata . 136 4.8. Conclusions . 138 5. Partial Solvers 140 5.1. Introduction . 140 5.2. Unique colour solver . 142 5.2.1. Fatal k-attractor . 142 5.2.2. Partial solver psol .................... 144 5.2.3. Complexity . 148 5.3. Buchi solver . 149 5.3.1. Fatal Buchi d-attractor . 149 5.3.2. Partial solver psolB ................... 150 5.3.3. Complexity . 153 5.4. Quantified layered Buchi solver . 153 5.4.1. Quantified layered Buchi q-attractor . 153 5.4.2. Partial solver psolQ ................... 154 5.4.3. Complexity . 166 10 5.5. Layered Buchi solver . 166 5.5.1. Layered Buchi l-attractor . 166 5.5.2. Partial solver psolL ................... 167 5.5.3. Complexity . 172 5.6. Discussion . 173 5.6.1. Partial solvers as preprocessors . 173 5.7. First experimental results . 174 5.7.1. Experimental setup . 174 5.7.2. Running time, edge removal and fatal attractor count comparison . 176 5.7.3. Summary . 192 5.8. Conclusion . 193 6. Evaluation and Conclusions 195 6.1. Code development and validation framework . 195 6.2. Contributions . 196 6.2.1. Concurrent small progress measures . 196 6.2.2. Rabin index in parity games . 197 6.2.3. Fatal attractors . 199 Bibliography 201 Appendices 208 A. Rabin Index 208 B. Partial Solvers 209 11 List of Tables 5.1. Experimental results for Clique[n]. The first table shows the running time in milliseconds. The second shows psol the edge removal, and the detected fatal attractor count. In fatal A column: psol,(psolB), {psolQ}, [psolL]. 177 5.2. Experimental results for Ladder[n]. The first table shows the running time in milliseconds. The second shows psol the edge removal, and the detected fatal attractor count. In fatal A column: psol,(psolB), {psolQ}, [psolL]. 179 5.3. Experimental results for Model Checker Ladder[n]. The first table shows the running time in milliseconds. The second shows psol the edge removal, and the detected fatal attractor count. In fatal A column: psol,(psolB), {psolQ}, [psolL]. 181 5.4. Experimental results for Recursive Ladder[n]. The first ta- ble shows the running time in milliseconds. The second shows psol the edge removal, and the detected fatal attractor count. In fatal A column: psol,(psolB), {psolQ}, [psolL]. 182 5.5. Experimental results for Strategy Impr[n]. The first table shows the running time in milliseconds. The second shows psol the edge removal, and the detected fatal attractor count. In fatal A column: psol,(psolB), {psolQ}, [psolL]. 183 12 5.6. Experimental results for Towers Of Hanoi[n]. The first table shows the running time in milliseconds. The second shows psol the edge removal, and the detected fatal attractor count. In fatal A column: psol,(psolB), {psolQ}, [psolL]. 185 5.7. Experimental results for Elevator Verification[n]. 187 5.8. Experimental results for Jurdzinski[10, m]. 189 5.9. Experimental results for Jurdzinski[n, 10]. 190 5.10. Experimental results for Jurdzinski[n, n].