probabilistic verification of gbn group members: lin huang(lh2647), yuechen qin(yq2158), xi...
TRANSCRIPT
Probabilistic Verification of GBN
Group Members:
Lin Huang(lh2647), Yuechen Qin(yq2158), Xi Chen(xc2257), Runxi Zhou(rz2286), Shuang Zhang(sz2426)
04/08/2014
Probabilistic Verification of GBN
Introduction
Test Algorithm
Discussion
Introduction
Probabilistic Verification of GBN ( Applied Tests ) For any possible state in the GBN protocol, we need to
generate all the possible next state. For each of the possible next state, call the step above
recursively to check if it could successfully end up at a stop point.
If the protocol is right, the verification would end within a finite amount of time.
Test Algorithm
Components of States
Assumption
Algorithm Modules Stack Sender Receiver Channel(Forward, Reverse)
Implementation
Optimization
Test Algorithm : Components of States
<S, R, Fc, Rc, prob, action, num, father, son> S: sender state, range R: receiver state, range Fc: forward channel Rc: reverse channel Prob: low probability action: service sequence num: indices of messages father: predecessor of the current state son: successor of the current state
Test Algorithm : Assumption
At most 8 packets can be simultaneously in the forward channel
At most 4 packets can be simultaneously in the reverse channel
Channel would lose 1 packet at a time; Sender and Receiver process 1 packet at a time.
Given Window size of 4, for both sender and receiver, states that have the same value of S(or R) mod 4 are considered to be identical
Test Algorithm : Assumption
Time out Fc == E & Rc == E
Stopping Points S > 4 & R > 4
True stopping points for the protocol:
S mod 4 ==1; R mod 4 == 1; Fc == E; Rc == E; prob 4 The appearance of a state that has already been in the
stack.
Test Algorithm : Algorithm Modules
Stack Push
Check if the state already existed
in the stack Check if the prob == 4 Bubble sort to ensure that the
stack locates the states with
monotonically increasing low
probability Pop
Pop the state on top of the stack
Test Algorithm : Algorithm Modules
Sender Input the current state <S, R, Fc, Rc, prob, action, num,
father, son> to the sender function ; Let base = S; If Fc == E & Rc == E, put Msg[base] ~ Msg[base + 3] in
Fc Extract the1st packet in Rc, name it ack
If ack < base, do nothing If ack == base, put Msg[base + 4] in Fc, base ++ If ack > base, put Msg[base + 4] ~ Msg[ack + 4] in Fc,
base = ack +1 Return the new state
Test Algorithm : Algorithm Modules
Receiver Input the current state <S, R, Fc, Rc, prob, action, num,
father, son> to the receiver function ; Let ExpectedNum = R;
If Fc == E, do nothing; Extract 1st packet in Fc, name it Msg
If Msg == ExpectedNum, put Ack[ExpectedNum] in Rc If Msg != ExpectedNum, put Ack[ExpectedNum - 1] in
Rc Return the new state
Test Algorithm : Algorithm Modules
Channel Functionality
Generate all possible error situation (1 packet lost), low probability increases by 1 ( prob ++ ) ;
Push the generated state into the stack.
Test Algorithm : Implementation Problem
Assume the current state <S, R, Fc, Rc> is <1, 2, 234, 1>, what is the next state? <2, 2, 2345, E>: ack1 arrives at sender first; <1, 3, 34, 12>: msg2 arrives at receiver first; <1, 4, 4, 123>: msg2 and msg3 are faster than ack1; <1, 5, E, 1234>: msg2, msg3 and msg4 are all faster than ack1;
Solution For a certain state, input it into three functions, which are sender, receiver,
channel; Output
State sender: sender gets ack first; state receiver: receiver gets msg first; state channel: all possible packet-lost situation
Test Algorithm : Implementation
Example
Test Algorithm : Implementation
Steps Push the initial state into the stack; Check if stack is empty, if so, end; if not, continue; Pop the top state in the stack; Put the popped state into channel; Put the popped state into sender and receiver, get the
new state S1 and S2 accordingly; if S1 or S2 is different from the popped state, push it into the stack;
Go back to the 2nd step
Test Algorithm : Optimization
Problem (a): push E child of D into the stack, there’s already a E
node in the stack (b): push E child of C into the stack, there’s no E node in
the stack (c): E can be produced by another E
Test Algorithm : Optimization
Solution Use an array to store all the states(/nodes) that have been
in the stack Check if the popped state is already in the array:
if so, check if this identical state in the array is one of the predecessor of the popped state; if so, push it into the stack, otherwise discard;
If not, push it into the stack
Results # of steps: 15,000+ 400+
Discussion
Here the protocol failure is only possible when there are four packet losses happening continuously. Although this state is wiped out from the simulation due to its low probability, it may still happen, leading to the deadlock. Theoretically it may happen twice continuously so that the average sequence length is 0. However, only when the length is large enough, the probability can be larger than ”sufficiently small”, where we define as .
We mention that the time interval is the same as length interval, since the source xmits message once per second.
Discussion
Calculation of the probabilistic minimal interval The failure rate
Here we make
And we can find out that
Thank you for attention!
Questions are warmly welcomed!