
# process[1]:
event[1]: receive: *[{
  foo.index?(foo.y);
  ...
}]
event[2]: send: *[{
  ...;
  foo.out!(foo.x[(0+foo.x[foo.y])%2])
}]

# process[2]:
event[3]: receive: *[{
  bar.index?(bar.y);
  ...
}]
event[4]: send: *[{
  ...;
  bar.out!(bar.x[(1+bar.x[bar.y])%2])
}]
