Process Algebra (2IF45) Abstraction Parallel composition (short intro) Suzana Andova.

Slides:



Advertisements
Similar presentations
Process Algebra Book: Chapter 8. The Main Issue Q: When are two models equivalent? A: When they satisfy different properties. Q: Does this mean that the.
Advertisements

CommUnity, Tiles and Connectors joint work with Roberto Bruni José Luiz Fiadeiro Antónia Lopes Ugo Montanari Ivan Lanese Dipartimento di Informatica Università.
Translation-Based Compositional Reasoning for Software Systems Fei Xie and James C. Browne Robert P. Kurshan Cadence Design Systems.
Process Algebra (2IF45) Some Extensions of Basic Process Algebra Dr. Suzana Andova.
Process Algebra (2IF45) Recursion in Process Algebra Suzana Andova
Process Algebra (2IF45) Abstraction in Process Algebra Suzana Andova.
1 CS216 Advanced Database Systems Shivnath Babu Notes 11: Concurrency Control.
Deterministic Negotiations: Concurrency for Free Javier Esparza Technische Universität München Joint work with Jörg Desel and Philipp Hoffmann.
Process Algebra (2IF45) Abstraction and Recursions in Process Algebra Suzana Andova.
Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.
Process Algebra (2IF45) Probabilistic Process Algebra Suzana Andova.
Behavioral Equivalence Hossein Hojjat Formal Lab University of Tehran.
Process Algebra (2IF45) Dr. Suzana Andova. 1 Process Algebra (2IF45) Practical issues Lecturer - Suzana Andova - Group: Software Engineering and Technology.
Process Algebra (2IF45) Probabilistic extension: semantics Parallel composition Dr. Suzana Andova.
1 Towards formal manipulations of scenarios represented by High-level Message Sequence Charts Loïc Hélouet Claude Jard Benoît Caillaud IRISA/PAMPA (INRIA/CNRS/Univ.
CLF: A Concurrent Logical Framework David Walker Princeton (with I. Cervesato, F. Pfenning, K. Watkins)
Equivalence of open Petri nets Modeling and analysis with Petri net components. Marc Voorhoeve (AIS)
The P-Calculus Supratik Mukhopadhyay PEMWS-2 April 6 th 2011.
8 May 2008IPA Lentedagen Dynamic Consistency in Process Algebra: From Paradigm to ACP Suzana Andova (FM TU/e) Luuk Groenewegen (LIACS Leiden Univ.) Erik.
1 Synchronization strategies for global computing models Ivan Lanese Computer Science Department University of Bologna.
Lecture 2 Dr Richard Reilly Dept. of Electronic & Electrical Engineering Room 153, Engineering Building To insert your company logo on this slide From.
1 Ivan Lanese Computer Science Department University of Bologna Roberto Bruni Computer Science Department University of Pisa A mobile calculus with parametric.
Semantics of LOTOS Answering the question: Which processes are equivalent? Basic LOTOS: ignore ! and ?...pure synchronization Dining philosophers example:
Modeling Software Systems Lecture 2 Book: Chapter 4.
1 Formal Models for Distributed Negotiations Concurrent Languages Translation Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela.
Bridging the gap between Interaction- and Process-Oriented Choreographies Talk by Ivan Lanese Joint work with Claudio Guidi, Fabrizio Montesi and Gianluigi.
Programming Language Semantics Mooly SagivEran Yahav Schrirber 317Open space html://
1 IFM 2005 – November 30, 2005 EXP.OPEN 2.0 A flexible tool integrating partial order, compositional, and on-the-fly verification methods Frédéric Lang.
Bridging the gap between Interaction- and Process-Oriented Choreographies Talk by Ivan Lanese Joint work with Claudio Guidi, Fabrizio.
Bridging the gap between Interaction- and Process-Oriented Choreographies Talk by Ivan Lanese Joint work with Claudio Guidi, Fabrizio Montesi and Gianluigi.
1 Ivan Lanese Computer Science Department University of Bologna Italy Concurrent and located synchronizations in π-calculus.
Semantics with Applications Mooly Sagiv Schrirber html:// Textbooks:Winskel The.
An algebra of Connectors for modeling CommUnity with Tiles joint work with Roberto Bruni Ugo Montanari Dipartimento di Informatica Università di Pisa Ivan.
Lecture - 7 Circuit Theorems
Process Algebra (2IF45) Basic Process Algebra (Soundness proof) Dr. Suzana Andova.
Formal Methods 1. Software Engineering and Formal Methods  Every software engineering methodology is based on a recommended development process  proceeding.
Math 3121 Abstract Algebra I Lecture 3 Sections 2-4: Binary Operations, Definition of Group.
Linear and Branching Time Safety, Liveness, and Fairness
Requirements Expression and Modelling
Process Algebra (2IF45) Probabilistic Branching Bisimulation: Exercises Dr. Suzana Andova.
Benjamin Gamble. What is Time?  Can mean many different things to a computer Dynamic Equation Variable System State 2.
SDS Foil no 1 Process Algebra Process Algebra – calculating with behaviours.
Advanced Topics in SE Spring Process Algebra Hossein Hojjat Formal Methods Lab University of Tehran.
CS6133 Software Specification and Verification
Reactive systems – general
2G1516 Formal Methods2005 Mads Dam IMIT, KTH 1 CCS: Operational Semantics And Process Algebra Mads Dam Reading: Peled 8.3, 8.4, 8.6 – rest of ch. 8.
1 Bisimulations as a Technique for State Space Reductions.
Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/ Input-output conformance testing for channel-based connectors 1.
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
1 Copyright  2001 Pao-Ann Hsiung SW HW Module Outline l Introduction l Unified HW/SW Representations l HW/SW Partitioning Techniques l Integrated HW/SW.
Lecture 5 1 CSP tools for verification of Sec Prot Overview of the lecture The Casper interface Refinement checking and FDR Model checking Theorem proving.
2G1516 Formal Methods2005 Mads Dam IMIT, KTH 1 CCS: Processes and Equivalences Mads Dam Reading: Peled 8.5.
Transparent First-class Futures and Distributed Components Introduction: components, futures, and challenges Statically Representing Futures An Example.
Process Algebra (2IF45) Basic Process Algebra (Completeness proof) Dr. Suzana Andova.
UW CSE 503 ▪ Software Engineering ▪ Spring 2004 ▪ Rob DeLine1 CSE 503 – Software Engineering Lecture 3: An introduction to Alloy Rob DeLine 5 Apr 2004.
Properties as Processes : FORTE slide Properties as Processes: their Specification and Verification Joel Kelso and George Milne School of Computer.
Duminda WijesekeraSWSE 623: Introduction1 Introduction to Formal and Semi- formal Methods Based on A Specifier's Introduction to Formal Methods (J. Wing)
Software Systems Verification and Validation Laboratory Assignment 4 Model checking Assignment date: Lab 4 Delivery date: Lab 4, 5.
Presented by: Belgi Amir Seminar in Distributed Algorithms Designing correct concurrent algorithms Spring 2013.
Operational Semantics Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
Process Algebra (2IF45) Basic Process Algebra Dr. Suzana Andova.
Process Algebra (2IF45) Assignments Dr. Suzana Andova.
5/10/2002 How to describe Plan Recognition Plan Recognizer With Knowledge Observations Assumptions Plans explaining observations.
Process Algebra (2IF45) Extending Process Algebra: Abstraction
CS216: Data-Intensive Computing Systems
Process Algebra (2IF45) Expressiveness of BPArec
Evaluating expressions and Properties of operations
Department of Computer Science Abdul Wali Khan University Mardan
Presentation transcript:

Process Algebra (2IF45) Abstraction Parallel composition (short intro) Suzana Andova

1 Outline of the lecture Unclear points from last lecture Unclear points from Assignment 2 Main goal: Abstraction what is abstraction why it is needed how it is dealt with in equational theories Sub-goal: Parallel composition and communication (briefly explained, self-study the details also needed for Assignment 2) Evaluation form (15-20 min) Process Algebra (2IF45)

2 Specifying concurrency Systems are complex and consist of many components Components are active concurrently and interact with each other Modeling languages need to express this aspects BPA(A) and TSP(A) can specify only sequential behaviour New concepts are needed for parallel behaviour and for communication/synchronization/simultaneous executions Analysis tools shall to benefit from compositionality Process Algebra (2IF45)

3 Specifying concurrency the true concurrency approach Petri nets, event structures, …, read more if interested in, e.g.: “Petri Nets for algebraic theories of concurrency” – Rob van Glabbeek and Frits Vaandrager, 1987 the approach of interleaving semantics parallel behaviour is “sequentialized” - represented as a set of sequential behaviours equality like a || b = ab + ba this assumption simplifies the representation and reasoning so allows for elegant model of concurrent systems and their analysis Process Algebra (2IF45)

4 Interleaving semantics for Concurrency a || a b b a b

5 Interleaving semantics for Concurrency a || a b b a b a a b a b cd a d cc b c d b d

6 Interleaving semantics for Concurrency a || a b b a b a a b a b cd a d cc b c d b d e e f g h communication function on A  : A x A ↦ A pre-defined communication  (a, b) = e  (a, d) = f  (c, b) = g  (c, d) = h pre-defined communication  (a, b) = e

7 Interleaving semantics for Concurrency a || b a b cd e h communication function on A  : A x A ↦ A pre-defined communication  (a, b) = e  (a, d) = f  (c, b) = g  (c, d) = h pre-defined communication  (a, b) = e enforced communication: a or b cannot occur if not synchronized e enforced communication: a, b, c or d cannot occur if not synchronized

8 Interleaving semantics for Concurrency c || a db pre-defined communication  (a, b) = e  (a, d) = f  (c, b) = g  (c, d) = h

9 Process Algebra (2IF45) TCP = TSP with parallel composition Deduction rules for parallel composition x  x’ x || y  x’ || y a a x  y  x || y  y  y’ x || y  x || y’ a a x  y  x | y  x  x’ y  y’,  (a,b) = c x || y  x’ || y’ a c b x  x’ y  y’,  (a,b) = c x | y  x’ || y’ a c b x  x’ x ╙ y  x’ || y a a Language: TCP(A,  ) Signature: 0, 1, (a._ ) a  A, +,, ||, |, ╙,  H, Language terms T(TCP(A,  )) Closed terms C(TCP(A,  )) …

10 Language: TCP(A,  ) Signature: 0, 1, (a._ ) a  A, +,, ||, |, ╙,  H, Language terms T(TCP(A,  )) Closed terms C(TCP(A,  )) Process Algebra (2IF45) TCP = TSP with parallel composition x || y = x ╙ y + y ╙ x + x | y x || 1 = x 0 ╙ x = 0 1 ╙ x = 0 x ╙ 0 = x 0 a.x ╙ y = a.(x || y) (x + y) ╙ z = x ╙ z + y ╙ z (x ╙ y) ╙ z = x ╙ (y || z)

11 Language: TCP(A,  ) Signature: 0, 1, (a._ ) a  A, +,, ||, |, ╙,  H, Language terms T(TCP(A,  )) Closed terms C(TCP(A,  )) Process Algebra (2IF45) TCP = TSP with parallel composition a.x | b.y = c.(x || y) if  (a,b) = c a.x | b.y = 0 if  (a,b) not defined 0 | x = 0 … (not complete set of axioms, see the book) x || y = x ╙ y + y ╙ x + x | y x || 1 = x 0 ╙ x = 0 1 ╙ x = 0 x ╙ 0 = x 0 a.x ╙ y = a.(x || y) (x + y) ╙ z = x ╙ z + y ╙ z (x ╙ y) ╙ z = x ╙ (y || z) but NOT: x ╙ (y+z) = x ╙ y + x ╙ z

12 Process Algebra (2IF45) TCP = TSP with parallel composition Deduction rules for parallel composition x  x’ x || y  x’ || y a a x  y  x || y  y  y’ x || y  x || y’ a a x  y  x | y  x  x’ y  y’,  (a,b) = c x || y  x’ || y’ a c b x  x’ y  y’,  (a,b) = c x | y  x’ || y’ a c b x  x’ x ╙ y  x’ || y a a Language: TCP(A,  ) Signature: 0, 1, (a._ ) a  A, +,, ||, |, ╙,  H, Language terms T(TCP(A,  )) Closed terms C(TCP(A,  )) …

13 Abstraction Systems are very complex, but we still want/try to understand them Abstraction means “ignoring (properly) some irrelevant details” “details” are system activities (actions) “irrelevant” with respect to some system or sub-system behaviour we want to inspect Goal is to ignore / hide some system activities so that the relevant behaviour does not change “Does not change” ? Process Algebra (2IF45)

14 Abstraction Abstraction is used to check the correctness of implementation against the system specification reduce and simplify the model to enable better, fasted and cleaner model analysis Process Algebra (2IF45)

15 Abstraction for implementation Abstraction is used to check the correctness of implementation against the system specification Example: synchronous communication implemented with asynchronous communication Process Algebra (2IF45) SenderReceiver m

16 Abstraction for implementation Example: synchronous communication implemented with asynchronous communication Process Algebra (2IF45) SenderReceiver m High level abstraction: synchronous communication Lower level abstraction: asynchronous reliable (lossless) communication Lowest level abstraction: asynchronous unreliable (lossy) communication abstraction refinement

17 Abstraction for implementation Example: synchronous communication implemented with asynchronous communication Process Algebra (2IF45) SenderReceiver m High level abstraction: synchronous communication Sender = send(m).1Receiver = receive(m).1  H (Sender || Receiver) = comm(m).1 send(m) || receive(m) comm(m) communication function  (send(m), receive(m)) = comm(m) Blocking actions: H = {send(m), receive(m)}

18 Abstraction for implementation Example: synchronous communication implemented with asynchronous communication Process Algebra (2IF45) SenderReceiver m Implementation: asynchronous communication Sender = send_toB(m).1Receiver = receive_fromB(m).1 Buff = receive_fromS(m).send_toR(m).1  G (Sender || Buff || Receiver ) = comm_SB(m).comm_BR(m).1 communication function  (send_toB(m), receive_fromS(m)) = comm_SB(m)  (send_toR(m), receive_fromB(m)) = comm_BR(m) Blocking actions: G = {send_toB(m), receive_fromS(m), send_toR(m), receive_fromB(m)} Buff m

19 Abstraction for implementation Example: synchronous communication implemented with asynchronous communication Process Algebra (2IF45) SenderReceiver m Implementation: asynchronous communication Buff m comm_SB(m) comm_BR(m)

20 Abstraction for implementation Example: synchronous communication implemented with asynchronous communication Process Algebra (2IF45) SenderReceiver m Implementation: asynchronous communication Buff m comm_SB(m) comm_BR(m) comm(m) SenderReceiver m Specification: synchronous communication How to equate these behaviours?

21 Abstraction for implementation Example: synchronous communication implemented with asynchronous communication Process Algebra (2IF45) SenderReceiver m Implementation: asynchronous communication Buff m comm_SB(m)  comm_BR(m) comm(m) SenderReceiver m Specification: synchronous communication How to equate these behaviours? 1. Hide actions if needed

22 Abstraction for implementation Example: synchronous communication implemented with asynchronous communication Process Algebra (2IF45) SenderReceiver m Implementation: asynchronous communication Buff m comm_SB(m)  comm_BR(m) comm(m) SenderReceiver m Specification: synchronous communication How to equate these behaviours? 1. Hide actions if needed 2. Rename actions if needed

23 Abstraction for implementation Example: synchronous communication implemented with asynchronous communication Process Algebra (2IF45) SenderReceiver m Implementation: asynchronous communication Buff m  comm(m) SenderReceiver m Specification: synchronous communication How to equate these behaviours? 1. Hide actions if needed 2. Rename actions if needed 3. Use relation that is “internal steps” sensitive

24 Abstraction for model reduction Abstraction is used to reduce and simplify the model to enable better, fasted and cleaner model analysis Process Algebra (2IF45) a c a d Check whether: “b not always occurs after a” b

25 Abstraction for model reduction Abstraction is used to reduce and simplify the model to enable better, fasted and cleaner model analysis Process Algebra (2IF45) Check whether: “b not always occurs after a” 1.Hide irrelevant actions, in this case c and d a c a d b a  a  b

26 Abstraction for model reduction Abstraction is used to reduce and simplify the model to enable better, fasted and cleaner model analysis Process Algebra (2IF45) Check whether: “b not always occurs after a” 1.Hide irrelevant actions, in this case c and d 2. Reduce the model so that the property is preserved a c a d b a  a  b

27 Abstraction for model reduction Abstraction is used to reduce and simplify the model to enable better, fasted and cleaner model analysis Process Algebra (2IF45) Check whether: “b not always occurs after a” 1.Hide irrelevant actions, in this case c and d 2. Reduce the model so that the property is preserved a c a d b a  a  b a a b a b or

28 Abstraction Abstraction is used to check the correctness of implementation against the system specification reduce and simplify the model to enable better, fasted and cleaner model analysis Process Algebra (2IF45) Question: How do we chose to relate behaviours with internal steps?

29 Abstraction Abstraction is used to check the correctness of implementation against the system specification reduce and simplify the model to enable better, fasted and cleaner model analysis Process Algebra (2IF45) Question: How do we chose to relate behaviours with internal steps? Branching bisimulation

30 Branching bisimilar processes t t’ a  s a s’ t’’ t  s  s’ t’’ t s  s’ t Branching Bisimulation relation: A binary relation R on the set of state S of an LTS is branching bisimulation relation iff the following transfer conditions hold: 1.for all states s, t, s’  S, whenever (s, t)  R and s → s’ for some a  A, then there are states t’, t’’  S such that t t’ and t’ → t’’ and (s, t’), (s’,t’’)  R; 2. vice versa, for all states s, t, s’  S, whenever (s, t)  R and t → t’ for some a  A, then there are states s’,s’’  S such that s s’ and s’ → s’’ and (s’, t), (s’’,t’)  R; 3. if (s, t)  R and s  then there is a state t’ such that t t’, t’  and (s, t’)  R 4. whenever (s, t)  R and t  then there is a state s’ such that s s’, s’  and (s’, t)  R Two LTSs s and t are branching bisimilar, s b t, iff there is a branching bisimulation relation R such that (s, t)  R  a a a a   

31 Is this the right equivalence? a  a a  a b b b branching bisimilar! branching bisimilar ? + +

32 Is this the right equivalence? a  a a  a b b b branching bisimilar! branching bisimilar ? + + What is the problem?

33 Rooted Branching bisimilar processes t’ q b  s’ b p r t’  s’  p q t  p t’ t s a a t s a a t s a a Branching Bisimulation relation between state (s, t)  R (as already defined) and the root condition: 1.if s → s’ for a  A, then there is a state t’  S such that t → t’ and (s’, t’)  R; 2.if t → t’ for a  A, then there is a state s’  S such that s → s’ and (s’, t’)  R; 3.s  if and only if t  Two LTSs s and t are rooted branching bisimilar, s rb t, iff there is a rooted branching bisimulation relation R such that (s, t)  R a a a a

34 Process Algebra (2IF45) Process theory with abstraction Language: TCP  (A,  ) Signature: 0, 1, (a._ ) a  A, , +,, ||, |, ╙,  H,  I Language terms T(TCP  (A,  )) Closed terms C(TCP  (A,  )) Branching Bisimilarity on LTSs Equality of terms Deduction rulesAxioms Completeness Soundness

35 Process Algebra (2IF45) Process theory with abstraction Deduction rules (as we have seen already) x  x’ x || y  x’ || y a a x  y  x || y  y  y’ x || y  x || y’ a a x  y  x | y  Language: TCP  (A,  ) Signature: 0, 1, (a._ ) a  A, , +,, ||, |, ╙,  H,  I Language terms T(TCP  (A,  )) Closed terms C(TCP  (A,  )) Deduction rules for  I Branching Bisimilarity on LTSs Equality of terms Completeness Soundness

36 Process Algebra (2IF45) Process theory with abstraction Deduction rules (as we have seen already) x  x’ x || y  x’ || y a a x  y  x || y  y  y’ x || y  x || y’ a a x  y  x | y  Language: TCP  (A,  ) Signature: 0, 1, (a._ ) a  A, , +,, ||, |, ╙,  H,  I Language terms T(TCP  (A,  )) Closed terms C(TCP  (A,  )) Deduction rules for  I Branching Bisimilarity on LTSs Equality of terms Completeness Soundness Axioms of TCP(A,  ) (as we have seen them already) Axioms for  I operator

37 Axiom for rooted branching bisimulation a  x y x + + … a x y + … rb Corresponding axiom

38 Axiom for rooted branching bisimulation a  x y x + + … a x y + … rb B axiom a.( .(x+y) + x) = a.(x+y) Corresponding axiom

39 Process Algebra (2IF45) Process theory with abstraction Deduction rules (as we have seen already) x  x’ x || y  x’ || y a a x  y  x || y  y  y’ x || y  x || y’ a a x  y  x | y  Language: TCP  (A,  ) Signature: 0, 1, (a._ ) a  A, , +,, ||, |, ╙,  H,  I Language terms T(TCP  (A,  )) Closed terms C(TCP  (A,  )) Deduction rules for  I Branching Bisimilarity on LTSs Equality of terms Completeness Soundness Axioms of TCP(A,  ) (as we have seen them already) Axioms for  I operator: Rooted Branching bisimulation axiom: a.( .(x+y) + x) = a.(x+y)