Академический Документы
Профессиональный Документы
Культура Документы
Abstract
We Concurrency, Routing Calculi, Stochastic Modelling, Formal Methods,Process
Algebra-Concurrency, Routing Calculi, Stochastic Modelling, Formal Methods,Process
AlgebraCon-currency, Routing Calculi, Stochastic Modelling, Formal Methods,Process
AlgebraConcur-rency, Routing Calculi, Stochastic Modelling, Formal Methods,Process
AlgebraConcurrency, Routing Calculi, Stochastic Modelling, Formal Methods,Process
AlgebraConcurrency, Rout-ing Calculi, Stochastic Modelling, Formal Methods,Process
AlgebraConcurrency, Routing Calculi, Stochastic Modelling, Formal Methods,Process
AlgebraConcurrency, Routing Cal-culi, Stochastic Modelling, Formal Methods,Process
AlgebraConcurrency, Routing Calculi, Stochastic Modelling,
Keywords: Concurrency, Routing Calculi, Stochastic Modelling, Formal Methods,Process
Algebra
1. Introduction
In recent years, formal methods [1], specif-
ically process algebra [2], are widely used for
R2 k
describing system behaviour and to prove the R3
l
correctness of modern distributed systems. p
Routing calculi [3] is a language, an elabo- 12 p p r
21
13 p
ration of asynchronous distributed -calculus [4]. R1 31 p
43
2
conclusion. p denotes the total probability of communica-
tion links, between the routers, the message
1.1. Syntax has already travelled across the path towards
We use v; v1; v2; u; u1; u2; : : : to describe ei- its destination. (new d) S is scoping mecha-
ther a name or a variable or a simple value. We nism for names at system level. A process can
dont use tuples as values for simplicity. So, here declare a private channel or a new node name
v; u; : : : are simple values, for example at some router. In this language, we assume
integers,boolean etc. We use meta variables a; b; that router names are not dynamically created.
c; : : : range over sets of channel names CN . We So, d can not be a router name. The simplest
use variables m; n; : : : range over set of node combinator, called the identity function does
names N N . We use R; R1; R2; : : : nothing but return its argument. The identity for
range over set of router names RN . To repre- system terms is denoted by ".
sent the cost of communication, we use vari- In node syntactic category, n[P] represents
ables k; l; : : : which range over the set of in- the named processes. The process term P
tegers. Probability of message hopping along resides at node name n. The concurrency for
communication link between routers are rep- nodes terms is denoted by M j N at any router.
0 (new d) M is the scoping mechanism of a name
resented through variables p; p ; : : : ; p1; p2 : : :
which range over [0; 1]. We assume that sets of at node. A process at a node may declare a
channel names, node names and router names private channel however it is pos-sible to
are disjoint from each other. There are three export a node name or channel name to
syntactic categories in this language. These are another process located at a different node
Systems, Nodes and Processes. The syn-tax of through a value in the message. 0 is the iden-
this calculus is described in Figure 2. System tity for node terms.
term hR iJMK represents the proba-bilistic router. In process terms, c?(x) P is a input pro-cess.
The superscript represents the probability It receives a value v along the channel c then
distribution. This probability distribution is used to execute P into which v has been substi-tuted,
assign the probability to output process along v
P f =xg. Another process is output pro-cess, m!
communication links be-tween routers. It exhibits hv@ci. Output process sends a value v to the
the probabilistic na-ture of the router. The destination node m on channel c. At destination
topology of the routers is fixed. The node M node m, the value will eventually delivered to
located at router R. Concurrency, S j T , shows an input process term on channel c. The test
the parallel com-position of systems S and T . for identity of simple values is done by
Message is de- matching construct if v = u then P else Q. (new
k;p
noted by [R] fn; m; v@cg. Message propa- b) P is scoping mechanism for names at
gate the value v along channel c from source process level. A process may declare a private
node n to destination node m. The process channel to communicate within a node how-
at source node n to another process at desti- ever it is possible to export a channel name to
nation node m can communicate along some another process at a different node through a
channel. Here, k represents the number of value in message. newnode m with P in Q
hops (routers) the message has already trav- creates a new node at process level. A new
elled across the path towards its destination. node m is created at some router and process
3
P is launched in it in parallel with process Q.
The success process ! is a test process [8].
*
Ex-ternal nodes can be used for run the test (st-extr) (new d)(P j Q) P j (new d)Q; if d 2= fn(P )
pro-cess. The node m[ ] is called external (st-com) PjQ QjP
(st-assoc) (P j Q) j R P j (Q j R)
node if no code or process defined for it. For (st-id) P j id P
exam-ple, hR iJn[T] j m[c?(x) !]K. Where c? (st-flip) (new c)(new d)P (new d)(new c)P
(st-new) (new d)P P; if d 2= fn(P )
(x) ! is a test process. The probabilistic
(st-new id) (new d)id id
choice between output processes is
Figure 3: Structural Equivalence (Standard)
represented by m!hv@ci p m!hv@ci.
In a system hR iJm[c?(x) P]K , if variable x
occurs in the sub-term P then all occur-rences
of x in the sub-term P are said to be bound. All
occurrences of variables which are not bound
in a term are said to be free. In GR we also *
(sp-std) standard axioms
have a binder for names; in a system term hR (sp-probout) m!hv@ci p m!hv@ci
0
m!hv@ci p0 m!hv@ci ; p = 1 p
iJm[(new a)P]K all occur-rences of name a are m!hv@ci m!hv@ci if p = 1
j
m!hv@ci P p
4
is given in Figure 3,Figure 4,Figure 5 and
Fig-ure 6. *
(r-out)
0;1
c; B hR iJn[m!hv@ci j P] j NK ! c; B [R] fn; m; v@cg j hR iJn[P] j NK
(r-bcom i)
1.3. Reduction Semantics f(R1; Rj)g 2 c
p1j > 0; p1j 2 (R1)
hR1 i(m) = fRjg
A configuration consists of a pair ( c; ; hRj i(v) "; v 2 NN
k;p
for all j=2,3,..
S) where c RN RN. The undirected graph c; B [R1] fn; m; v@cg j hRj i N j S !
p
fn; m; v @cg j JhR Kj fv R 1gi N j S
c(r-msg del)j
1j
0
hR i(m) = fRg J K ; if k < k
routers Ri,Ri+1, . . . , Rk 1,Rk. We shall
0 0
k;p k ;p
c; B [R] fn; m; v@cg j [R] fn; m; v@cg j S !
k;p
c; B [R] fn; m; v@cg j S
use the notation path(Ri; Rk) to represent a hR i(m) = fRg 0 0 ; if k > k
0
k;p k ;p
path of routers, Ri ::: Rk between pair of c; B [R] fn; m; v@cg j
0 0
k ;p
[R] fn; m; v@cg j S !
c; B [R] fn; m; v@cg j S
routers Ri and Rk. The reduction seman-tics hR i(m) = fRg 0 0
k ;p
0
; if k = k and if p > p
0
k;p
of determining the path between the commu- hR i(m) = fRg; [R] fn; m; v@cg notin S for any l
l;p
k;p
nicating processes, routing table hR i is c; B [R] f
n; m; v@c
c;B hR i m[Pf v=xg] j N
g jh
R m[c?(x) P]
j S
iJ
j
N
Kj
S
!
k;p
table hR i then we use the notation hR i(m) " c; B hR iJn[if v = u then P else Q]K ! c; B hR iJn[P]K
(r-mismatch)
; m 2 N N . In this process algebra, a judge- c; B hR iJn[if v1 = v2 then P else Q]K ! c; B hR iJn[Q]K v1 6= v2
(r-struct)
k;p 0
ment c; B S ! c; B S would intuitively mean S
0
S ; c;
k;p
BS
0 k;p
! c;
0
BR ;R
0
R
0 c; BS ! c; BR
that a system S reduces to S where the cost (r-cntx)
k;p 0
c; B S1 ! c; B S1
of reduction is k and probabil-ity of reduction c; B S1 j S2 !
k;p
c;
0
B S1 j S2
is p. The reduction rules are described in c; B S2 j S1 !
k;p
c;
k;p
B S2 j S1
0
0
c; B (new d)S1 ! c; B (new d)S1
Figure 7 and Figure 8.
Now in Example 1 we see how the node name Figure 8: (Contd....)Reduction semantics
can also be send as value in the message
5
R2 Further, by using reduction rule (r-out)
R3 p the configuration B j j j
p c; S1 S2 S3
3
p p p5 Q 0]
12
21 (new q)( R q R q[m! q@c s[Q] )
1 5
3
31
p 3
qm
0;1 h 4
q
f
c S
4gi h ij ;
j S
j
R1 R4 [R4] f ; ; @ gj 5 reduces to c B1 j
m p s S
j
2
S
3 (new )( 4 J 4 giJ [ 0]
j
[ ] K )K
15 5
o n q
[R4 ]j fq; m; q@c h g j S f5 . j
0;1
q R q R qQ sQ
p 51
R5 45 new node We have hR4 i(m) = fR3; R5g. We know
that q is a new node and not known to R4; R5
t i.e. hR3 i(q) "; q 2 N N and hR5 i(q) "; q 2
NN. By reduction rules (r-bcom i) and
Figure 9: A simple distributed network with routers (r-struct), the configuration
(new node creation) c; B S1 j S2 j S3 j
(new q)( R q R q[Q0] s[Q] )
0
;
1 f j 4gi j h4 f
N j
[R 4 ] q; m; q@cg reduces q
S
5 to
S R
to processes between nodes. We also see the c; B S1 j 2 j h R3 fJ 3 gi K 3 j
(new q)( R q R q[Q0] s[Q] )
1;
[ 5 ]@ [ 3 ] J K
f gi
Example: 1. The systems S1, S2, S3, S4 and h 5 5 [ ?( K
J K
1 J
1
R q R td x) Q]
R
1 x@d
J
where P m! q@c Q0 h f gi j
[
K
5] J K 3
h iR3 q R
3
N
3 K
(newJ q)( R4 q R4 q[Q0] s[Q] )
1;
0:
h ij h 7 h [ ?
f gi
1;0:3 j K
j
The new
f
( J
node q is created at node s and this 5
5gi
J K R q; m; q@c [R ] q; m; q@c
new node q send to process at node m. f g j f g j
R q Rt d x) Q]
So first by an application of reduces to B c;
R K n[N
(r-newnode creation), we get configu- R1 q 1 J m[c?(x) t! x@d ] ] o[O]
ration h f gi h i j j j
hR fq
S2 j 3 R 3gi N3 K j
B
c ; S1
j S2
j S3
j 1 )( q
J
R
4 q R
[ q
J Q s
] Q
) K
2
;
0
:
4
R s[newnode q with P in Q] S 9 h f gi2;0:18 j j
h
4
i B jj j jh
5
5 f
[R ]
f 5gi
q; m; q@c
[ ?(
[R1]
J f
q; m; q@c
Kg j
reduces to gi S1 c; S 2 j S3 R q R t d x) Q]
J
q[P] s Q ] ) S5
h f j
S5 h 4 f 4giJ h ij jK j c; B
6
R q R m c?(x) t! x@d ] n[N] o[O] R q R td x Q
h1 f 1 gi [ h i j j j h 5
f
5 gi [ ?( ) ]
S2 2;0:49 j hhR3 fq R3gi N3 j
q)( R q R q[Q0] s[Q] ) K
f gi j j
(new
f
J 4
g
4
jh
Now, we i f J
g K
came to know by routing table
h i
[R1 ] q; m; q@c
(t) = R4 and further R4 (t) = J K R3
R5 q R5 t d ?( x) Q]
h f gi f g
(r
J K R5 . Let q is the node name but known to
[
in) R R q ;q
gi
duction of (r-bcom ). 3;0:084 j j j
R1 q R1 J m[] n[N] o[O] K
1;0:2
Bh f
h c; 1gi [ h i j j B c; f
R q R
j
m c?(x) t! x@d ] n[N] o[O] j m t q d f gi m t q d j
h
f gi j h
S R N
2 R 3q 3 3 S2 R 3q R3 N3
)
0
(new2;
( J4 4 [ 0] [ ] ) K(new q)( R4 q R4 q[Q ] s[Q] )
f
0:
49 q hR f g
q R gi q Q j sQ
j
j
h f gi
h f gi j j
[R1 ]
h 5
f
q; m; q@c 5 gi J
J K R
K 5
By the use of (r-
q R5 t[d?(x) Q] J J K ), we get
K
hR f hq R5 t[d?(x) Q]
gi
J K gi
duction rule
of
B application re-
5 J K Now by an J K
this node name q further send to pro- h 1 1f;0:2
q R
R1
gi
m[]
j
n[N]
j
o[O]
j
Now, J K
f gi j
[R ] gj
S
jh f
R N
cess at node t by output process t!hq@di at 5 m; t; q@d 2 R3 q 3 3
[
0
node m. So by using (r-out) (new q
)( Jh R
4 f4 q R
gi K [1;0:2
] j] sQ
) j
h f gi !
h c; 1
f 1gi h i j j
B R5 c; B R1 q
q R5 t[d?(x) Q] R1
J [] J K [ ] [
K
]
(new q R q R
)(
J 4
4 qQ
[
0]s Q [ K
] ) jh (new
f q)( R4
gi q R4
j J q[Q0] s[Q] )K
h f gi j j
hR fq 5
R gi t[d?(x) Q] reduces to h R
f q
h t[Q
f qx g = ]
gi j j
0;1 f gi j j j
R5
J [ K
c; f B R1 gj 1 [] ] gi [ ] j J K
[R ] S R q R3 N 3 So, we have explained the reduction seman-
jh f
m; t; q@d 2
(new
1
q)(
J
hR4 f K
R4 gi [ 0 ] j [ ] )
K j tic with the help of Example 1.
J K
Further, we
h f giq qQ s Q (t) =
q R5 R5 show that reductions are preserved upto struc-
routing table R
t[d?(x) Q] J K
K
f Now, we know by J h 1i tural equivalence. This is formally stated and
g
3
R ; R5 . J
Let q is the node name but K proved in the following theorem:
known to R 3 and R 5 i.e. h R 3 i (q) # ; q 2
N N ; hR5 i(q) #; q 2 N N and hence by the Theorem: 1. If S1 S2 and c; B S1 !
0 0
use of (r-bcom ii). c; B S1 then there exist S2 such that
0 0 0
c;
1;0:2
B h R q R1 m[] j n[N] j o[O] K j
1
f gi
1;0:3
c; B S2 ! c; B S2 s.t. S1 S2 .
[R ] j [R ]
J
5 fm; t; q@dg 3 fm; t; q@dg j In this theorem, we prove that reduction se-
S2 j h R3 fq R3 gi N3 j mantics is preserved under structural equiva-
0
(new q)( hR q R4 q[Q ] j s[Q] ) j lence.
4
f
gi J K
J K
7
1.4. Well-formed Configuration Additionally, well-formedness of configura-
In our calculi, how can we say that reduc- tions is also preserved under reduction
tion semantics is consistent? How will we en- seman-tics as given in following theorem:
sure that there is no inconsistency in resulting
configuration? We can say if a configuration is Theorem: k;p
2. If c; B S is a well-formed configuration and
0 0
c; B S ! c; B S then c; B S is also well-formed.
coherent before we apply a reduction and it re-
mains coherent after the reduction as well. We
list the minimal properties which will ensure 1.5. A simple probabilistic broadcast lan-
coherence. These all properties together get us guage
the notion of well- formed configurations which
PBL [6], is a process calculus developed
are summarized in Definition 1.
to model high level wireless systems, where
Definition: 1 (well formed configuration). the topology of a network is described by a
graph. The calculus enjoys features which
1. c; B S is a well-formed system. are proper of wireless networks, namely
2. c; B (new n)S is well-formed if c; B S is a well-formed broadcast com-munication and probabilistic
system.
3. c; B hR iJNK j S is well-formed if behaviour. We briefly discuss the syntax and
(a)
(b)
c; B S is well-formed.
hR i does not occur in S.(unique router name) reduction se-mantics of P BL in subsection
(c)
8r 2 fn(N) such that r 2 NN where NN is the set 1.6 and subsec-tion 1.7, respectively.
of node names, if hR i(r) = fRg then 8hR1 i 2 S,
hR1 i(r) 6= fR1g.(unique node name)
(d)
8r 2 fn(N) such that r 2 NN; hRi(r) #
k;p 1.6. Syntax
4. c; B [R] fn; m; v@cg j S well-formed if
0
(a)
c;0B S is well-formed and S hR iJNK j S for some We now briefly discuss syntax of P BL as
S
(b)
8r 2 fmg
S
fn(v) such that r 2 NN; hRi(r) # given in [6]. The language for system terms,
c;B S is well-formed if S is of the form
(c)
8
M; N ::= Nodes (r-struct)
n[s] Named processes 0 0
M M ; BM ! ;
MjN Concurrency BM !
0 Identity
(r-bcast)
Q
* JeK = v 8i 2 I: ` m ! ni rcv(M; c) 8 2 nodes(N): ` m 9 n mJc!hei:P + QK i2I
P; Q ::= (Probabilistic)Process jniJ(c?(x):Pi) + QiK j M j N !
S Q v
* Pp P probabilistic choice P(mJP K j i2I niJf =xgPiK j M j N)
S; T ::= ):P states (r-tau)
receive
c
?(x c B m[ :P + Q] j M ! P(m[P] j M)
c!hei:P broadcast
S+T choice Figure 11: Reduction semantics of PBL
if b then S else T branch
:P pre-emption
0 terminate
! :0 success
transmission range.
Figure 10: Syntax of PBL Rule (r-tau) is trivial; it models the
capa-bility of a node to perform an
internal action without affecting any other
behaves as P with probability p, while it be- node in the net-work.
haves as Q with probability 1 p. The suc- Finally, rule (r-struct) establishes that
cess process ! is a test process [8]. reductions are defined modulo structural
External nodes can be used for run the test equivalence.
process. The node m[ ] is called external
node if no code or process defined for it. 2. Equivalence of GR with its specification
We shall now try to establish an equiva-
1.7. Reduction Semantics
lence of GR with its specification, P BL [6]. We
In this section we discuss reduction seman- will show that both languages, GR and P BL,
tics of P BL as given in [6]. In P BL processes are reduction equivalent after abstract-ing
are interpreted as probability distributions of away the details of routers and paths from GR.
states; such an interpretation is encoded by Firstly, we define a function, F, in Defi-nition 2
the function P(:) defined below: over GR system to map to a system in P BL for
P(S) = S the purpose of abstraction of routers.
P((P1p P2)) = p:P(P 1) + (1p:P(P 2)) Definition: 2. We define a function F : GRY ! P BLY ,
Rule (r-bcast) models local broadcast where GRY and P BLY are sets of GR system terms and P BL
system terms respectively, as follows:
communication. When a node m broadcasts a F(") = 0
F(hR k;ip M) = M
value v along channel c in a network c B M, F([R] fn; m; v@cg) = n[m!hv@ci p m!hv@ci]
J
d) S) = (new d) (S )
9
Theorem: 3. In GR, if a well formed config- [2] R. Milner, Communicating and mobile
k;p
uration c; B S1 does a reduction c; B S1 ! systems: The -Calculus, Cambridge
c; B S2 for some k and p and F(S 1) = T1 University Press, 1999.
where T1 is a P BL system term then either
there exist a P BL system T2 s.t. [3] M. Gaur, A routing calculus: Towards
T1 ! T2 and F(S2) T2 or F(S2) T1 formalising the cost of computation in
a distributed computer network, Phd,
Theorem: 4. If a P BL system T1 does a re-
0 Infor-matics, University of Sussex,
duction T1 ! T2 and F(S1) = T1 such that
0 U.K. (De-cember 2008).
T1 T1 where S1 is a system term over a
well formed configuration c; B S1 in GR [4] M. Hennessy., A distributed Pi-Calculus.,
k;p
then c; B S1 ! c; B S2 for some k and p Cambridge University Press, 2007.
0 0
such that F(S2) T2 where T2 T2.
By Theorem 3 and Theorem 4, system [5] M. Gaur, R. Kant, A survey on pro-cess
in both GR and P BL are proven to match algebraic stochastic modelling of large
upto structural equivalence under distributed systems for its perfor-
reduction seman-tics. mance analysis, in: 3rd International
Conference on Eco-friendly Computing
3. Conclusion and Communication Systems
SinceConcurrency, Routing Calculi, (ICECCS), 2014, pp. 206211.
Stochastic Modelling, Formal Meth- doi:10.1109/ Eco-friendly.2014.49.
ods,Process AlgebraConcurrency, Rout-ing
[6] A. Cerone, Matthew, A simple probabilis-
Calculi, Stochastic Modelling, Formal
tic broadcast language, Tech. rep., Foun-
Methods,Process AlgebraConcurrency, Rout-
dations and Methods Research Group,
ing Calculi, Stochastic Modelling, Formal
Trinity College Dublin (2012).
Methods,Process AlgebraConcurrency, Rout-
ing Calculi, Stochastic Modelling, Formal [7] G. Norman, D. Parker, Quantitative
Methods,Process AlgebraConcurrency, Rout- ver-ification: Formal guarantees for
ing Calculi, Stochastic Modelling, Formal timeli-ness, reliability and performance,
Methods,Process AlgebraConcurrency, Rout- Tech. rep., The London Mathematical
ing Calculi, Stochastic Modelling, Formal Society and the Smith Institute (2014).
Methods,Process AlgebraConcurrency
Funding: This work was supported by World Bank TEQIP-II [8] M. H. Andrea Cerone, Modelling proba-
project(2013-16). bilistic wireless networks, in: H. Giese, G.
Rosu (Eds.), Formal Techniques for
References Distributed Systems, Vol. 7273 of Lecture
Notes in Computer Science, Springer
[1] J. Woodcock, P. G. Larsen, J. Bicarregui, Berlin Heidelberg, 2012, pp. 135151.
J. Fitzgerald, Formal methods: Prac-tice
URL http://dx.doi.org/10. 1007/978-3-
and experience, ACM Comput. Surv. 41 642-30793-5_9
(4) (2009) 19:119:36.
10