The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
A calculus of mobile Real-Time processes
1. A calculus of mobile Real-Time processes
A calculus of mobile Real-Time
processes
lotfi.larbaoui@polymtl.ca
16 novembre 2017
2. A calculus of mobile Real-Time processes
Introduction
The π-calculus
General design choices and properties
The πRT-calculus
Example
Conclusion
3. A calculus of mobile Real-Time processes
Introduction
Introduction
The π-calculus
General design choices and properties
The πRT-calculus
Example
Conclusion
4. A calculus of mobile Real-Time processes
Introduction
Modelling Real-time system :
c Building models which faithfully represent complex system is a
non trivial problem and a prerequisite to the application of formal
analysis .d Joseph Sifakis 2001
Process calculi (CCS and pi-calculus etc) :
c A mathematical treatment of communicating and concurrent
entities that could rival the known theories of sequential
programming .d Robin Milner 2010
Real-time process algebra : πRT-calculus
Modeling the real-time aspect of systems in a mobile
environment and reasoning about dynamic temporal behaviour
and dynamic configurations of systems.
5. A calculus of mobile Real-Time processes
Introduction
Background
6. A calculus of mobile Real-Time processes
The π-calculus
Introduction
The π-calculus
General design choices and properties
The πRT-calculus
Example
Conclusion
7. A calculus of mobile Real-Time processes
The π-calculus
Syntax
P ::=
| 0 Inaction
| αi .P Action
| P1 + P2 Choice
| P1|P2 Parallel composition
| (νx).P Scoping
| [x = y]P Match
| A(x1, ..., xn) Agent identifier
| !P replication
Names : x , y , z
The actions αi are : τ Internal , ¯xy Output a name ,
x(y) Input a name ,¯x(y) Output a reference
8. A calculus of mobile Real-Time processes
The π-calculus
Semantics
The semantics of π-calculus is defined by :
1. Reduction binary relations : P → Q
2. Labeled transition : P
α
−→ Q
The inference rules defining the reduction relations and labeled
transition.
The semantics of the reductions use the notion of Structural
congruence
9. A calculus of mobile Real-Time processes
The π-calculus
Structural congruence
10. A calculus of mobile Real-Time processes
The π-calculus
Transition rules
11. A calculus of mobile Real-Time processes
The π-calculus
Transition rules
12. A calculus of mobile Real-Time processes
The π-calculus
Interactions between processes
13. A calculus of mobile Real-Time processes
General design choices and properties
Introduction
The π-calculus
General design choices and properties
The πRT-calculus
Example
Conclusion
14. A calculus of mobile Real-Time processes
General design choices and properties
Model Features
Global clock
Discrete time
Separation of actions and time events : interleaving model
Synchronous time event : Time progresses in a synchronous
fashion
Time transmission : can result in dynamic temporal behaviour
of processes.
15. A calculus of mobile Real-Time processes
General design choices and properties
Model Properties
Maximal progress :
if P
τ
−→ P for some P , then for t > O, P
(t)
−−→ P for no P .
Timelock freeness :
for all agent P and P
α
−→ P for some P and α = τ , then for
t > 0, P
(t)
−−→ P for some P .
Time visibility :
for t > 0, if P
(t)
−−→ P , then for any name x free in P ,
(νx)P
(t)
−−→ (νx)P
16. A calculus of mobile Real-Time processes
General design choices and properties
Model Properties
Time determinacy :
for t > 0, whenever P
(t)
−−→ P and P
(t)
−−→ P , then P ≡ P
Time continuity :
for t > 0 and u > 0 , P
(t+u)
−−−−→ P iff there exists P such that
P
(t)
−−→ P and P
(u)
−−→ P
Action persistency :
for t > 0, if P
(t)
−−→ P and P
α
−→ Q then P
α
−→ Q for some Q
17. A calculus of mobile Real-Time processes
General design choices and properties
Atomic actions and Idling
Non-controllable action (above) and controllable action (below)
18. A calculus of mobile Real-Time processes
The πRT-calculus
Introduction
The π-calculus
General design choices and properties
The πRT-calculus
Example
Conclusion
19. A calculus of mobile Real-Time processes
The πRT-calculus
πRT-calculus
P ::=
| 0 Inaction
| αi .P Action
| P1 + P2 Choice
| P1|P2 Parallel composition
| P
t
Q The timeout operator
| (νx).P Scoping
| [x = y]P Match
| A(x1, ..., xn) Agent identifier
| !P replication
Names : x , y , z . - The actions αi are : τ Internal , ¯xy Output a
name , x(y) Input a name ,¯x(y) is not defined ! ! !.
20. A calculus of mobile Real-Time processes
The πRT-calculus
Semantics
21. A calculus of mobile Real-Time processes
The πRT-calculus
Operational semantics
22. A calculus of mobile Real-Time processes
The πRT-calculus
Operational semantics
23. A calculus of mobile Real-Time processes
Example
Introduction
The π-calculus
General design choices and properties
The πRT-calculus
Example
Conclusion
24. A calculus of mobile Real-Time processes
Example
Network configuration for the mobile streaming video
player
25. A calculus of mobile Real-Time processes
Example
Ports of the video player
Player
def
= attach(t, r).Attached(t, r)
Attached(t, r)
def
= 0
t
Playing(r)
Playing(r)
def
= video.(0
1
.τplay.Playing(r)) + attach(t, r).rel.Attached(t, r)
26. A calculus of mobile Real-Time processes
Example
Ports of the routers
Router(t, rel)
def
= attach t, rel .rel.Router(t, rel)
RouterA
def
= Router(3, rel1)
RouterB
def
= Router(5, rel2)
27. A calculus of mobile Real-Time processes
Example
Port of the video server
Server
def
= video.Server
28. A calculus of mobile Real-Time processes
Example
The whole system is encoded from the user’s point of view and is
as follows :
System
def
= (νvideo)(Server|(νattach, rel1, rel2)
(Player|RouterA|RouterB))
.
29. A calculus of mobile Real-Time processes
Example
The whole system is encoded from the user’s point of view and is
as follows :
System
def
= (νvideo)(Server|(νattach, rel1, rel2)
(Player|RouterA|RouterB))
.
Suppose the player first attaches to router A. Router A transmits
the transmission delay from the server which is 3 time units plus a
release link to the player.
System
τ
→ (νvideo)(Server|(νattach, rel1, rel2)
(Attached(3, rel1)|rel1.Router(3, rel1)|RouterB))
.
30. A calculus of mobile Real-Time processes
Example
The whole system is encoded from the user’s point of view and is
as follows :
System
def
= (νvideo)(Server|(νattach, rel1, rel2)
(Player|RouterA|RouterB))
.
Suppose the player first attaches to router A. Router A transmits
the transmission delay from the server which is 3 time units plus a
release link to the player.
System
τ
→ (νvideo)(Server|(νattach, rel1, rel2)
(Attached(3, rel1)|rel1.Router(3, rel1)|RouterB))
.
System
(3)
→ System
.
31. A calculus of mobile Real-Time processes
Example
The whole system is encoded from the user’s point of view and is
as follows :
System
def
= (νvideo)(Server|(νattach, rel1, rel2)
(Player|RouterA|RouterB))
.
Suppose the player first attaches to router A. Router A transmits
the transmission delay from the server which is 3 time units plus a
release link to the player.
System
τ
→ (νvideo)(Server|(νattach, rel1, rel2)
(Attached(3, rel1)|rel1.Router(3, rel1)|RouterB))
.
System
(3)
→ System
.
where
System
def
= (νvideo)(Server|(νattach, rel1, rel2)
(Playing(rel1)|rel1.Router(3, rel1)|RouterB))
32. A calculus of mobile Real-Time processes
Example
After the transmission delay, the player gets the first video clip,
decodes and processes it for 1 time unit and then plays the clip to
the user.
System
τ
→ (νvideo)(Server|(νattach, rel1, rel2)
(0
1
.τplay.Playing(rel1))|
rel1.Router(3, rel1)|RouterB))
.
33. A calculus of mobile Real-Time processes
Example
After the transmission delay, the player gets the first video clip,
decodes and processes it for 1 time unit and then plays the clip to
the user.
System
τ
→ (νvideo)(Server|(νattach, rel1, rel2)
(0
1
.τplay.Playing(rel1))|
rel1.Router(3, rel1)|RouterB))
.
(1)
→ (νvideo)(Server|(νattach, rel1, rel2)
(τplay.Playing(rel1))|rel1.Router(3, rel1)|RouterB))
.
τ
→ (νvideo)(Server|(νattach, rel1, rel2)
(play.Playing(rel1))|rel1.Router(3, rel1)|RouterB))
play
→ System
34. A calculus of mobile Real-Time processes
Example
The player moves away from router A and attaches to router B.
Router B transmits the new transmission delay from the server
which is now 5 time units plus a release link to the player.
.
35. A calculus of mobile Real-Time processes
Example
The player moves away from router A and attaches to router B.
Router B transmits the new transmission delay from the server
which is now 5 time units plus a release link to the player.
.
System
τ
→ (νvideo)(Server|(νattach, rel1, rel2)
(rel1.Attached(5, rel2)|
rel1.Router(3, rel1)|rel2.Router(5, rel2)))
.
36. A calculus of mobile Real-Time processes
Example
The player moves away from router A and attaches to router B.
Router B transmits the new transmission delay from the server
which is now 5 time units plus a release link to the player.
.
System
τ
→ (νvideo)(Server|(νattach, rel1, rel2)
(rel1.Attached(5, rel2)|
rel1.Router(3, rel1)|rel2.Router(5, rel2)))
.
τ
→ (νvideo)(Server|(νattach, rel1, rel2)
(Attached(5, rel2)|
RouterA|rel2.Router(5, rel2)))
(5)
→ System
System
def
= (νvideo)(Server|(νattach, rel1, rel2)
(Playing(rel2)|RouterA|rel2.Router(5, rel2)))
37. A calculus of mobile Real-Time processes
Example
When the player moves away from router B and back to router A
again :
.
System
τ
→ (νvideo)(Server|(νattach, rel1, rel2)
(0
1
.τplay.Playing(rel2))|
RouterA|rel2.Router(5, rel2)))
.
38. A calculus of mobile Real-Time processes
Example
When the player moves away from router B and back to router A
again :
.
System
τ
→ (νvideo)(Server|(νattach, rel1, rel2)
(0
1
.τplay.Playing(rel2))|
RouterA|rel2.Router(5, rel2)))
.
(1)
→ (νvideo)(Server|(νattach, rel1, rel2)
(τplay.Playing(rel2))|RouterA|rel2.Router(5, rel2)))
.
39. A calculus of mobile Real-Time processes
Example
When the player moves away from router B and back to router A
again :
.
System
τ
→ (νvideo)(Server|(νattach, rel1, rel2)
(0
1
.τplay.Playing(rel2))|
RouterA|rel2.Router(5, rel2)))
.
(1)
→ (νvideo)(Server|(νattach, rel1, rel2)
(τplay.Playing(rel2))|RouterA|rel2.Router(5, rel2)))
.
τ
→ (νvideo)(Server|(νattach, rel1, rel2)
(play.Playing(rel2))|RouterA|rel2.Router(5, rel2)))
play
→ System
40. A calculus of mobile Real-Time processes
Example
After the transmission delay, the player can start receiving and
playing the stream :
.
41. A calculus of mobile Real-Time processes
Example
After the transmission delay, the player can start receiving and
playing the stream :
.
System
τ
→ (νvideo)(Server|(νattach, rel1, rel2)
(rel2.Attached(3, rel1)|
rel1.Router(3, rel1)|rel2.Router(5, rel2)))
.
42. A calculus of mobile Real-Time processes
Example
After the transmission delay, the player can start receiving and
playing the stream :
.
System
τ
→ (νvideo)(Server|(νattach, rel1, rel2)
(rel2.Attached(3, rel1)|
rel1.Router(3, rel1)|rel2.Router(5, rel2)))
.
τ
→ (νvideo)(Server|(νattach, rel1, rel2)
(Attached(3, rel1)|
rel1.Router(3, rel1)|RouterB))
(3)
→ System
43. A calculus of mobile Real-Time processes
Conclusion
Introduction
The π-calculus
General design choices and properties
The πRT-calculus
Example
Conclusion
44. A calculus of mobile Real-Time processes
Conclusion
Conclusion
The πRT-calculus is a temporal extension of a π-calculus by
introducing a timeout operator.
To continue :
Developing timed bisimulation equivalence relation
Extending the π-calculus with continuous time
Defin the broadcast commnication in the πRT-calculus .
This formalism :
is simple real-time process algebra
is not suitable for real-time programming
their mechanisms are too abstract
45. A calculus of mobile Real-Time processes
Conclusion
References
Robin Milner
A Calculus of Communicating Systems
Springer-Verlag, 1980
Davide Sangiorgi,David Walker
The Pi-Calculus : A Theory of Mobile Processes
Cambridge University Press, 2003
Xavier Nicollin, Joseph Sifakis
An Overview and Synthesis on Timed Process Algebras
Proceedings of CAV 91, LNCS 575, 1991.
Jeremy Y. Lee John Zic
On Modeling Real-time Mobile Processes
Australian Computer Science Communications Vol. 24 (2002)