A Routing Calculus with Distance Vector Routing Updates

We propose a routing calculus in a process algebraic framework to implement dynamic updates of routing table using distance vector routing. This calculus is an extension of an existing routing calculus DRπ where routing tables are fixed except when new nodes are created in which case the routing tables are appended with relevant entries. The main objective of implementing dynamic routing updates is to demonstrate the formal modeling of distributed networks which is closer to the networks in practice. We justify our calculus by showing its reduction equivalence with its specification Dπ (distributed πcalculus) after abstracting away the unnecessary details from our calculus which in fact is one of the implementations of Dπ . We nomenclate our calculus with routing table updates as DRπ . Keywords—Routing Calculi; Routing Protocols; Well Formed Configuration; Reduction Semantics


I. INTRODUCTION
In recent years, developments in formal modeling of distributed networks in a process algebraic framework through process calculi has marked profound work [1], [2] [3], [4], [5], [6], [7], [8], [9], [10], [11], [12].The extended version of Asynchronous Distributed π-calculus (AD π ) named as routing calculi DR ω π was one of the significant developments towards modeling the distributed computer network using an active component named router and considering the path of a communication between the communicating nodes where a routing table is a dynamic entity in a typical distributed network.
DR ω π consists of a network of routers of fixed topology.The processes reside in a located site called nodes which are directly connected to some specific router.Any two processes at nodes can communicate through the routers.The routers find the path over the network between the communicating processes.The processes communicate via this path.
A system in DR ω π , looks like Γ c S.Here S can be of the form R n [P] where P is a process that resides under node n connected at the same or a different node to some router R. The communication between the processes takes place through routers.Each process is located at some particular node which in turn resides at some particular router.The routers determine the particular path along the router connectivity through which the communicated values are forwarded.In this language, the routing table is updated only when a new node is created which limits dynamic updates of the table.
We present a new calculi DR ϕ π which is a direct adoption of routing calculus DR ω π [10] with a modified feature of routing table updates which is dynamic in DR ϕ π unlike DR ω π .We have abstracted away few details from DR ω π to demonstrate the power of new calculi in more simple way.These features can be adopted to DR ϕ π without much amendments to it.We describe a method for routing table updates with the help of implementation of distance vector routing method [13], [14], [15], [16] which uses the Bellman-Ford algorithm [17], [18], [19], [20] to compute the shortest route.In this calculi, the routing tables are periodically exchanged with their neighbors and with this updated entries new routes are found.We abstract away the details of new routes calculation methods by incorporating function δ in our semantics rule.Further to maintain the consistency in the calculi a clock t k is introduced so that the routing table exchange and thereafter update calculation are done at discrete time.The condition in well formed configuration ensure that the calculi remains consistent in term of self looping of message propagation, path guarantee etc.This calculi presents more realistic picture of distributed networks with routers and therefore is closer to the real implementation.
In DR ϕ π , a system is represented by R t k n[P] where a process P is located at node n.The node n is directly connected to the router R at global clock t = t k .The system is accompanied with the router connectivity Γ c .Hence, the configuration paves the way to reductions.A configuration Γ c S comprises of router connectivity Γ c and system S.
In the following sections the paper is organized as follows: The syntax , structural equivalence and reduction semantics of DR ϕ π are described in Section 2, 3 and 4 respectively.We have explained an example to illustrate the reduction rules more clearly in Section 5. We require certain conditions on well formed configuration for the consistent behavior of the reduction semantics in Section 6.We describe the equivalence between DR ϕ π and D π in Section 7. The conclusion is in Section 8.

II. SYNTAX
We will use v, v 1 , v 2 , u, u 1 .... to represents values which may be a simple value or a name or a variable.For simplicity in the language we don't use tuples as values.Therefore u, v, ..... are singleton names or simple values i.e. integers, boolean etc.We use meta variables a, b, c, ... to range over channel names or node names N. In the description of the language n, m, ... are used to range over node names N and we use R, R 1 , R 2 , ... to range over set of router names ℜ at global time t k ,t k+1 ,t k+2 , ... .The variables h, l, ... range over integers to represent the cost of communication.
Further, we assume that sets of node names, router names and channel names are disjoint from each other.More formally There exists three main syntactic categories in the language that are Nodes , Systems, and Processes.We described the syntax of DR ϕ π in Fig. 1.We have given the descriptions of these syntactic categories in the following sub-sections.

A. System
In Fig. 2, we described a system as R t k M where R being a router at global clock t k and M is a another syntactic category named as nodes that are directly connected to R. S | T represents two parallel systems and [R] M h sg (n, m, v@c) is a message at router R.This message is used to propagate the value v from one router to another during communication between some process at source node n to another process at destination node m.The value propagated by the message is represented by v@c to deliver value v to the specified channel c of the destination process.Here the integer h indicates the number of hops(routers), the message has already travelled across the path towards its destination and ε is the identity.

B. Node
In Fig. 2, the nodes are named processes n [P] where n is the name of a node and P is a process term in it.M | N describes usual concurrency between nodes M and N at any router.As an example, in a system R t k M | N the nodes M and N are running in parallel at router R at global clock t k .0 is the identity.

C. Process terms
The process terms are very similar to the terms in [1], [5].These process terms are described in Fig. 2.

III. STRUCTURAL EQUIVALENCE
We introduce a formal relation between the system terms in DR ϕ π called structural equivalence which is represented by the notation ≡ to this relation, they are same computational entity.This is defined in [1], [5].We describe the definition of structural equivalence is separated for all syntactic categories.Nevertheless, the node equivalence inherits process equivalence and system equivalences inherits by node equivalence.For example, the terms   order of their composition really does not matter.These are defined in Fig. 2, 3, 4, 5 and 6.

IV. REDUCTION SEMANTICS
The reduction semantics are defined on configurations Γ c S. The configuration reduction step is defined as Γ c S −→ h Γ c S where the cost of reduction [3], [4] is h and a system S reduces S .These reduction rules for DR ϕ π are given in Fig. 7 and directly inherited from [8], [10].The Rule (R-OUT) is for delivery.For example, let us take the configuration |N where a process m! (v@c) |P at source node n at router R at a global clock t k outputs a value v at channel c which is located at some process at destination node m.This reduction rule generates a propagation message The message with subscript 0 indicates that it has been generated at router R and has not hopped to any other router yet.The term (n, m, v@c) in the message represents the source node name n where a process outputs a value and destination node m where the value v is to be delivered on channel c to a waiting process.
The propagation of the message from one router to another router towards the destination node is done using reduction rule (R-MSG-FWD) in Fig. 7 .Let us consider the reduction rule (R-MSG-FWD).In this reduction rule a configuration of the form In the reduction rule (R-COMM) in Fig. 7, a Here note that cost of reduction is h as the message has hopped h routers from source node n to destination node m.However it is not necessary that for every hop the global clock count increases by an interval.
we describe the reduction rule (R-TABLE-UPDATE) in Fig. 7 which uses a new special notation (←→) to depict the exchange of routing tables at global clock t = t k .This notion (←→) adds a novelty to this calculus as this will not only exchange the routing table between the connecting routers but also update tables (using distance vector routing methods [13], [14], [15], [16] dynamically with the help of synchronization of the global clock.Here we define reduction semantics for updating table dynamically, may or may not at global clock t k .In this reduction rule a configuration of the form R 1 |T are well formed which mean that the well formedness is preserved under reductions.The fourth, |T means that the routing table between the connecting routers is exchanged.The fifth and sixth, δ R 1 mean that routing tables (using distance vector routing methods) are updated dynamically with the help of synchronization of the global clock t k .
The rules (R-MATCH) and (R-MISMATCH) are tests for values.Here the initial cost of these reductions is also zero.The compositional rules are defined in the rule (R-CONTX) in Fig. 7 and are preserved under the static operator |.The other reduction rule (R-STRUCT) in Fig. 7 defines well formed configuration reduction upto system structural equivalence.Now we will demonstrate these rules with the help of an example.This example also shows the exclusive feature of this particular language regarding the novel rule is implemented for routing table updates.

V. EXAMPLE
In Fig. 1, let us assume that a system S is defined as The configuration Γ c S 1 |S 2 |S 3 |S 4 |S 5 does a reduction using the rule (R-OUT) where the process b! v@c at node a generates a message at global clock t k where t k = t k ,t k+1 ,t k+2 , .....The configuration reduces to another configuration of the form All the routing table will share its routing table with adjacent router.Now by using rule(R-TABLE-UPDATE), we get All the systems are well formed which are defined in definition 1.Now all the routing tables shall be exchanged with each other at a global clock t k .
Now route checks update for new information then routers will be calculated using Bellman-Ford algorithm and metric is updated, new entries are stored in the routing table.Thus routers will exchange routing information at t k+1 .
In this way R 2 t k+1 , R 3 t k+1 and R 5 t k+1 are updated and new routing tables are R 2 t k+1 , R 3 t k+1 and R 5 respectively at global clock t k+1 .Now the message hops towards the destination node b, the router table R 1 t k+1 may return either the adjacent router R 2 or the adjacent router R 3 as next hop on the communication path to node b at router R 5 .This may be formally expressed as The communication path is chosen by distance vector approach (shortest path).Suppose the routing table R 1 t k+1 returns R 3 as the next hop for reaching b.This essentially means that R 3 is on the path towards b which is hosted at router R 5 .Formally R 1 t k+1 (b) = R 3 and also we know that Therefore again using the rule (R-MSG-FWD) the configuration Similarly again all the tables are updated with new entries with an application of rule (R- Because R 5 t k+2 (b) = R 5 , the value v is delivered to the waiting process at b using the rule (R-COMM).Therefore the configuration Similarly all the tables are updated with new entries by rule (R-TABLE-UPDATE) at every global clock t k where t k = t k ,t k+1 ,t k+2 ...... Thus all the routers in a path of communication between R 1 and R 5 are updated dynamically.This method of routing table update is known as distance vector routing updates.
Previously the path for communication from a to b is via R 1 R 3 R 5 where the value propagating message hops two routers before delivering the value at the destination process which means paths are fixed.But now path are changed and new path for communication from a to b via Due to this all the routing tables are updated dynamically.Therefore paths are also changed and this ensures the best optimal path.This is more closer to the real distributed network.

VI. WELL FORMED CONFIGURATIONS
We define a set of conditions on well formed configurations and prove them in DR ϕ π .The well formedness is preserved under reductions.The conditions on well formed configurations are explained in definition 1 and DR ϕ π is ensured by the reduction semantics.
In definition 1, the concept of well formed configurations in DR ϕ π is inherited from [8] and the reduction rule ( 6) and ( 7) are used to illustrate that when (R-COMM) and (R-MSG-FWD) occurs, reduction rule (R-TABLE-UPDATE) is prohibited for given network and vice-versa.These configuration rules will prevent looping and congestion in the network.Hence it will reduce inconsistency in the network.
Definition 1: well formed configuration A configuration is called well formed if it satisfies the following conditions: for some S b) There exists a path In any well formed configuration Γ c S , for every pair of nodes n and m such that will not be used rule (R-COMM) and rule (R-MSG-FWD) .
Lemma.1.Suppose S ≡ T then Γ c S is well formed iff Γ c T is well formed.

Proof.(OUTLINE) By induction on definition of ≡.
Theorem 1.If Γ c S is well formed configuration and Γ c S −→ h Γ c S then Γ c S is also well formed.
Proof.(OUTLINE) By rule induction on inference of Γ c S −→ h Γ c S then Γ c S .It is easy to prove that each inference of Γ c S , using the reduction rules in Fig. 7, satisfies all the properties of a well formed configuration.

VII. EQUIVALENCE BETWEEN DR ϕ π AND D π
We proved that whenever a D π [2] system does a reduction there exists a corresponding well formed configuration in DR ϕ π which can do a number of reductions such that the residual are equivalent upto structural equivalence after φ abstraction of the residual system in DR ϕ π .Similarly for the converse, we proved that whenever a well formed configuration in DR ϕ π does a reduction there exists a corresponding D π system which either does nothing or does a reduction where residuals of both D π and DR Proposition 1.For any system term L in DR ϕ π such that φ (L) = H and H ≡ H implies that there exists some system term L in DR ϕ π such that φ (L ) = H and L ≡ L .Proof.We shall prove it by induction on various forms L can take and syntactic analysis of L such that φ (L) = H and H ≡ H . 1) Let us take a case when a system L, in DR |N Therefore when we write φ (L) = H for some term L in DR ϕ π and a D π system H , we can rearrange the terms in a D π systems H , by using various axioms of structural equivalence (SE-COM) and (SE-ID).Since Further by definition of φ we get, is clear that, the relation = in the definition φ is much stronger than ≡ i.e. φ is closed upto ≡.Therefore, by definition of ≡ given in Figure 3 it can be easily verified that φ (L ) = H and L ≡ L .
2) Let us take another case when a system L, in DR |N|M Therefore when we write φ (L) = H, for some term L in DR ϕ π and D π system H, we can rearrange the terms in a D π systems H , by using various axioms of structural equivalence (SE-COM),(SE-ASSOC) and (SE-ID).Since H is take various forms like, All the form of H is structurally equivalent to H, by using various axioms of structural equivalence.Since H Now we take system term L in DR Similarly other cases can be proved.Proposition 2. For any system term L in DR Proof.This can be proved by induction on the definition of L and ≡ as defined in Figure 2 and .By applying function φ above proposition can be derived fairly straightforward.
Proof.We shall prove it by rule induction on the inference of a D π system reduction H 1 −→ H 2 and syntactic analysis of L 1 such that φ (L 1 ) = H 1 where H 1 ≡ H 1 .There are various possibilities and we we will take each of them as follows: 1) Let us take a case where a D π system H 1 is the form By using the rule (R-H-COMM) where , such that φ (L 1 ) = H 1 can take various forms.We shall examine each of them as follows: a) We take the case where L 1 is structurally equivalent to a well formed system and therefore L 1 does a following reduction using rule (R-OUT) to become We use various standard axioms of structural equivalence rules and by definition of φ we know that ≡ H 2 Further as we know that Γ c L 1 is a well formed system and therefore according to the condition of well formed configuration By using axiom (S-MONOID-COM), we get ≡ H 2 By using rule (R-COMM), after reduction directly gives the form of H 2 .b) We can take another possibility of the form that a system L 1 in DR ϕ π can take.In a D π system H 1 is the form It is possible that M and N contain several output process terms.Theses output terms will have equivalent messages terms at L 1 which are originated at nodes l 1 and l 2 to carry arbitrary values to some channel at various nodes.Therefore L 1 may contain several messages which may be equivalent to one of the output terms in M or N after φ abstraction.
2) We will now consider another possibility when a D π system H 1 is the form n[ if v = v then P else Q] and does a reduction using (R-H-MATCH), we get Further with an application of the function φ on L 2 we can get φ (L 1 ) = n[P] ≡ H 2 3) We will now consider another possibility when a D π system H 1 is the form n[ if v 1 = v 2 then P else Q] and does a reduction using (R-H-MISMATCH), we get Further with an application of the function φ on L 2 we can get φ (L 1 ) = n[Q] ≡ H 2 4) Now we consider the cases of compositional reduction of a D π system.Let us assume that a D π system H 1 is of the form P 1 | P 2 .An application of the rule (R-H-CONTX) reduces H 1 to P 1 | P 2 .Let us assume that a system term in DR ϕ π , is of the form L 1 | L 2 such that φ (L 1 ) = P 1 and φ (L 2 ) = P 2 .We also assume that a configurations Γ c L 1 | L 2 and Γ c L 1 are well formed configurations.By induction we can say that Γ c L 1 −→ Γ c L 1 such that φ (L 1 ) = P 1 for some h, P 1 ≡ P 1 .Therefore using the rule (R-CONTX), we can conclude that Further we already know that P 1 ≡ P 1 therefore from the axioms of structural equivalence , we can conclude that P 1 | P 2 ≡ H 2 .Same as H 1 is the form of P 2 | P 1 .We can proved similarly.5) Let us now consider the last case when a D π system H 1 does a reduction to H 2 using the rule (R-H-STRUCT) because H 1 −→ H 2 where H 1 ≡ H 1 and H 2 ≡ H 2 .Let us assume that for a system L 1 in DR ϕ π , φ (L 1 ) = H 1 .We also assume that Γ c L 1 is a well formed configuration.Since H 1 ≡ H 1 therefore using proposition 1. we can say that there exists a L 1 such that φ (L 1 ) = H 1 and L ≡ L .Further using lemma.1.We know that Γ c L 1 is a well formed.Now by induction we can say H 1 −→ H 2 implies Γ c L 1 −→ Γ c L 1 for some L 1 and h such that φ (L 1 ) = H 2 for some H 2 such that H 2 ≡ H 2 .We already know that L 1 ≡ L 1 therefore with an application of rule (R-STRUCT).We can say that Γ c L 1 * −→ Γ c L 1 .We know that φ (L 1 ) = H 2 and since Proof.By induction on the inference of reduction Γ c L 1 −→ Γ c L 1 of well formed configurations in DR ϕ π and syntactic analysis of φ (L 1 ) = H 1 .There are various possibilities and we we will take each of them as follows: 1) Let us take a case when a system L 1 , in DR We consider a case when using the rule (R-MSG-FWD), the well formed configuration ) Now we take another case where a system term The well formed configuration Γ c L 1 reduces using the rule (R-MISMATCH) to another well formed configuration Γ c R t k n[Q] and by definition of φ we know that φ for some h where L 1 ≡ L 1 and L 2 ≡ L 2 .Let us assume that a D π system H 1 is such that φ (L 1 ) = H 1 .As L 1 ≡ L 1 therefore from proposition 2, we know that φ (L 1 ) ≡ φ (L 1 ).Now by induction we know that Γ c H 1 −→ Γ c H 2 for some h the D π system term H 2 such that either φ (L 2 ) ≡ H 2 or φ (L 2 ) ≡ H 1 .Since it is known that L 2 ≡ L 2 and using proposition 2 we know that φ (L 2 ) ≡ φ (L 2 ) therefore either φ (L 2 ) ≡ H 2 or φ (L 2 ) ≡ H 1 .
Theorem 2. In DR ϕ π , if a well formed configuration Γ c L 1 does a reduction Γ c L 1 −→ Γ c L 2 and φ (L 1 ) = H 1 where H 1 is a D π system if and only if either there exists a D π system H 2 such that H 1 −→ H 2 and φ (L 2 ) ≡ H 2 or φ (L 2 ) ≡ H 1 .

VIII. CONCLUSION
We described the syntax and reduction semantics for the calculus DR ϕ π that gives a realistic model of distributed network with incorporation of dynamic updation in routing table.We have explained an example to demonstrate reduction rules and also demonstrate that how routing table is updated across the network by using distance vector routing updates.This equivalence has been proved with the well known distributed π-calculus, D π after abstracting away the unnecessary details from DR ϕ π .Now we have proved that both DR ϕ π and D π systems are reduction equivalent after abstracting away the details of routers and paths from DR ϕ π .This calculus implemented routing table updates via distance vector routing methods and included the exclusive feature of this particular calculus with a novel notation (←→) to depict the exchange of routing tables at global time t = t k .Thus all the routing tables are updated dynamically due to this paths are also changed and ensure the best optimal path.This is more close to the actual real distributed network.
In DR ϕ π , the δ function used in the calculus is abstract function which does not allow a real value in the network.Also the calculus does not support dynamic node creation which can be a possible future work for further research.In this paper, we have shown that specification coincides its implementation in our next work will justify the calculus using bisimulation based proof technique.

Fig. 1 .
Fig. 1.A simple distributed with routers and nodes

ϕπ
systems are matched upto structural equivalence.Since D π is a specification for DR ϕ π therefore we have shown that DR ϕ π conforms to its specification.Our model is also closer to real distributed networks.we define a function to abstract away the details of routers and paths from a DR ϕ π term state theorems about the equivalence of DR ϕ π with D π .Definition 2: We define a function φ : LSY → HSY , where LSY and HSY are sets of DR ϕ π system terms and D π systems respectively, as follows: of the form R t k n[m! (v@c) |P]|N .A well formed configuration Γ c L 1 does a reduction to Γ c [R] M 0 sg (n, m, v@c) R t k n[P]|N using rule (R-OUT) in fig.7, Let a D π system H 1 is of the form n[m! (v@c) |P]|N and by definition of φ we know that φ

7 )
Now let us take compositional cases.First suppose a system in in DR ϕ π , is of the form L 1 | L 2 and a D π system is of the formH 1 | H 2 where φ (L 1 ) = H 1 and φ (L 2 ) = H 2 .By definition of the φ we can clearly see that φ (L 1 | L 2 ) = H 1 | H 2 .Now take the case when the well formed configuration in DR ϕ π , Γ c L 1 | L 2 does a reduction using the rule (R-CONTX) to another well formed configuration Γ c L 1 | L 2 , the well formed configuration Γ c L 1 does a reduction to Γ c L 1 −→ Γ c L 1 for some h.By induction we know that a) either H 1 −→ H 1 such that φ (L 1 ) = H 1 b) or φ (L 1 ) = H 1 From the reduction rule reduction rule (R-H-CONTX), the D π system H 1 | H 2 can reduce to H 1 | H 2 .We already know that either φ (L 1 ) = H 1 or φ (L 1 ) = H 1 , therefore by definition of φ we know that, either φ (L 1 | L 2 ) ≡ H 1 | H 2 or φ (L 1 | L 2 ) ≡ H 1 | H 2 .The other case in rule (R-CONTX) is exactly similar.8) let us take second compositional case where a well formed configuration in DR ϕ π , Γ c L 1 does a reduction to Γ c L 2 using the rule (R-STRUCT)becauseΓ c L 1 −→ Γ c L 2 instinctively represent the same systems where the nodes M 1 and M 2 at router R run in parallel at global clock t k and the There are two premises the first (R 1 , R 2 ) ∈ Γ c means that the routers R 1 and R 2 are directly connected or R 2 is a neighbor of R 1 .The second one, R 1 t k (m) = R 2 means that m belongs to the domain of the routing table at R 1 at global clock t k and the function R 1 t k returns R 2 as the next hop towards the destination node m.
TABLE-UPDATE) at global clock t k+2 .Further suppose R 4 t k+2 (b) = R 5 and message P|Q]|N .The well formed configuration Γ c L 1 does a reduction using the rule (R-COMM) to another well formed configurationΓ c R t k m[P{v/x}|Q]|N .Let us assume that L 2 = R t k m[P{v/x}|Q]|N .Clearly φ (L 1 ) = n [m! v@c ] |m[P{v/x}|Q]|N By using the rule (R-H-COMM), The D π system n [m! v@c ] |m[P{v/x}|Q]|N can reduce to m[P{v/x}|Q]|n[ε]|N which is structurally equivalent to m[P{v/x}|Q]|N ≡ H 1 .We know that φ (L 2 ) = R t k n[ if v = v then P else Q] .The well formed configuration Γ c L 1 reduces using the rule (R-MATCH) to another well formed configuration Γ c R t k n[P] and by definition of φ we know that ϕ π , is of the form Γ c