OEP

129

Title

Variables of any channel type

Summary

Allow MOBILE.CHAN variables to be declared that may hold any channel type.

Owner

Fred Barnes <F.R.M.Barnes@kent.ac.uk>

Status

Accepted

Date-Accepted

2005-03-20

Keywords

language mobiles channel-types

The support for channels of any channel type has now been extended to support variables and parameters of the "MOBILE.CHAN" type. Variables of this type (that can be specialised in the usual way with "SHARED" and/or a direction-specifier) may be communicated on matching channels, or assigned to each other. Furthermore, a regular mobile-channel-end may be assigned to a "MOBILE.CHAN" and visa-versa (with an additional run-time check in the latter case to ensure the correct type is present). For example:

CHAN TYPE FOO
  MOBILE RECORD
    CHAN INT c?:
:

MOBILE.CHAN x, y:
FOO! f.c:
SEQ
  ...  acquire f.c
  x := f.c
  y := x
  f.c := y

OEP/129 (last edited 2007-09-27 00:46:39 by ats1)