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.

Slides:



Advertisements
Similar presentations
Exploiting SAT solvers in unbounded model checking
Advertisements

Model Checking Lecture 2. Three important decisions when choosing system properties: 1automata vs. logic 2branching vs. linear time 3safety vs. liveness.
Modeling Software Systems Lecture 2 Book: Chapter 4.
Lexical Analysis Dragon Book: chapter 3.
Model Checking and Testing combined
Black Box Checking Book: Chapter 9 Model Checking Finite state description of a system B. LTL formula. Translate into an automaton P. Check whether L(B)
Automatic Verification Book: Chapter 6. How can we check the model? The model is a graph. The specification should refer the the graph representation.
Modeling issues Book: chapters 4.12, 5.4, 8.4, 10.1.
CommUnity, Tiles and Connectors joint work with Roberto Bruni José Luiz Fiadeiro Antónia Lopes Ugo Montanari Ivan Lanese Dipartimento di Informatica Università.
Outline Introduction Assumptions and notations
Reinforcement Learning
Type Inference David Walker COS 320. Criticisms of Typed Languages Types overly constrain functions & data polymorphism makes typed constructs useful.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 14: Simulations 1.
UML Statechart semantics Speaker: Fei Mo Tutor: Priv.-Doz. Dr. Thomas Noll Lehrstuhl für Informatik 2 RWTH Aachen SS 07.
Delta-Oriented Testing for Finite State Machines
Theory of Computation CS3102 – Spring 2014 A tale of computers, math, problem solving, life, love and tragic death Nathan Brunelle Department of Computer.
Process Algebra (2IF45) Abstraction in Process Algebra Suzana Andova.
Formal Semantics of Programming Languages 虞慧群 Topic 6: Advanced Issues.
Event structures Mauro Piccolo. Interleaving Models Trace Languages:  computation described through a non-deterministic choice between all sequential.
Programming Paradigms for Concurrency Lecture 11 Part III – Message Passing Concurrency TexPoint fonts used in EMF. Read the TexPoint manual before you.
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) Probabilistic extension: semantics Parallel composition Dr. Suzana Andova.
A logic for true concurrency Paolo Baldan and Silvia Crafa Universita’ di Padova.
Course on Probabilistic Methods in Concurrency (Concurrent Languages for Probabilistic Asynchronous Communication) Lecture 1 The pi-calculus and the asynchronous.
An Introduction to Markov Decision Processes Sarah Hickmott
Chapter 4 Normal Forms for CFGs Chomsky Normal Form n Defn A CFG G = (V, , P, S) is in chomsky normal form if each rule in G has one of.
A Semantic Characterization of Unbounded-Nondeterministic Abstract State Machines Andreas Glausch and Wolfgang Reisig 1.
An Introduction to Input/Output Automata Qihua Wang.
Programming Language Semantics Mooly SagivEran Yahav Schrirber 317Open space html://
1 Ivan Lanese Computer Science Department University of Bologna Roberto Bruni Computer Science Department University of Pisa A mobile calculus with parametric.
EECS 20 Lecture 16 (February 26, 2001) Tom Henzinger Determinization.
Semantics of LOTOS Answering the question: Which processes are equivalent? Basic LOTOS: ignore ! and ?...pure synchronization Dining philosophers example:
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.
C LAUS B RABRAND C ONCURRENCY (Q3,’06) M AR 13, 2006 C LAUS B RABRAND © 2005, University of Aarhus [ ] [
Bridging the gap between Interaction- and Process-Oriented Choreographies Talk by Ivan Lanese Joint work with Claudio Guidi, Fabrizio.
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.
ESE601: Hybrid Systems Introduction to verification Spring 2006.
Operational Semantics Semantics with Applications Chapter 2 H. Nielson and F. Nielson
EECS 20 Chapter 3 Sections State Machines Continued Last time we Introduced the deterministic finite state machine Discussed the concept of state.
Verification of Information Flow Properties in Cyber-Physical Systems Ravi Akella, Bruce McMillin Department of Computer Science Missouri University of.
Benjamin Gamble. What is Time?  Can mean many different things to a computer Dynamic Equation Variable System State 2.
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
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.
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.
Rewriting Logic Model of Compositional Abstraction of Aspect-Oriented Software FOAL '10Mar. 15, 2010 Yasuyuki Tahara, Akihiko Ohsuga The University of.
Recursive Algorithms &
11/19/20151 Metodi formali nello sviluppo software a.a.2013/2014 Prof.Anna Labella.
MPRI 3 Dec 2007Catuscia Palamidessi 1 Why Probability and Nondeterminism? Concurrency Theory Nondeterminism –Scheduling within parallel composition –Unknown.
CS 5204 Spring 99 1 A Simple Agent A CCS agent is described both by a structural diagram and one or more algebraic equations. The diagram is for readability.
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.
2G1516/2G1521 Formal Methods2004 Mads Dam IMIT, KTH 1 CCS: Processes and Equivalences Mads Dam Reading: Peled 8.1, 8.2, 8.5.
Process Algebra (2IF45) Abstraction Parallel composition (short intro) Suzana Andova.
Formal Semantics of Programming Languages 虞慧群 Topic 2: Operational Semantics.
Operational Semantics Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
Process Algebra (2IF45) Basic Process Algebra Dr. Suzana Andova.
Interacting Discrete Event Systems: Modelling, Verification, and Supervisory Control Sherif S. Abdelwahed February 4, 2002.
lec02-parserCFG May 8, 2018 Syntax Analyzer
Prof. Dr. Holger Schlingloff 1,2 Dr. Esteban Pavese 1
CPE555A: Real-Time Embedded Systems
Modeling Arithmetic, Computation, and Languages
Chapter 7 PUSHDOWN AUTOMATA.
Modeling Mutual Exclusion Algorithms
Formal Methods in software development
Presentation transcript:

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 models have different executions?

What is process algebra? An abstract description for nondeterministic and concurrent systems. Focuses on the transitions observed rather than on the states reached. Main correctness criterion: conformance between two models. Uses: system refinement, model checking, testing.

Different models may have the same set of executions! a aa b bc c a-insert coin, b-press pepsi, c-press pepsi-light d-obtain pepsi, e-obtain pepsi-light d d ee

Actions: Act={a,b,c,d} { }. Agents: E, E, F, F1, F2, G1, G2, … E E G2G1 F1F2 F a aa b bc c Agent E may evolve into agent E. Agent F may evolve into F 1 or F2. d d ee

Events. E E G2G1 F1F2 F a aa b bc c Ea E, Fa F1, Fa F2, F1a G1, F2a G2. G1 F, G1 F.

Actions and co-actions For each action a, except for, there is a co- action a. a and a interact (a input, a output). The coaction of a is a. G2G1 F1F2 F aa bc E E a bc

Notation a.E – execute a, then continue according to E. E+F – execute according to E or to F. E||F – execute E and F in parallel. E GH F a bc a.(b+c) (actually, a.((b.0)+(c.0)) Ea F Fb G Fc H 0 – deadlock/termination.

Conventions. has higher priority than +..0 or.(0||0||…||0) is omitted.

CCS - calculus of concurrent systems [Milner]. Syntax a,b,c, … actions, A, B, C - agents. a,b,c, coactions of a,b,c. -silent action. nil - terminate. a.E - execute a, then behave like E. + - nondeterministic choice. || - parallel composition. \L - restriction: cannot use letters of L. [f] - apply mapping function f between between letters.

Semantics (proof rule and axioms). Structural Operational Semantics SOS a.p –a p pa p |-- p+q –a p qa q |-- p+q –a q pa p |-- p|q –a p|q qa q |-- p|q –a p|q pa p, qa q |-- p|q – p|q pa p, a R |-- p\L –a p\R pa p |-- p[m]m(a) p[m]

Action Prefixing a.Ea E (Axiom) Thus, a.(b.(c||c)+d)a (b.(c||c)+d).

Choice Ea E Fa F (E+F)a E (E+F)a F b.(c||c)b (c||c). Thus, (b.(c||c)+e)b (c||c). If Ea E and Fa F, then E+F has a nondeterministic choice.

Concurrent Composition Ea E Fa F E||Fa E||F Ea E, Fa F E||F E||F cc 0, cc 0, c||c 0||0, c||cc 0||c, c||cc c||0.

Restriction Ea E, a, a R E\R –a E\R In this case: allows only internal interaction of c. c||c 0||0 c||cc 0||c c||cc c||0 (c||c) \ {c} (0||0) \{c}

Relabeling Ea E E[m] –m(a) E[m] No axioms/rules for agent 0.

Examples a.E||b.F a.E||F E||b.F E||F b b a a

Derivations (0||0) a.(b.(c||c)+d) b.(c||c)+d (c||c)0 (0||c)(c||0) a b d c c c c

Modeling binary variable C0=is_0?. C0 + set_1. C1 + set_0. C0 C1=is_1?. C1 + set_0. C0 + set_1. C1 C0C1 set_1 set_0 is_0? set_1 is_1?

Equational Definition E=a.(b..E+c..E) Ea E, A=E F=a.b..F+a.c..F Aa E G2G1 F1F2 F aa bc E E a bc

Trace equivalence: Systems have same finite sequences. Same traces F aa bb E a b c c E=a.(b+c)F=(a.b)+a.(b+c)

Failures: comparing also what we cannot do after a finite sequence. F a a bb E a b c c Failure of agent E: (σ, X), where after executing σ from E, none of the events in X is enabled. Agent F has failure (a, {c}), which is not a failure of E.

Simulation equivalence Relation over set of agents S. R S S. E R F If E R F and Ea E, then there exists F, Fa F, and E R F. E cd bb a a F c d bb a

Simulation equivalence Relation over set of agents S. R S S. E R F If E R F and Ea E, then there exists F, Fa F, and E R F. E cd bb aa F cd bb a

Here, simulation works only in one direction. No equivalence! Relation over set of agents S. R S S. E R F If E R F and Ea E, then there exists F, Fa F, and E R F. E cd bb aa F cd bb a want to establish symmetrically necessarily problem!!!

Simulation equivalent but not failure equivalent Left agent a.b+a has a failure (a,{b}). E b aa F b a

Bisimulation: same relation simulates in both directions Not in this case: different simulation relations. E b aa F b a

Hierarchy of equivalences Bisimulation Trace FailureSimulation

Example: A=a.((b.nil)+(c.d.A)) B=(a.(b.nil))+(a.c.d.B) a b c d s0s0 s1s1 s2s2 s3s3 a d b a c t0t0 t1t1 t4t4 t2t2 t3t3

Bisimulation between G 1 and G 2 Let N= N 1 U N 2 A relation R : N 1 x N 2 is a bisumulation if If (m,n) in R then 1. If ma m then n:na n and (m,n) in R 2. If na n then m:ma m and (m,n) in R. Other simulation relations are possible, I.e., m=a=> m when m …a m.

Algorithm for bisimulation: Partition N into blocks B 1 B 2 … B n =N. Initially: one block, containing all of N. Repeat until no change: Choose a block B i and a letter a. If some of the transitions of B i move to some block B j and some not, partition B i accordingly. At the end: Structures bisimilar if initial states of two structures are in same blocks.

Correctness of algorithm Invariant: if (m,n) in R then m and n remain in the same block throughout the algorithm. Termination: can split only a finite number of times.

Example: a b c d s0s0 s1s1 s2s2 s3s3 a d b a c t0t0 t1t1 t4t4 t2t2 t3t3 {s 0,s 1,s 2,s 3,t 0,t 1,t 2,t 3,t 4 }

Example: a b c d s0s0 s1s1 s2s2 s3s3 a d b a c t0t0 t1t1 t4t4 t2t2 t3t3 {s 0,s 1,s 2,s 3,t 0,t 1,t 2,t 3,t 4 } split on a. {s 0,t 0 },{s 1,s 2,s 3,t 1,t 2,t 3,t 4 }

Example: a b c d s0s0 s1s1 s2s2 s3s3 a d b a c t0t0 t1t1 t4t4 t2t2 t3t3 {s 0,t 0 },{s 1,s 2,s 3,t 1,t 2,t 3,t 4 } split on b {s 0,t 0 },{s 1,t 1 },{s 0,s 2,s 3,t 2,t 3,t 4 }

Example: a b c d s0s0 s1s1 s2s2 s3s3 a d b a c t0t0 t1t1 t4t4 t2t2 t3t3 {s 0,t 0 },{s 1,t 1 },{s 2,s 3,t 2,t 3,t 4 } split on c {s 0,t 0 },{s 1 },{t 1 },{s 2,s 3,t 2,t 3,t 4 }

Example: {s 0,t 0 },{s 1 },{t 1 },{s 2,s 3,t 2,t 3,t 4 } split on c {s 0,t 0 },{s 1 },{t 1 },{t 4 },{s 2,s 3,t 2,t 3 } a b c d s0s0 s1s1 s2s2 s3s3 a d b a c t0t0 t1t1 t4t4 t2t2 t3t3

Example: {s 0,t 0 },{s 1 },{t 1 },{t 4 },{s 2,s 3,t 2,t 3 } split on d {s 0,t 0 },{s 1 },{t 1 },{t 4 },{s 3, t 3 },{s 2,t 2 } a b c d s0s0 s1s1 s2s2 s3s3 a d b a c t0t0 t1t1 t4t4 t2t2 t3t3

Example: {s 0,t 0 },{s 1 },{t 1 },{t 4 },{s 2,t 2 },{s 3,t 3 } split on a {s 0 },{t 0 },{s 1 },{t 1 },{t 4 },{s 3, t 3 },{s 2,t 2 } a b c d s0s0 s1s1 s2s2 s3s3 a d b a c t0t0 t1t1 t4t4 t2t2 t3t3

Example: {s 0 },{t 0 },{s 1 },{t 1 },{t 4 },{s 2,s 3,t 2,t 3 } split on d {s 0 },{t 0 },{s 1 },{t 1 },{t 4 },{s 3 },{t 3 },{s 2,t 2 } a b c d s0s0 s1s1 s2s2 s3s3 a d b a c t0t0 t1t1 t4t4 t2t2 t3t3