P-chains bind a behavior (chain description) to a set of
processes and describe concurrent execution of a set of chains. The
syntax for p-chain is as follows:
<pch-name> = <ch-desc> <onword> <set-desc>;
<ch-desc> = <chain-name> | <chain-expr>;
<onword> = ONALL | ONSOME;
<set-desc> = <set-name>;
The following p-chain definition
pch comm = msg onall procset;binds the chain description msg to the process set named procset.
There are two distinct patterns that a p-chain can match - one signified by the keyword onall which said the chain has to match on all processes in the given set. The other keyword is onsome that signals that the p-chain needs to match on atleast one process in the given set. This helps us model data dependent communication pattern, where the number and identity of processes taking part in a canonical behavior cannot be known beforehand.