Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
language:langs:chp [2021/12/29 15:35] rajit [Basic statements] |
language:langs:chp [2021/12/31 19:18] rajit |
||
---|---|---|---|
Line 126: | Line 126: | ||
</ | </ | ||
A do-while loop can have only one guard. This program executes '' | A do-while loop can have only one guard. This program executes '' | ||
+ | |||
+ | Loop guards can only use local variables. Hence, it is an error if a variable appearing in a loop guard is either (i) a global variable; or (ii) accessible via the port list of the process; or (iii) involves a channel probe. This ensures that loop guards cannot include any shared variables. | ||
==== Channels in expressions ==== | ==== Channels in expressions ==== | ||
Line 217: | Line 219: | ||
Essentially every channel variable '' | Essentially every channel variable '' | ||
+ | ==== Exchange channels ==== | ||
+ | |||
+ | Exchange channels are those where data is exchanged between sender and receiver, and this is indicated directly in the channel type. The syntax for exchange channels is: | ||
+ | * '' | ||
+ | * '' | ||
+ | In this case, we assume that the exchange send will initiate the operation, and hence only the exchange receive can be probed. This doesn' | ||
+ | ==== Split synchronization ==== | ||
+ | Four-phase handshake channels involve two synchronizations. If you need to make this explicit in the CHP, the '' | ||