Statement Composition - The HAC Language
Description: The HAC Language

Next: CHP Skip, Previous: CHP Wait, Up: CHP Statements

#### 14.3.4 Composition

CHP statements may be composed either sequentially or concurrently.

- CHP-sequence : CHP-stmt `;` CHP-stmt ...
- CHP-concurrence : CHP-stmt `,` CHP-stmt ...

Concurrent composition has higher precedence than sequential composition, so X,Y;Z is interpreted as (X,Y);Z. However, one may explictly parenthesize X,(Y;Z).

Execution of concurrent branches behaves like a fork and join (barrier). Upon initial execution, each branch is begun concurently, but the execution is not completely until all branches have reached the join-barrier. (This can be easily implemented as a decrementing barrier counter.)