A Polynomial Translation of  -Calculus (FCP) to Safe Petri Nets Roland Meyer 1, Victor Khomenko 2, and Reiner Hüchting 1 1 Department of Computing Science,

Slides:



Advertisements
Similar presentations
A Polynomial-Time Algorithm for Global Value Numbering SAS 2004 Sumit Gulwani George C. Necula.
Advertisements

Analysis of Computer Algorithms
There is a pattern for factoring trinomials of this form, when c
Renate Ristov Fachgebiet Softwaretechnik Prof. Dr. Wilhelm Schäfer 17. Juli 2008 Synthesizing State Machines from Live Sequence Charts Software Quality.
Bounded Model Checking of Concurrent Data Types on Relaxed Memory Models: A Case Study Sebastian Burckhardt Rajeev Alur Milo M. K. Martin Department of.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
MULTIPLYING MONOMIALS TIMES POLYNOMIALS (DISTRIBUTIVE PROPERTY)
Relational data integrity
1 Term 2, 2004, Lecture 2, Normalisation - IntroductionMarian Ursu, Department of Computing, Goldsmiths College Normalisation Introduction.
1 Automating the Generation of Mutation Tests Mike Papadakis and Nicos Malevris Department of Informatics Athens University of Economics and Business.
Automata Theory Part 1: Introduction & NFA November 2002.
Turing Machines January 2003 Part 2:. 2 TM Recap We have seen how an abstract TM can be built to implement any computable algorithm TM has components:
1/23 Learning from positive examples Main ideas and the particular case of CProgol4.2 Daniel Fredouille, CIG talk,11/2005.
1 Data Link Protocols By Erik Reeber. 2 Goals Use SPIN to model-check successively more complex protocols Using the protocols in Tannenbaums 3 rd Edition.
Reductions Complexity ©D.Moshkovitz.
Tintu David Joy. Agenda Motivation Better Verification Through Symmetry-basic idea Structural Symmetry and Multiprocessor Systems Mur ϕ verification system.
1 © R. Guerraoui Universal constructions R. Guerraoui Distributed Programming Laboratory.
1 Communication in Distributed Systems REKs adaptation of Tanenbaums Distributed Systems Chapter 2.
R O O T S Field-Sensitive Points-to-Analysis Eda GÜNGÖR
Comp 122, Spring 2004 Order Statistics. order - 2 Lin / Devi Comp 122 Order Statistic i th order statistic: i th smallest element of a set of n elements.
Programming Distributed Erlang Applications: Pitfalls and Recipes + A More Accurate Semantics for Distributed Erlang Hans Svensson Chalmers University.
1 Verification of Parameterized Systems Reducing Model Checking of the Few to the One. E. Allen Emerson, Richard J. Trefler and Thomas Wahl Junaid Surve.
Recurrences : 1 Chapter 3. Growth of function Chapter 4. Recurrences.
OO databases 1 Object Oriented databases. OO databases 2 Developing OODBMS - motivation motivation more and more application areas require systems that.
ABC Technology Project
1 Designing Hash Tables Sections 5.3, 5.4, Designing a hash table 1.Hash function: establishing a key with an indexed location in a hash table.
Hash Tables.
25 July, 2014 Martijn v/d Horst, TU/e Computer Science, System Architecture and Networking 1 Martijn v/d Horst
25 July, 2014 Martijn v/d Horst, TU/e Computer Science, System Architecture and Networking 1 Martijn v/d Horst
Copyright  2003 Dan Gajski and Lukai Cai 1 Transaction Level Modeling: An Overview Daniel Gajski Lukai Cai Center for Embedded Computer Systems University.
Chapter 2 Section 3.
Vasileios Germanos 1, Stefan Haar 2, Victor Khomenko 1, and Stefan Schwoon 2 1 School of Computing Science, Newcastle University, UK 2 INRIA & LSV (ENS.
Modal Logic with Variable Modalities & its Applications to Querying Knowledge Bases Evgeny Zolin The University of Manchester
On Specification and Verification of Location- Based Fault Tolerant Mobile Systems Alexei Iliasov, Victor Khomenko, Maciej Koutny and Alexander Romanovsky.
Lecture 6: Software Design (Part I)
Processes Management.
Scalable and Dynamic Quorum Systems Moni Naor & Udi Wieder The Weizmann Institute of Science.
Executional Architecture
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 14: Simulations 1.
Chapter 5 Test Review Sections 5-1 through 5-4.
Checking  -Calculus Structural Congruence is Graph Isomorphism Complete Victor Khomenko 1 and Roland Meyer 2 1 School of Computing Science, Newcastle.
25 seconds left…...
Copyright © Cengage Learning. All rights reserved.
We will resume in: 25 Minutes.
Dantzig-Wolfe Decomposition
1/22 Worst and Best-Case Coverage in Sensor Networks Seapahn Meguerdichian, Farinaz Koushanfar, Miodrag Potkonjak, and Mani Srivastava IEEE TRANSACTIONS.
1 October 16 th, 2009 Meaning to motion: Transforming specifications to provably-correct control Hadas Kress-Gazit Cornell University George Pappas University.
1 Decidability continued…. 2 Theorem: For a recursively enumerable language it is undecidable to determine whether is finite Proof: We will reduce the.
Epp, section 10.? CS 202 Aaron Bloomfield
1 Programming Languages (CS 550) Mini Language Interpreter Jeremy R. Johnson.
Secret Sharing, Matroids, and Non-Shannon Information Inequalities.
© Imperial College LondonPage 1 Model checking and refinement checking for modal transition systems and their cousins MTS meeting 2007 Adam Antonik & Michael.
FRAIGs - A Unifying Representation for Logic Synthesis and Verification - Alan Mishchenko, Satrajit Chatterjee, Roland Jiang, Robert Brayton ERL Technical.
1 Lecture 16:User-Definded function I Introduction to Computer Science Spring 2006.
Lecture 24 MAS 714 Hartmut Klauck
Applying Petri Net Unfoldings for Verification of Mobile Systems Apostolos Niaouris Joint work with V. Khomenko, M. Koutny MOCA ‘06.
Timed Automata.
Diagnosability Verification with Parallel LTL-X Model Checking Based on Petri Net Unfoldings Agnes Madalinski 1, and Victor Khomenko 2 1 Faculty of Engineering.
Merged Processes of Petri nets Victor Khomenko Joint work with Alex Kondratyev, Maciej Koutny and Walter Vogler.
Branching Processes of High-Level Petri Nets Victor Khomenko and Maciej Koutny University of Newcastle upon Tyne.
1 Ivan Lanese Computer Science Department University of Bologna Italy Concurrent and located synchronizations in π-calculus.
Branching Processes of High-Level Petri Nets and Model Checking of Mobile Systems Maciej Koutny School of Computing Science Newcastle University with:
Merged processes – a new condensed representation of Petri net behaviour V.Khomenko 1, A.Kondratyev 2, M.Koutny 1 and W.Vogler 3 1 University of Newcastle.
1 Qualitative Reasoning of Distributed Object Design Nima Kaveh & Wolfgang Emmerich Software Systems Engineering Dept. Computer Science University College.
Support for Program Analysis as a First-Class Design Constraint in Legion Michael Bauer 02/22/17.
Internet of Things A Process Calculus Approach
Predictability Verification with Petri Net Unfoldings
Presentation transcript:

A Polynomial Translation of  -Calculus (FCP) to Safe Petri Nets Roland Meyer 1, Victor Khomenko 2, and Reiner Hüchting 1 1 Department of Computing Science, University of Kaiserslautern, Germany 2 School of Computing Science, Newcastle University, UK

2  -Calculus A formalism (process algebra) for modelling mobile and reconfigurable systems Processes communicate by message passing: channels are sent via channels  passing an IP address or hyperlink  passing a pointer/reference to a procedure New fresh channels can be dynamically created (Logical) interconnect topology changes over time

3  -Calculus: example P1P1 P2P2 P3P3 … Scheduler Task generators TG 1 TG 2 TG k … Array of processors

4  -Calculus Syntax P ::= 0  | K ⌊ a 1,…,a n ⌋  | P + P  | P | P  | .P  | a:P  ::= a  | a(x)  |  No replication operator ‘!’ – using recursive definitions of the form K ⌊ a 1,…,a n ⌋ :=P instead Input prefix a(x).P and restriction x:P bind name x in P NOCLASH assumption (can always be enforced by  - conversion): each name is bound at most once the sets of bound and free names are disjoint stop callchoiceParallel composition prefix restriction

5 Finite Control Processes  -Calculus is expressive (Turing-powerful), so nothing is decidable Wanted: a (syntactic) fragment that is decidable but retains a reasonable degree of expressiveness sufficient for modelling practical mobile and reconfigurable systems Finite Control Processes (FCP): parallel composition of a fixed number of sequential (i.e. not using the | operator) processes (threads) Good compromise between expressiveness and verifiability

6 Motivation for FCP  PN translation FCPs have complicated semantics, and thus difficult for model checking:  checking if two terms are structurally congruent is graph isomorphism complete  difficult to use condensed representations of the state space  difficult to use reductions when exploring the state space In contrast, safe low-level PNs are well suited for model checking, with many efficient heuristics available

7 Our contribution Safe low-level PNs: Efficient verification Not convenient for reconfigurability FCPs: Convenient for modelling reconfigurability Verification is hard Gap

8 Complexity-theoretic considerations Any reachable state of an FCP can be represented by a term bounded by the FCP’s size Hence an FCP can be simulated by a Turing machine with linear in the FCP’s size tape (characterises PSPACE) A Turing machine with a bounded tape can be simulated by a safe low-level PN of polynomial size Hence a polynomial translation from FCPs to safe low- level PNs must exist This argument is constructive, but the resulting PN would be big and ugly Wanted: A natural polynomial FCP  PN translation, suitable for practical verification

9 Related work Much work concerning  -Calculus  PN translations has been performed Mostly theoretical, often concerning the full  - Calculus and so results in infinite PNs or undecidable PN classes (inhibitor arcs, coloured with infinite sets of colours, etc.) Existing FCP  PN translations (or restrictions of  - Calculus  PN translations to FCPs) are non- polynomial and/or have an unnecessarily powerful target formalism (coloured / inhibitor / transfer PNs) Our contribution: natural polynomial FCP  safe low-level PN translation suitable for practical verification

10 Principles of translation Replace restricted names by fresh public ones, e.g. x. y.P and P[ab/xy] (a & b are fresh) are bisimilar Recycle the fresh names to avoid generating unbounded number of them:  static bound on the number of names an FCP can ‘remember’  if P reacts with x.Q and a is a currently unused (recycled) public name then P reacts with Q[a/x]  PN keeps track of the currently used names Distributed representation of the substitution:  P[ab/xy]=P[a/x][b/y], so [a/x] and [b/y] are treated as independent variables and represented by separate PN places

11 Translation N subs  H(N 1 || … || N n ) Substitution net Implementation operator Hiding operator State machines implementing threads Parallel composition operator

12 Translation: Pre-processing Ensure that each thread of the FCP has its own set of process definitions: K(u,v):= .L(u,v)K(u,v):= .L(u,v) L(x,y):= .K(x,y)L(x,y):= .K(x,y) K’(u’,v’):= .L’(u’,v’) L’(x’,y’):= .K’(x’,y’) K ⌊ a,b ⌋ | K ⌊ b,c ⌋ K ⌊ a,b ⌋ | K’ ⌊ b,c ⌋ At most quadratic increase in size – can be recovered by using symmetries in model checking

13 Translation: Substitution net p1p1 p2p2  p np n1n1 n2n2  n nn i1i1           i ni        f1f1        f nf      r1r1 Restricted names are never mapped to public ones, so no places here      r nr       Input names Formal parameters Restricted names Public names Recyclable names Operations: test(x=y) map(x,y) unmap(x,y) The operations do not interfere when applied to different names Complimentary places allow to determine which names are currently unused

14 Translation: Control of threads Model the control of each thread by a finite state machine; its transitions carry two labels:  communication action send(a,b), rec(a,b) or   set of commands working with the substitution: test(x=y), map(x,y), unmap(x,y) Additional transitions are inserted to initialise restricted names, pass parameters, and to unmap bound names when they go out of scope

15 Control of threads: Examples SS send(p 1,p 1 ) send(p 1,p 2 ) send(n nn,n nn ) {test(x=p 1 ), test(y=p 1 )} … … … {test(x=p 1 ), test(y=p 2 )} {test(x=n nn ), test(y=n nn )} SS rec(p 1,p 1 ) rec(p 1,p 2 ) rec(n nn,n nn ) {test(x=p 1 ), map(y,p 1 )} … … … {test(x=p 1 ), map(y,p 2 )} {test(x=n nn ), map(y,n nn )}  x.S+…  x(y).S+… SendReceive  r.P PP    {map(r,n 1 )} {map(r,n 2 )} {map(r,n nn )} … … … Restriction

16 Translation: Parallel composition Synchronise the send actions with the corresponding rec actions, with the resulting label  and the sets of commands united  the original transitions are not removed and available for further synchronisations PP send(a,b) … … {test(u=a), test(v=b)}  u.P+… SS rec(a,b) … … {test(x=a), map(y,b)}  x(y).S+…  {test(u=a), test(v=b), test(x=a), map(y,b)} PP send(a,b) … … {test(u=a), test(v=b)}  u.P+… SS rec(a,b) … … {test(x=a), map(y,b)}  x(y).S+… ||

17 Translation: Hiding Remove the non-  transitions after all the parallel compositions are performed All the remaining transitions are  –labelled, so can drop this label – only a set of commands is attached to each transition now PP send(a,b) … … {test(u=a), test(v=b)}  u.P+… SS rec(a,b) … … {test(x=a), map(y,b)}  x(y).S+…  {test(u=a), test(v=b), test(x=a), map(y,b)}

18 Translation: Implementation operator Implements the commands attached to each transition by adding arcs between this transition and the places in the substitution net: test(x=a) … … x=a map(x,a) … … x=a xaxa unmap(x,a) … … x=a xaxa map(r,n) … … r=n r*nr*n i1ni1ni ni  n … f1nf1n f nf  n … [r *  n]

19 Implementation operator: Examples Example: communication and restriction: PP … …  u.P+… SS … …  x(y).S+… {test(u=a), test(v=b), test(x=a), map(y,b)} PP … …  r.P {map(r,n)} u=a v=b x=a y=b ybyb i1ni1ni ni  n r=n r*nr*n … f1nf1n f nf  n …

20 Correctness and size of the translation Weak bisimulation between FCP and PN Strong bisimulation between FCP and the ‘stable’ transition system of PN The size of the resulting PN is O(|FCP| 4 )  dominated by the number of transitions modelling communication  reduced down to O(|FCP| 3 ) on the next slide  the PN is significantly smaller in practice than the worst case suggests

21 Optimisations Split the transitions modelling communication:  model communication between a and x(y) not by a single step but by a pair of steps: the first checks that a=x, and the second maps y to b  reduces the size of the resulting PN from O(|FCP| 4 ) down to O(|FCP| 3 ) Bound names that are never simultaneously active can share the same row of places in the substitution net Can statically compute good approximations of the domains of bound names Can share subnets for unmapping bound names that go out of scope Can use symmetries reduction during model checking Etc. – see the paper and technical report

22 Extensions Polyadic communication: exchanges multiple names in a single reaction, i.e. prefixes a and b(y 1,…,y n ) can react iff a=b, and after synchronisation each y i gets the value of x i  can be achieved by generalising the ‘communication splitting’ idea Match and mismatch: modelled by transitions testing the [non-]equality of two names in the substitution  reachable states corresponding to the ‘stuck between the guards’ situation have to be declared invalid (they can easily be distinguished from the valid ones, so still OK for model checking)

23 Experimental results Translation has been implemented in the fcp2pn tool: The practicality of the approach was demonstrated as follows:  a number of FCPs, including scalable ones, were translated to safe PNs using fcp2pn  the PNs grow much slower with |FCP| than the worst-case bound suggests  optimisations work very well  the PNs were checked for deadlocks using LOLA, with good results

24 Conclusions First polynomial translation from FCPs to safe low- level PNs The translation is natural, i.e. there is a close correspondence between the control flows of the FCP and the resulting PN The resulting PN is suitable for practical model checking Proposed a number of optimisations Extensions to polyadic communication and match/mismatch Implemented in the fcp2pn tool Encouraging experimental results

25 Thank you! Any questions?