//Insert declarations of global clocks, variables, constants and channels.
const int N = 4; // # Girls
chan call, reply;
bool secrets1[N] = {true,false,false,false};
bool secrets2[N] = {false,true,false,false};
bool secrets3[N] = {false,false,true,false};
bool secrets4[N] = {false,false,false,true};
bool global_secrets[N];
clock time;Girlbool known_secrets[N]//Insert local declarations of clocks, variables and constants.
clock x;
bool knows_all = false;
bool knows_42 () {
int i;
for(i=0; i<N; i++){
if (known_secrets[i] == false) {
return false;
}
}
return true;
}
void send_secrets(){
int i = 0;
for(i=0; i<N; i++){
global_secrets[i] = known_secrets[i];
}
}
void get_secrets() {
int i = 0;
for(i=0; i<N; i++) {
known_secrets[i] |= global_secrets[i];
}
knows_all = knows_42();
}//Insert process assignments.
Girl1 = Girl(secrets1);
Girl2 = Girl(secrets2);
Girl3 = Girl(secrets3);
Girl4 = Girl(secrets4);//Edit system definition.
system Girl1, Girl2, Girl3, Girl4;