Sameness

From Erights

(Difference between revisions)
Jump to: navigation, search
(explain types of sameness)
m (fix wp link)
 
Line 1: Line 1:
-
Sameness is an [[wp:equivalence relation]] such that any two [[reference]]s which “are the same” are not distinguishable by any [[unprivileged]] client. The [[Equalizer]] object provides the sameness predicate to E programs.
+
Sameness is an [http://en.wikipedia.org/wiki/Equivalence_relation equivalence relation] such that any two [[reference]]s which “are the same” are not distinguishable by any [[unprivileged]] client. The [[Equalizer]] object provides the sameness predicate to E programs.
For purposes of sameness, all references are either [[selfish]], [[selfless]], or [[unresolved]].
For purposes of sameness, all references are either [[selfish]], [[selfless]], or [[unresolved]].

Latest revision as of 13:32, 25 July 2009

Sameness is an equivalence relation such that any two references which “are the same” are not distinguishable by any unprivileged client. The Equalizer object provides the sameness predicate to E programs.

For purposes of sameness, all references are either selfish, selfless, or unresolved.

Selfish

Selfish objects have specific identities defined by the event of their creation. In most implementations this is "pointer equality". XXX Explain better for the casual programmer.

Selfless

Selfless objects have identities defined by their “components”; a selfless object is the same as any other object made of the same components. See Selfless for more details on this.

Unresolved

Unresolved references (promises) are the same as any promise which will necessarily have the same resolution, i.e. a promise is the same as itself, another promise that is resolved to it, and the promise which it is resolved to, and so on transitively.

A promise is not different from any other reference; such sameness is not yet defined.

The tools to work with this are Equalizer#sameYet/2 and TraversalKey.

Personal tools
more tools