Front Matter
Total Page:16
File Type:pdf, Size:1020Kb
Cambridge University Press 978-0-521-87546-2 - Reactive Systems: Modelling, Specification and Verification Luca Aceto, Anna Ingolfsdottir, Kim G. Larsen and Jiri Srba Frontmatter More information Reactive Systems A reactive system comprises networks of computing components, achieving their goals through interaction among themselves and their environment. Thus even relatively small systems may exhibit unexpectedly complex behaviours. As, moreover, reactive systems are often used in safety critical systems, the need for mathematically based formal methodology is increasingly important. There are many books that look at particular methodologies for such sys- tems. This book offers a more balanced introduction for graduate students and describes the various approaches, their strengths and weaknesses and when they are best used. Milner’s CCS and its operational semantics are introduced, together with the notions of behavioural equivalences based on bisimulation techniques and with recursive extensions of Hennessy-Milner logic. In the sec- ond part of the book the presented theories are extended to take timing issues into account. The book has arisen from various courses taught in Denmark and Iceland and is designed to give students a broad introduction to the area, with exercises throughout. LUCA ACETO is Professor of Computer Science at Reykjav´ık University, Iceland, and Aalborg University, Denmark. ANNA INGOLFSD´ OTTIR´ is Professor of Computer Science at Reykjav´ık University, Iceland, and Aalborg University, Denmark. KIM G. LARSEN is Professor of Computer Science at Aalborg University, Denmark, and Twente University, The Netherlands. JIRˇ´I SRBA is Associate Professor in Computer Science at Aalborg University, Denmark. © Cambridge University Press www.cambridge.org Cambridge University Press 978-0-521-87546-2 - Reactive Systems: Modelling, Specification and Verification Luca Aceto, Anna Ingolfsdottir, Kim G. Larsen and Jiri Srba Frontmatter More information ‘Many modern-day computing systems are reactive in nature; they persist indefinitely, responding to the interactions of users, and updating their internal structures accordingly. Over the last two decades, an elegant theory of these reactive systems has emerged, and is being increasingly applied in industrial settings. And at last we have an accessible textbook for this area, written by a team who have played a central role in the development of the underlying theory, and the software tools which are essential to its successful application. It treats both timed and untimed systems and, although the underlying theory is carefully and methodically explained, the main trust of the book is to engage students with the material via a wealth of thought-provoking examples. The clarity of the exposition is exceptional; it presents the essential ideas clearly, avoid- ing unnecessary detail, but at the same time has well-chosen pointers to more advanced concepts. The book is destined to become the standard textbook for reactive systems.’ Matthew Hennessy, Sussex University ‘A must for anybody interested in formal analysis techniques for computing systems.’ Wan Fokkink, Vrije Universiteit Amsterdam ‘This book is a gentle introduction to the basics of theories of interactive systems that starts with an introduction to CCS and its semantic theory and then moves to introducing modal logics and timed models of concurrency. By means of a number of small but intriguing examples and by using software tools based on sound theoretical principles, it leads the reader to appreciating and mastering a number of process algebra-based techniques that are also having a great impact outside academic circles. The authors have managed to concentrate their expertise, enthusiasm and pedagogical ability in less than 300 pages. The presentation is very clear and conveys sufficient intuition to make the book appropriate also for students with limited mathematical background. An excellent advanced undergraduate text.’ Rocco De Nicola, Universita´ di Firenze ‘This book offers an introduction to model-based verification of reactive systems, a tech- nology that is essential to all IT-developers of the future, given the global trend in informa- tion technology towards ubiquitous computing. The book is unique in its pedagogical style, introducing the required theory (of models and specification formalisms for reactive systems) motivated carefully with its applications (in the development and use of automated verification tools in practice), and written as a textbook that can be used readily at many different levels of IT-related curricula.’ Mogens Nielsen, Aarhus University © Cambridge University Press www.cambridge.org Cambridge University Press 978-0-521-87546-2 - Reactive Systems: Modelling, Specification and Verification Luca Aceto, Anna Ingolfsdottir, Kim G. Larsen and Jiri Srba Frontmatter More information Reactive Systems Modelling, Specification and Verification Luca Aceto12Anna Ingolfsd´ ottir´ 12 Kim G. Larsen1 Jirˇ´ı Srba1 1 Department of Computer Science, Aalborg University, 9220 Aalborg Ø, Denmark 2 Department of Computer Science, School of Science and Engineering, Reykjav´ık University, Iceland © Cambridge University Press www.cambridge.org Cambridge University Press 978-0-521-87546-2 - Reactive Systems: Modelling, Specification and Verification Luca Aceto, Anna Ingolfsdottir, Kim G. Larsen and Jiri Srba Frontmatter More information CAMBRIDGE UNIVERSITY PRESS Cambridge, New York, Melbourne, Madrid, Cape Town, Singapore, Sao˜ Paulo Cambridge University Press The Edinburgh Building, Cambridge CB2 8RU, UK Published in the United States of America by Cambridge University Press, New York www.cambridge.org Information on this title: www.cambridge.org/9780521875462 C L. Aceto, A. Ingolfsd´ ottir,´ K. G. Larsen and J. Srba 2007 This publication is in copyright. Subject to statutory exception and to the provisions of relevant collective licensing agreements, no reproduction of any part may take place without the written permission of Cambridge University Press. First published 2007 Printed in the United Kingdom at the University Press, Cambridge A catalogue record for this publication is available from the British Library ISBN 978-0-521-87546-2 hardback Cambridge University Press has no responsibility for the persistence or accuracy of URLs for external or third-party internet websites referred to in this publication, and does not guarantee that any content on such websites is, or will remain, accurate or appropriate. © Cambridge University Press www.cambridge.org Cambridge University Press 978-0-521-87546-2 - Reactive Systems: Modelling, Specification and Verification Luca Aceto, Anna Ingolfsdottir, Kim G. Larsen and Jiri Srba Frontmatter More information Contents Figures and tables page viii Preface x I A Classic Theory of Reactive Systems 1 1 Introduction 1 Aims of this book 1 1.1 What are reactive systems? 2 1.2 Process algebras 5 2 The language CCS 7 2.1 Some CCS process constructions 7 2.2 CCS, formally 16 3 Behavioural equivalences 31 3.1 Criteria for good behavioural equivalence 31 3.2 Trace equivalence: a first attempt 34 3.3 Strong bisimilarity 36 3.4 Weak bisimilarity 53 3.5 Game characterization of bisimilarity 65 3.6 Further results on equivalence checking 72 4 Theory of fixed points and bisimulation equivalence 75 4.1 Posets and complete lattices 75 4.2 Tarski’s fixed point theorem 78 4.3 Bisimulation as a fixed point 85 5 Hennessy–Milner logic 89 5.1 Introduction to Hennessy–Milner logic 89 5.2 Hennessy–Milner theorem 98 v © Cambridge University Press www.cambridge.org Cambridge University Press 978-0-521-87546-2 - Reactive Systems: Modelling, Specification and Verification Luca Aceto, Anna Ingolfsdottir, Kim G. Larsen and Jiri Srba Frontmatter More information vi Contents 6 HML with recursion 102 Introduction 102 6.1 Examples of recursive properties 107 6.2 Syntax and semantics of HML with recursion 109 6.3 Largest fixed points and invariant properties 113 6.4 A game characterization for HML with recursion 115 6.5 Mutually recursive equational systems 120 6.6 Characteristic properties 125 6.7 Mixing largest and least fixed points 134 6.8 Further results on model checking 139 7 Modelling mutual exclusion algorithms 142 Introduction 142 7.1 Specifying mutual exclusion in HML 147 7.2 Specifying mutual exclusion using CCS itself 149 7.3 Testing mutual exclusion 152 II A Theory of Real-time Systems 159 8 Introduction 159 8.1 Real-time reactive systems 159 9 CCS with time delays 161 9.1 Intuition 161 9.2 Timed labelled transition systems 163 9.3 Syntax and SOS rules of timed CCS 165 9.4 Parallel composition 169 9.5 Other timed process algebras and discussion 173 10 Timed automata 175 10.1 Motivation 175 10.2 Syntax of timed automata 176 10.3 Semantics of timed automata 180 10.4 Networks of timed automata 185 10.5 More on timed-automata formalisms 190 11 Timed behavioural equivalences 193 11.1 Timed and untimed trace equivalence 193 11.2 Timed and untimed bisimilarity 195 11.3 Weak timed bisimilarity 200 11.4 Region graphs 203 11.5 Zones and reachability graphs 214 11.6 Further results on timed equivalences 218 © Cambridge University Press www.cambridge.org Cambridge University Press 978-0-521-87546-2 - Reactive Systems: Modelling, Specification and Verification Luca Aceto, Anna Ingolfsdottir, Kim G. Larsen and Jiri Srba Frontmatter More information Contents vii 12 Hennessy–Milner logic with time 220 Introduction 220 12.1 Basic logic 221 12.2 Hennessy–Milner logic with time and regions 229 12.3 Timed bisimilarity versus HML with time 232 12.4 Recursion in HML with time 237 12.5 More on timed logics 246 13 Modelling and analysis of Fischer’s algorithm 248 Introduction 248 13.1 Mutual exclusion using timing 250 13.2 Modelling Fischer’s algorithm 251 13.3 Further exercises on timing-based mutual exclusion algorithms 258 Appendix A Suggestions for student projects 261 A.1 Alternating-bit protocol 261 A.2 Gossiping girls 262 A.3 Implementation of regions 263 References 267 Index 281 © Cambridge University Press www.cambridge.org Cambridge University Press 978-0-521-87546-2 - Reactive Systems: Modelling, Specification and Verification Luca Aceto, Anna Ingolfsdottir, Kim G.