# Re: many-to-one channel

Hi Alistair,


For lack of a more authoritative many-to-one channel implementation, here is the two-word one I thought of; N being NotProcess.p, R being ProcessInputting, W[i] being ProcessOutputting[i] of a FIFO sequence which gets consumed. Possible states are (N,N), (R,N), and (W[j],W[j +k]). W[j] equals W[j+k] if and only if k=0, and the queue from W[j] to W[j+k] is a subset of the processes for which the channel is simultaneously declared. An unconditional channel input goes from (N,N) to (R,N), from (W[j],W[j]) to (N,N), or from (W[j],W[j+k]) to (W[j+1],W[j+k]) if k>0. An input ALT enable goes from (N,N) to (R,N) and Waiting.p, or from (W[j],W[j+k]) to (W[j],W[j+k]) and Ready.p. An output goes from (R,N) and Waiting.p to (W[j],W[j]) and Ready.p, and otherwise from (N,N) to (W[j],W[j]), from (R,N) (unconditional input) to (N,N), or from (W[j],W[j+k]) to (W[j],W[j+k+1]). The queue between W[j] and W[j+k] is a linked list in the W[i] process workspaces much like a process queue.


I was hoping to find out if this was equivalent to earlier work on the subject.

Larry

On Oct 17, 2008, at 6:30 PM, Larry Dickson wrote:


Hi Alistair,


I guess I should have said "implementation" ... analogous to an ordinary (1-1) channel being a single-word that takes exactly one of the values NotProcess.p or ProcessInputting or ProcessOutputting. Five of the six conceivable state moves are possible (ProcessOutputting to ProcessInputting is not). The early ALT input enabling branch leads to the case where ProcessInputting goes later to ProcessOutputting.


I have to admit that although I always talked about CSP, I never studied its formalism... I seem to remember someone described an implementation of a many-to-one channel using a simple state machine.

Larry

On Oct 16, 2008, at 11:35 PM, McEwan, Dr A.A. wrote:


Larry,


if by "definition" you mean a piece of CSP to describe the situation, then the interleaving operator (|||) probably covers the situation you are thinking of:

P \defs
(Q ||| R) [| {| a |} |] S


In the above process, if we assume {a} \in Q\cap R\cap S (ie all processed have "a" in their alphabet) then S will synchronise with either Q or R on a, but never both at the same time, and Q and R will never synchronise together on a.


This therefore is "many to one", and the LHS of the parallel operator could contain as many processes as you wish.

Hope this helps,

Alistair

________________________________________

From: Mailing_List_Robot [sympa@xxxxxxxxxx] On Behalf Of Larry Dickson [tjoccam@xxxxxxxxxxx]
Sent: 17 October 2008 01:16
To: P.H.Welch@xxxxxxxxxx
Cc: occam-com@xxxxxxxxxx
Subject: many-to-one channel

Hi Peter and all,

Can you point me to a "standard" definition of a many-output-to-one-
input channel? The subject came up in a discussion I am having with
the Stackless Python people. I cobbled up a two-word version but

cannot remember if it was the standard way. The input needs to be able
to do ALTs, which I (subject to correction) don't think the many-to-
many can do.

Larry