Process Algebra (2IF45) Expressiveness of BPArec

Slides:



Advertisements
Similar presentations
Process Algebra (2IF45) Some Extensions of Basic Process Algebra Dr. Suzana Andova.
Advertisements

Process Algebra (2IF45) Recursion in Process Algebra Suzana Andova
Process Algebra (2IF45) Abstraction in Process Algebra Suzana Andova.
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.
Process Algebra (2IF45) Probabilistic extension: semantics Parallel composition Dr. Suzana Andova.
CS21 Decidability and Tractability
A Semantic Characterization of Unbounded-Nondeterministic Abstract State Machines Andreas Glausch and Wolfgang Reisig 1.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture7: PushDown Automata (Part 1) Prof. Amos Israeli.
Courtesy Costas Busch - RPI1 A Universal Turing Machine.
Model Checking Lecture 5. Outline 1 Specifications: logic vs. automata, linear vs. branching, safety vs. liveness 2 Graph algorithms for model checking.
Sets Definition of a Set: NAME = {list of elements or description of elements} i.e. B = {1,2,3} or C = {x  Z + | -4 < x < 4} Axiom of Extension: A set.
Fall 2004COMP 3351 A Universal Turing Machine. Fall 2004COMP 3352 Turing Machines are “hardwired” they execute only one program A limitation of Turing.
Operational Semantics Semantics with Applications Chapter 2 H. Nielson and F. Nielson
Model Checking Lecture 5. Outline 1 Specifications: logic vs. automata, linear vs. branching, safety vs. liveness 2 Graph algorithms for model checking.
Cardinality of a Set “The number of elements in a set.” Let A be a set. a.If A =  (the empty set), then the cardinality of A is 0. b. If A has exactly.
Mathematical Operational Semantics and Finitary System Behaviour Stefan Milius, Marcello Bonsangue, Robert Myers, Jurriaan Rot.
Process Algebra (2IF45) Basic Process Algebra (Soundness proof) Dr. Suzana Andova.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 7 Mälardalen University 2010.
Sequences & Summations CS 1050 Rosen 3.2. Sequence A sequence is a discrete structure used to represent an ordered list. A sequence is a function from.
Process Algebra (2IF45) Probabilistic Branching Bisimulation: Exercises Dr. Suzana Andova.
MATH 224 – Discrete Mathematics
2.4 Sequences and Summations
Chapter 3 – Set Theory  .
Mathematical Operational Semantics and Finitary System Behaviour Stefan Milius, Marcello Bonsangue, Robert Myers, Jurriaan Rot.
Reactive systems – general
Many Sorted First-order Logic Student: Liuxing Kan Instructor: William Farmer Dept. of Computing and Software McMaster University, Hamilton, CA.
Mathematical Induction
A Universal Turing Machine
CS201: Data Structures and Discrete Mathematics I
COMPSCI 102 Introduction to Discrete Mathematics.
Discrete Mathematical Structures 4 th Edition Kolman, Busby, Ross © 2000 by Prentice-Hall, Inc. ISBN
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
Chapter 6 Properties of Regular Languages. 2 Regular Sets and Languages  Claim(1). The family of languages accepted by FSAs consists of precisely the.
Great Theoretical Ideas in Computer Science.
1 First order theories (Chapter 1, Sections 1.4 – 1.5) From the slides for the book “Decision procedures” by D.Kroening and O.Strichman.
Process Algebra (2IF45) Basic Process Algebra (Completeness proof) Dr. Suzana Andova.
CS 285- Discrete Mathematics
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 2.6 Infinite Sets.
Process Algebra (2IF45) Abstraction Parallel composition (short intro) Suzana Andova.
Operational Semantics Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
Process Algebra (2IF45) Basic Process Algebra Dr. Suzana Andova.
Section 2.5. Cardinality Definition: A set that is either finite or has the same cardinality as the set of positive integers (Z + ) is called countable.
Process Algebra (2IF45) Assignments Dr. Suzana Andova.
1 A Universal Turing Machine. 2 Turing Machines are “hardwired” they execute only one program A limitation of Turing Machines: Real Computers are re-programmable.
1/29/02CSE460 - MSU1 Nondeterminism-NFA Section 4.1 of Martin Textbook CSE460 – Computability & Formal Language Theory Comp. Science & Engineering Michigan.
6. Pushdown Automata CIS Automata and Formal Languages – Pei Wang.
Chapter 4 Introduction to Set Theory
Mathematical Formulation of the Superposition Principle
CSE 105 theory of computation
A Universal Turing Machine
The Language of Sets If S is a set, then
Formal Methods in software development
Standard Representations of Regular Languages
Process Algebra (2IF45) Extending Process Algebra: Abstraction
Deterministic FA/ PDA Sequential Machine Theory Prof. K. J. Hintz
2.4 Sequences and Summations
Cardinality of Sets Section 2.5.
Lecture 7 Functions.
Decidable Languages Costas Busch - LSU.
Context-Free Languages
Elementary Questions about Regular Languages
Formal Languages, Automata and Models of Computation
Section 2.6 Infinite Sets.
OBJ first-order functional language based on equational logic
Cardinality Definition: The cardinality of a set A is equal to the cardinality of a set B, denoted |A| = |B|, if and only if there is a one-to-one correspondence.
Presentation transcript:

Process Algebra (2IF45) Expressiveness of BPArec Suzana Andova

Outline How far can we go with recursive specifications in BPArec(A)? How expressive is BPArec(A)? If it is not expressive as we want can we do better? How? Process Algebra (2IF45)

Recursive specs vs. Transition systems Every recursive specification in BPArec(A) has a solution that can be represented as an LTS For this purpose we use the SOS rules Sometimes we understand the process behaviour better from its LTS representation

Recursive specs vs. Transition systems But sometimes a process LTS has infinitely many states or infinitely many transitions a(i) i<10, b i10, c Symbolic (graphical) representation of the specification but this is not an LTS

Recursive specs vs. Transition systems LTSs are very simple but expressible language They can be finite or infinite, with countable or uncountable number of states or number of transitions The language defined with a given process algebra and its corresponding SOS semantics can specify a subset of LTSs A simple example: BPA(A) cannot be used to specify LTSs with time

Recursive specs vs. Transition systems Question: What sort LTSs are specifiable by recursive specifications in BPArec(A)?

Recursive specs vs. Transition systems Question: What sort LTSs are specifiable by recursive specifications in BPArec(A)? LTSs with finite number of states and finite number of transitions and no loops  closed BPA(A) terms Can we specify LTSs with countable number of states or countable number of transitions?

Recursive specs vs. Transition systems 2. Can we specify LTSs with countable number of states and countable number of transitions? l1: States x Act ↦ States States = Nat A = {a} l1(n,a) = n+1, n  Nat a … 3. Can we specify LTSs with uncountable number of states or uncountable number of transitions? l2: States x Act ↦ States States = [0,1] A = {a} l2(0,a) = r, r  [0,1] l2 is bisimilar to l3: States x Act ↦ States States = {s} A = {a} l3(s,a) = s a a

Expressivity of BPArec(A) Question: What sort LTSs are specifiable by recursive specifications in BPArec(A)? 2. Can we specify any LTSs with countable number of states and transitions? YES! 3. Can we specify any LTSs with uncountable number of states or transitions? NO! Theorem: Up to bisimulation, only LTSs with countable number of states and transitions, and only those are specifiable in BPArec(A).

Expressivity of BPArec(A) Example: 1 2 a 3 … n X = n1 a.a. … a.0 n Is this a proper recursive specification in BPArec(A)? NO!

Expressivity of BPArec(A) Example: S0 = a.S11 + S01 S01 = a.S21 + S02 S02 = a.S31 + S03 … S11 = 0 S21 = a.0 S31 = a.a.0 1 2 a 3 … n Is this a proper recursive specification in BPArec(A)?

Expressivity of BPArec(A) Example: S0 = a.S11 + S01 S01 = a.S21 + S02 S02 = a.S31 + S03 … S11 = 0 S21 = a.0 S31 = a.a.0 1 2 a 3 … n Is this a proper recursive specification in BPArec(A)? YES! This process is specifiable in BPArec(A)!

Expressivity of BPArec(A) Example: S0 = a.S11 + S01 S01 = a.S21 + S02 S02 = a.S31 + S03 … S11 = 0 S21 = a.0 S31 = a.a.0 Observe: It is an infinite rec. spec It is an unguarded rec. spec Some states are bisimilar but the root does not change 1 2 a 3 … n Is this a proper recursive specification in BPArec(A)? YES!

Expressivity of BPArec(A) Example: S0 = a.S11 + S01 S01 = a.S21 + S02 S02 = a.S31 + S03 … S11 = 0 S21 = a.0 S31 = a.a.0 Observe: It is an infinite rec. spec It is an unguarded rec. spec Some states are bisimilar but the root does not change 1 2 a 3 … n Is this a proper recursive specification in BPArec(A)? YES! Can we do better? Can we do guarded specification for this process? Can we do better? Can we do finite specification for this process?

Expressivity of BPArec(A) Example: S0 = a.S11 + S01 S01 = a.S21 + S02 S02 = a.S31 + S03 … S11 = 0 S21 = a.0 S31 = a.a.0 Observe: It is an infinite rec. spec It is an unguarded rec. spec Some states are bisimilar but the root does not change 1 2 a 3 … n Is this a proper recursive specification in BPArec(A)? YES! Can we do better? Can we do guarded specification for this process? NO! Can we do better? Can we do finite specification for this process? NO!

Expressivity of BPArec(A) Question: What sort LTSs are specifiable by guarded recursive specifications in BPArec(A)? Theorem: Up to bisimulation, only finitely branching processes/LTSs and only those are specifiable by a guarded recursive specification in BPArec(A).

Expressivity of BPArec(A): Definability Question: What sort LTSs are specifiable by guarded recursive specifications in BPArec(A)? Theorem: Up to bisimulation, only finitely branching processes/LTSs and only those are specifiable by a guarded recursive specification in BPArec(A). definable

Expressivity of BPArec(A): Definability Example: S0 = a.S11 + S01 S01 = a.S21 + S02 S02 = a.S31 + S03 … S11 = 0 S21 = a.0 S31 = a.a.0 Observe: It is an infinite rec. spec It is an unguarded rec. spec Some states are bisimilar but the root does not change It is infinitely branching 1 2 a 3 … n Can we do better? Can we do guarded specification for this process? NO! Can we do better? Can we do finite specification for this process? NO! This process is not definable in BPArec(A)!

Expressivity of BPArec(A):Stack example We consider a Stack with unlimited capacity Elements are taken from a finite set of data elements D = {d1, d2, …, dn} (n  N) Elements from D can be added to or removed from the top of the stack.

Expressivity of BPArec(A):Stack example We consider a Stack with unlimited capacity Elements are taken from a finite set of data elements D = {d1, d2, …, dn} (n  N) Elements from D can be added to or removed from the top of the stack. Steps: First, define the set of atomic actions. A = { push(d) | d  D }  {pop(d) | d  D } 2. How many recursive variables may be needed S  denotes the situation when the stack is empty S  denotes the state of the stack process when the content is   D*

Expressivity of BPArec(A):Stack example Atomic actions A = { push(d) | d  D }  {pop(d) | d  D } 2. recursive variables S  denotes the situation when the stack is empty S  denotes the state of the stack process when the content is   D* S = dD push(d).Sd, for any d D Sd = eD push(e).Sed + pop(d).S , for any d  D Sd = eD push(e).Sed + pop(d).S, for any d  D and   D*

Expressivity of BPArec(A):Stack example For D = {0,1} S = d{0,1} push(d).Sd, for any d {0,1}, Sd = eD{0,1} push(e).Sed + pop(d).S, for any d  {0,1,   {0,1}* S 1 11 01 10 00 pp(1) pp(0) ps(0) ps(1) … … … …

Expressivity of BPArec(A):Stack example For D = {0,1} S = d{0,1} push(d).Sd, for any d {0,1}, Sd = eD{0,1} push(e).Sed + pop(d).S, for any d  {0,1,   {0,1}* Observe: It is a nice guarded rec. spec S 1 11 01 10 00 pp(1) pp(0) ps(0) ps(1) … … … … This process is definable, therefore it is finitely branching

Expressivity of BPArec(A):Stack example For D = {0,1} S = d{0,1} push(d).Sd, for any d {0,1}, Sd = eD{0,1} push(e).Sed + pop(d).S, for any d  {0,1,   {0,1}* Observe: It is finitely branching S 1 11 01 10 00 pp(1) pp(0) ps(0) ps(1) … … … … There is a guarded spec defining this process

Expressivity of BPArec(A):Stack example For D = {0,1} S = d{0,1} push(d).Sd, for any d {0,1}, Sd = eD{0,1} push(e).Sed + pop(d).S, for any d  {0,1,   {0,1}* Observe: It is finitely branching S 1 11 01 10 00 pp(1) pp(0) ps(0) ps(1) … … … … There is a guarded spec defining this process Can we do better in BPArec(A)? Can we do finite spec?

Expressivity of BPArec(A):Stack example For D = {0,1} S = d{0,1} push(d).Sd, for any d {0,1}, Sd = eD{0,1} push(e).Sed + pop(d).S, for any d  {0,1,   {0,1}* Can we do better in BPArec(A)? Can we do finite spec? S 1 11 01 10 00 pp(1) pp(0) ps(0) ps(1) … … … … Observe: It has infinitely many states None of them are bisimilar Cannot be turned into a finite LTS

Expressivity of BPArec(A):Finite definability Question: What sort LTSs are specifiable by finite guarded recursive specifications in BPArec(A)? Theorem: Up to bisimulation, only processes with finitely many states and finitely many transitions and only those are definable by finite guarded recursive specifications in BPArec(A).

Expressivity of BPArec(A):Finite definability Question: What sort LTSs are specifiable by finite guarded recursive specifications in BPArec(A)? regular processes Theorem: Up to bisimulation, only processes with finitely many states and finitely many transitions and only those are definable by finite guarded recursive specifications in BPArec(A).

Expressivity of BPArec(A):Finite definability Question: What sort LTSs are specifiable by finite guarded recursive specifications in BPArec(A)? regular processes Theorem: Up to bisimulation, only processes with finitely many states and finitely many transitions and only those are definable by finite guarded recursive specifications in BPArec(A). finitely definable

Expressivity of BPArec(A):Finite definability For D = {0,1} S = d{0,1} push(d).Sd, for any d {0,1}, Sd = eD{0,1} push(e).Sed + pop(d).S, for any d  {0,1,   {0,1}* Can we do better in BPArec(A)? NO! Can we do finite spec? NO! S 1 11 01 10 00 pp(1) pp(0) ps(0) ps(1) … … … … Observe: It has infinitely many states None of them are bisimilar Cannot be turned into a finite LTS This is not a regular process There is no finite rec. spec. in BPArec(A) !

Expressivity of BPArec(A) Question: What do we need to add to BPArec(A) just sufficient that this is possible?

Expressivity of BPArec(A) Question: What do we need to add to BPArec(A) just sufficient that this is possible? Very simple extension: (general) sequential composition!

Theory of Sequential Processes TSP Process Algebra (2IF45)

TSPrec(A) = BPArec(A) + sequential composition Language: TSPrec(A) Signature: 0, 1, (a._ )aA, +, •, X Deduction rules for TSPrec(A): Axioms of BPArec(A): (A1) – (A4) (A5) (x+ y)  z = x  z+y  z (A6) (x  y)  z = x  (y  z) (A7) 0  x = 0 (A8) x  1 = x (A9) 1  x = x (A10) a.x  y = a.(x  y) a.x  x  a y (x + y)  ⑥ Process Algebra (2IF45)

TSPrec(A) = BPArec(A) + sequential composition Language: TSPrec(A) Signature: 0, 1, (a._ )aA, +, •, X Deduction rules for TSPrec(A): Axioms of TSPrec(A): (A1) – (A4) (A5) (x+ y)  z = x  z+y  z (A6) (x  y)  z = x  (y  z) (A7) 0  x = 0 (A8) x  1 = x (A9) 1  x = x (A10) a.x  y = a.(x  y) a.x  x  . . . a y (x + y)  ⑥ Deduction rules for sequential composition x  x’ x  y  x’ a x y  y’ x  y  y’ a   a a x y (x  y)   Process Algebra (2IF45)

TSPrec(A) = BPArec(A) + sequential composition Language: TSPrec(A) Signature: 0, 1, (a._ )aA, +, •, X Deduction rules for TSPrec(A): Axioms of TSPrec(A): (A1) – (A4) (A5) (x+ y)  z = x  z+y  z (A6) (x  y)  z = x  (y  z) (A7) 0  x = 0 (A8) x  1 = x (A9) 1  x = x (A10) a.x  y = a.(x  y) a.x  x  . . . a y (x + y)  ⑥ Deduction rules for sequential comosition x  x’ x  y  x’ a x y  y’ x  y  y’ a   a a x y (x  y)   Bisimilarity of LTSs Equality of terms Process Algebra (2IF45)

TSPrec(A) process algebra Congruence of bisimulation with respect to all operators in TSPrec(A) Elimination result: BPA(A) are still basic terms Soundness of TSPrec(A) with respect to the SOS semantic (term model) Ground completeness: bisimilarity between closed terms is derivable in TSP(A)

Stack process in TSPrec(A) Revise the Stack example: We consider a Stack with unlimited capacity Elements are taken from a finite set of data elements D = {d1, d2, …, dn} (n  N) Elements from D can be added to or removed from the top of the stack.

Stack process in TSPrec(A) Revision of the Stack example: We consider a Stack with unlimited capacity Elements are taken from a finite set of data elements D = {d1, d2, …, dn} (n  N) Elements from D can be added to or removed from the top of the stack. Stack2 = T T = dD push(d). ( U  pop(d).1)

Stack process in TSPrec(A) Revision of the Stack example: We consider a Stack with unlimited capacity Elements are taken from a finite set of data elements D = {d1, d2, …, dn} (n  N) Elements from D can be added to or removed from the top of the stack. Stack2 = T T = dD push(d). ( U  pop(d).1) U = 1 + T  U

Stack process in TSPrec(A) Stack1 = S S = dD push(d).Sd, for any d D Sd = eD push(e).Sed + pop(d).S, for any d  D and   D* Stack2 = T T = dD push(d). ( U  pop(d).1) U = 1 + T  U Is Stack1 = Stack2 ? YES! Can be proved using RDP+RSP principles*. *See the proof in the book

Expressivity of TSPrec(A) BSPrec(A) and TSPrec(A) in general are equally expressive! A process is definable in TSPrec(A) if and only if it is a solution of a guarded recursive spec.  the same as in BPSrec(A) Nevertheless in TSPrec(A) infinitely branching processes can be specified by a finite (unguarded) recursive spec. Example: X = X • (a.1) + a.1

Expressivity of TSPrec(A) Example 2: Consider recursive specification in TSPrec(A) X = a. (Y • a.1) Y = a. (Y • Z) + a.1 Z = a.1 + 1 Observe: the specification is guarded the process is finitely branching but “the degree of branching” is unbounded

Expressivity of TSPrec(A) Example 2: Consider recursive specification in TSPrec(A) X = a. (Y • a.1) Y = a. (Y • Z) + a.1 Z = a.1 + 1 Observe: the specification is guarded the process is finitely branching but “the degree of branching” is unbounded Results: In TSPrec(A) unbounded branching processes can be defined by a finite guarded specification This is not the case with BPArec(A)

What about the Bag process? Can we find any BPArec(A) or TSPrec(A) specification of the Bag process? Can we find any which is finite guarded specification? Or do we need to extend TSP(A) with more operators?