OEP

141

Title

Channel-end pairs

Summary

More concise syntax for representing pairs of channel ends.

Owner

Carl Ritson

Status

Proposed

Date-Proposed

2006-03-14

Keywords

language channel-types

The ? and ! characters can currently be used to decorate channel names to indicate the communication direction they are being used in, and are important when declaring channel type ends:

MY.CT! client:
MY.CT? server:
SEQ
  client, server := MOBILE MY.CT
  do.stuff (client, server)

One way to make this more succinct would be to make variables of the channel type contain both ends, and use the ? and ! markers to indicate which one you want:

MY.CT ct:
SEQ
  ct := MOBILE MY.CT
  do.stuff (ct!, ct?)
  ...
  MY.CT! client!:
  SEQ
    client! := ct!

OEP/141 (last edited 2007-09-27 01:07:54 by ats1)