OEP

164

Title

Mobile channels

Summary

Allow ends of individual channels to be mobile

Owner

Peter Welch <P.H.Welch@kent.ac.uk>

Status

Proposed

Date-Proposed

2007-12-17

Last-Modified

2008-01-14

Keywords

language mobiles channels

Just as a static channel can be declared with:

CHAN INT c:

we could allow mobile channel ends to be declared with a similar syntax:

MOBILE CHAN INT? c.read:
MOBILE CHAN INT! c.write:
c.read, c.write := MOBILE CHAN INT

or perhaps just:

INITIAL MOBILE CHAN INT c.read?, c.write! IS MOBILE CHAN INT:

A syntax in which an entire channel (rather than the two ends) could be declared would also be possible:

MOBILE CHAN INT c:

Peter pointed out that in that case c? and c! could be set to refer to the ends of two different channels, which could lead to confusion. Neil suggested that the compiler could restrict channels declared in that way so that c? and c! could be assigned from, but not assigned to, which would avoid the unwanted behaviour. The same approach could be applied to channel bundles:

MOBILE SOME.CT ct:
SEQ
  FORK server (ct?)
  ...

OEP/164 (last edited 2012-11-08 23:20:47 by phw)