[cap-talk] Petnames versus E-order with ocaps
David-Sarah Hopwood
david.hopwood at industrial-designers.co.uk
Wed Jan 28 20:11:15 EST 2009
Karp, Alan H wrote:
> E-order guarantees the following property. If Alice sends a message to Carol,
> and then Alice sends a message to Bob containing a reference to Carol,
You mean "the same reference to Carol".
> and Bob uses that reference to send a message to Carol, Carol will receive
> the message from Bob after she receives the message from Alice.
> (Did I get that right, MarkM?)
To avoid mistakes I suggest explicitly labelling the references, like this:
If alice sends a message to carol on reference C, and then alice sends a
message to bob containing C, and bob uses C to send a message to carol,
carol will receive the message from bob after she receives the message
from alice.
(I prefer using lowercase names for subjects.)
> That ordering is not guaranteed if Bob sends a message to Carol using a
> reference not obtained from Alice.
Right.
> A petname is a one-to-one mapping between an object reference and a name binding.
That's a bit imprecise. I use the following definitions:
Petname: an identifier that is bound in a petnamespace.
Petnamespace: a one-to-one mapping between petnames and subjects.
Petname binding: a binding in a petnamespace -- that is, an ordered pair
(petname, subject).
Note that the mapping is not to a reference, it is to a subject.
(I think it is clearer to say "subject" than "object" here, but I
suppose that's a matter of taste.)
> If Bob has a reference to Carol that he calls foo, a reference to
> Carol that Bob receives from Alice will also be denoted foo.
If "foo" is the petname for carol in a given petnamespace, then
any reference to carol will map back to "foo". I don't think this
is a problem, since there is no suggestion that petnames should
replace lambda names as the only way to denote references.
> Here's where the versus comes in. Bob would like to ensure that a
> message he sends to Carol arrives after any messages Alice sent to
> Carol before she sent Bob a reference to Carol. In a petname system,
> he can't do that if he had a reference to Carol before Alice sent him one.
That's not correct.
Use of a petname system does not mean that a subject (e.g. bob),
cannot hold multiple distinct references to another subject
(e.g. carol). It only means that the distinction between references
will be lost when they are added to a petnamespace.
If bob wants to send a message on the reference that alice gave it,
why would bob map the reference back to a petname, then forward to
a potentially different reference? That would be unnecessarily
complex.
If bob is a script written by some human Bob, then the scripting
language will still presumably support lambda names as well as
petnames.
If Bob is using direct manipulation in a GUI, then he can drag the
depiction of the reference C from alice's message into the 'To' field
of the message he is sending, and that should preserve the message
ordering even if C is depicted as having the petname "foo".
If Bob retypes "foo" into the 'To' field, then the system does not
have enough information to preserve the ordering. Is that important?
I think probably not.
--
David-Sarah Hopwood ⚥
More information about the cap-talk
mailing list