Re: Taming of Pict

Matej Kosik <[email protected]>
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Toby Murray wrote:
> 
> Some quick questions on Pict:
> 
>  - Pict channels are typed. Say one has a channel that is typed to carry
> values of type T. Can one declare this channel so that it is read-only
> (ie. can only be used to read values of type T) or write only (can only
> be used to write values of type T).
>  - If one has a read-write channel (can be read and written to), can one
> get a read-only capability to this channel, and another write-only
> capability to this same channel? Then one could hand the read-only
> capability to one module and the write-only capability to a second
> module, allowing the second to write values to the first, but not vice
> versa.

The Pict tutorial contained some text about subtyping. I have changed it. It now shows a simple
producer-consumer scenario where:
- - The parent process creates a channel
  ( by parenthood rule it thus sees both its ends: its "input end" as well as its "output end")
- - The parent defines two process
  - a consumer process
  - a producer process
  None of them initially sees any of the two ends of the channel
- - The parent process "by introduction" gives the consumer the permission to read from the channel.
- - The parent process "by introduction" gives the producer the permission to write to the channel.

So, hopefully, it aswers the question you asked.

You can read the text here:
http://altair.sk/mediawiki/upload/2/21/Tutorial.pdf
page 29 (Chapter 3)

Subtyping enables us to drop permissions (and authority). It never leads to escalating permissions
(and authority).

Best regards
- --
mk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHrgBDL+CaXfJI/hgRAgkuAKDU0re7alofzgdYXIVaA3Yq1fo87ACcCouy
f6pxC11Tx/9+Wc5RJOoslo8=
=w3W4
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.