CSP internal choice 2026-10-31
The process may internally choose either branch, independently of the environment's offered CSP events. Consequently it can have more CSP stable failures than the corresponding CSP external choice, despite having the same CSP traces.
CSP step law 2026-10-31
An algebraic expansion listing the initially possible CSP events and their continuations. It translates operational transition cases into CSP external choice expressions.
Let . In this CSP alphabetized parallel composition, require both participants, belongs only to the left participant and only to the right participant. Expand the reachable states using CSP prefixing and CSP external choice:
For example, after the synchronized , the left participant is back at but the right participant is at . The left participant's proposed is blocked until the right participant has performed . Similarly, after , only the synchronized is possible. Thus there is no extra interleaving to include.
Eliminating gives the guarded equation
Consequently choose the sequential CSP process
The unique fixed point principle first establishes .
Now let . The CSP exception operator follows its left operand until that operand performs , includes this in the visible behaviour, and then switches to its right operand. Applying its CSP step law to the four-state expansion yields
The switch occurs exactly where the ordinary execution already returns to . Therefore . The answer uses neither a CSP exception operator nor a CSP parallel composition operator, and the argument gives equality in all three standard CSP semantic models.
Use a chain of identical storage cells, each retaining the first value it sees and passing later values to the next cell. On the return journey it passes the next cell's reversed output before emitting its own retained value. This turns the chain into a distributed LIFO stack.
Here is one cell template. Its ports carry incoming values towards the tail; carry returning values towards the front. Each port carries values in , with the sentinel value outside :
An input such as abbreviates an indexed CSP external choice over the corresponding CSP events. An output is the CSP prefixing action . There is no extra controller process.
For , take copies of this same template. Introduce channels for and apply port CSP event renaming to copy , for , as follows:
At the front put and . Adjacent cells synchronize on every shared or CSP event. The two tail channels are sentinel-only: and are local tail CSP events, with no other participant required. Disable all for . Formally, use a partial relational CSP event renaming for the last copy, omitting the pairs for its with ; an unmapped transition is blocked. This explicitly prevents a fictitious tail from generating data.
Let be the resulting port-renamed cell and its visible alphabet. With consisting of the internal link CSP events, including the two tail CSP events, the answer is
Here the indexed operator is CSP alphabetized parallel composition: each CSP event is synchronized by all cells whose alphabets contain it. There are exactly storage-cell processes; port wiring and the sentinel-only tail adapt their interfaces, without adding a helper process. The local tail CSP events are hidden, as are all inter-cell communications.
To see correctness, after inputs have propagated, cell retains . The input sentinel value propagates to the tail. The last cell performs its two local tail CSP events, then returns . Inductively, if the suffix after cell returns , cell relays those values, replaces the final sentinel value by , and stops. Hence the external output is
and starts only after . Shared links provide synchronization rather than an assumption that all cells take steps simultaneously. For the degenerate known-empty input, no storage is needed: the interface is simply .
Suppose the operands are initially stable and written in CSP external choice normal form,
The CSP step law is
An empty indexed CSP external choice denotes . A label appearing in both of the first two lines must retain both continuations: after that common label the result is the CSP internal choice between the continuations. A label in appears only in the third line and only if both operands offer it. These are exactly the three visible-transition rules from part (d); the two CSP internal action rules handle operands that are not initially stable.
As a check, for the paper's example the initial shared leads to . Its expansion is
which recovers the displayed example after prefixing by .
Use the intended nontrivial ring network, with , and let . A CSP event is one synchronized transfer from the predecessor to receiver , rather than a separate enqueue and dequeue. Let be the Boolean saying whether node is active. For , define
Initially the node is active:
The CSP external choice in always offers both possible incoming message values as well as the permitted status change. Thus a decision to change status cannot internally withdraw readiness to receive a message. When the first message arrives, an active node forces its forwarded bit to false; an idle node preserves the bit. The status is retained until the second-round message has been forwarded. Neither the forwarding prefix nor offers status-change events, enforcing the protocol's freeze. On a false second-round message the node resumes its previous status; on a true one it forwards the bit before announcing shutdown.
The coordinator has the following states:
Thus
The coordinator starts a round only while idle and sends true to node . After the first returning message it sends exactly the received bit on the second round, without modifying it. The second return is required before its own shutdown; if the attempt failed it remains idle and may try again or become active. It offers no status-change event between starting and finishing the protocol. The two round states are essential: the first means that the first survey succeeded, whereas the next one acknowledges the circulating decision.
As in part (a), the choices between observable events are expressed using CSP external choice. Execution is nondeterministic, but there is no hidden irrevocable decision to become active while refusing a message. This keeps the readiness required by the question.
The trigger is specifically the first-round reception . A CSP trace restriction cannot by itself guarantee progress after this event, because a finite prefix is compatible with both completion and an indefinitely delayed completion. We need to exclude both a stable refusal to continue and CSP divergence, so use the CSP failures-divergences model.
Here is an explicit conditional check that imposes no progress requirement before the trigger. Build the reachable labelled transition system of and observe coordinator rounds with a two-phase monitor: it starts in the first-return phase and toggles on each . Collect the set of system derivatives immediately after a true return in the first-return phase. This distinguishes the survey's return from the decision's return, without changing any system transitions. For fixed finite , the set is finite. Define
Here denotes CSP internal choice. Perform the single CSP refinement check
Equivalently, check each post-trigger derivative individually against after the displayed CSP hiding. If the trigger is unreachable, the conditional property is vacuously true and there is no post-trigger check to perform.
The CSP internal choice in deliberately permits any next shutdown, including an implementation that offers only one of the remaining shutdowns. It forbids a stable refusal of all remaining shutdowns, has no CSP divergence, and permits at most distinct shutdowns before . A CSP external choice over all remaining nodes would instead demand simultaneous readiness for every remaining shutdown and would unnecessarily reject the protocol's sequential delivery.
After hiding all other actions, endless internal work becomes a CSP divergence and a blocked unfinished state becomes a forbidden CSP stable failure. Since there are only possible shutdown actions and duplicates are excluded by CSP traces, every maximal progressing execution must complete all . As usual for untimed CSP, this progress claim assumes the environment allows shutdown signals to occur; it supplies no wall-clock deadline. No fairness assumption requiring the coordinator eventually to initiate a survey has been smuggled into this conditional check.
For the defined system the check succeeds. Immediately after the trigger all statuses are idle and frozen. The only message work left is the second round: node sends the decision to node , nodes through forward it, and node receives it. These are exactly more message transfers. Each node then has its one shutdown action, and the message can advance even while an earlier node's shutdown is pending. Thus there are no remaining status changes, no message cycle, and no unfinished global state in which every action is blocked. The measure
starts at , is nonnegative, and decreases on every subsequent transition. This excludes any hidden infinite run; before all shutdowns finish there is either an enabled message transfer or an enabled shutdown signal. The operational argument proves the conditional claim for every ; finite state enumeration is only a supporting check.