Research Article

Dynamic and Quantitative Method of Analyzing Service Consistency Evolution Based on Extended Hierarchical Finite State Automata

Algorithm 2

Pseudocode of SCEA- algorithm.
(1) Initialize , , ;
(2) NumID,  NumMI,  NumSC0; /* Counts of ’s input events are initialized */
(3) for   to     do
(4)  (1, 1, 1); /* Initialize the state array of   */
(5) endfor
(6) Select 2–4 stochastically which are assembled into ;
(7) for   to   do
(8)  ; // Initialize the ’s state array
(9) endfor
(10)for ( ;   ++;   ) do
(11) update by Algorithm 1;
(12) for each     do
(13)   Get current state ;
(14)   Find the rules   at ;
(15)   Select according to its event probability;
(16)   Execute operation   ; /* Transition happens */
(17)   if     then
(18)   NumID++;/* Add the number of event   */
(19)   else  
(20)  NumMI++;/* Count the number of event   */
(21)   else  
(22)  NumSC++; /* Add the number of event   */
(23)   endif
(24)  endfor
(25)  endfor