Mercurial > hg > Members > nobuyasu > Spin
view promela/alt2.pml @ 0:86e67be8bc5f draft
add some files
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 29 Jun 2012 01:14:43 +0900 |
parents | |
children |
line wrap: on
line source
// Multiple Process to run alternately mtype = { F, S}; mtype turn = F; active [2] proctype Producer() { do :: (turn == F) -> printf("Producer-%d\n",_pid); turn = S; od } active [2] proctype Consumer() { do :: (turn == S) -> printf("Consumer-%d\n",_pid); turn = F; od }