Research Article

Towards Light-Weight Probabilistic Model Checking

Algorithm 2

dtmc
const  int  SEARCHING  =  0;
const  int  HOMING  =  1;
const  int  GRABBING  =  2;
const  int  DEPOSITING  =  3;
const  int  RESTING  =  4;
module  foraging
  s  :  [0 4]  init  0;
  s  =  SEARCHING  ->  0.5  :(s  =  s)  +  0.2  :  (s  =  HOMING)  +  0.3  :  (s  =  GRABBING);
  s  =  HOMING  ->  0.4  :  (s  =  s)  +  0.6  :  (s  =  RESTING);
  s  =  GRABBING  ->  0.2  :  (s  =  s)  +  0.5  :  (s  =  SEARCHING)  +  0.2  :  (s  =  HOMING)  
+  0.1  :  (s  =  DEPOSITING);
  s  =  DEPOSITING  ->  0.4  :  (s  =  s)  +  0.6  :  (s  =  RESTING);
  s  =  RESTING  ->  0.5  :  (s=  s)  +  0.5  :  (s  =  SEARCHING);
endmodule