Research Article

Formal Modeling and Verification for MVB

Listing 3

PROMELA codes of the asynchronous bus.
active proctype Asynchronous_Bus ( ) {
atomic  {
if
   ::BA_0. out_count > 0 ->…/*receive a frame from BA_0*/
   ::else ->skip;
fi;
if
   ::!recv0 && !recv1 && !recv2 ->skip;
   ::!recv0 && !recv1 && !recv2 ->…/*frame loss*/
   ::else -> skip;
fi;
if
   ::recv0 == true; /*receive a frame from BA_0*/
     if
     ::true -> /*change the frame*/
     ::true -> /*frame loss*/
     ::true -> skip;
    fi;
     …/*broadcast the frame*/
fi;
}