[cap-talk] Objects and Facets

Norman Hardy norm at cap-lore.com
Mon Aug 7 18:22:58 EDT 2006


I think we need to talk about two different languages here.
One language is used to document specific functionalities provided by  
a bodies of code residing within a capability system.
The other is to describe models of capability systems.

When I implement an up-down counter I want to document it as follows:

An up-down counter is an object whose mutable state is a 64 bit integer.
Calling the UDCC creates a counter and returns three facets thereto:  
Up, Down and Read.
Invoking Up increments the integer, Invoking Down decrements the  
integer. Read returns the integer.
The counter's initial integer is 0.

It seems clear to me that on the user side of this abstraction  
boundary there is just one object and three facets, regardless of the  
technology I use to create those three keys.
The keys may be all to the same domain or to three domains or indeed  
one domain may implement several counters.
In any case three keys are facets to the same object.

Talk of facet-ids in start keys is a detail buried in details of the  
semantics of domains which some Keykos programmers might never learn  
of. This is the only primitive way for a programmer (without access  
to the kernel) has of defining new keys.

(define UDCC (lambda () (let ((c 0)) (list
       (lambda () (set! c (+ c 1))) (lambda () (set! c (- c 1)))  
(lambda () c)))))

I would like to know how to document the up down counter in the other  
proposed was of speaking.



More information about the cap-talk mailing list