[prev in list] [next in list] [prev in thread] [next in thread]
List: e-lang
Subject: Re: [e-lang] Taming of Pict
From: Matej Kosik <kosik () fiit ! stuba ! sk>
Date: 2008-02-09 19:34:27
Message-ID: 47AE0043.5020104 () fiit ! stuba ! sk
[Download RAW message or body]
-----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-----
_______________________________________________
e-lang mailing list
e-lang@mail.eros-os.org
http://www.eros-os.org/mailman/listinfo/e-lang
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic