This section should be merged with (p3,do) and that section updated.
Standard Creators
The factory is the preferred way of bringing new objects into existence. As a new type of object is invented a new factory for that object is created.
The inventor creates the factory. When a requestor wants a new object of that type he invokes the requestor's key to that factory to produce the object. A few keys are returned that provide access by the requestor to the new object.
Factories provide privacy between the builder and requestor.
Some objects may be set up so as to notify the object builder directly of an internally discovered failure. In other cases the internally discovered failure may cause the notification of the requestor of the object.
Failures discovered by the requestor can also be brought to the attention of the inventor via the factory.
In this case I make a factory, install my program in it, create a requestor's key for the factory and send that key to you.
You may determine that the key I sent you is indeed a factory. You will also want to determine that there are no unwarranted holes in the factory {(discr)}. A warranted hole might, for instance, be a capability for my program to keep your processed data safe over long periods of time by tape backup operations. The tape backup system would have to vouch for the fact that it won't reveal your data to me.
We examine the interests of these three in turn and explain the factory from his point of view.
To requestors of new objects
It is necessary for the requestor to provide a meter. If this meter has a keeper, the requestor has just provided the opportunity for the object to call that keeper {if the kernel were to support explicit meter calls}. In the following scenario this is serious:
Y requests an x object passing a meter M. x runs and requests a y object passing M {the only meter that x has}. x proceeds to place information proprietary to X in the object maintained by y {perhaps the x object is a record collection}.
Scenario One
Scenario Two
We can change x to create a new meter depending on M without a keeper loyal to Y.
We can establish a "no-call" bit in a meter key to thwart explicit calls and change x to turn on that bit in the copy of M that he passes to the y object.
We can establish the "no-call" bit and change the factory logic to turn on this bit, thus avoiding any extra effort to avoid obscure security problems.
If K is a segment this can be prevented by putting it behind a segment node created by the requestor.
One's trust of some data processing facility will depend on many considerations. We distinguish here between trusting the facility to provide the right answers, and trusting the facility not to disclose the information in an unauthorized way. We are concerned only with the latter here.
When we say that a secretary is discreet we may mean that the secretary is trustworthy to keep and work on secret information. We use "discreet" and "discretion" to evoke those connotations.
The factory mechanism provides the sort of protection that would be achieved by putting a computer in a closed room, putting an untrusted program into it along with the secret information. There are wires leading from the computer to systems known by you. You may not be convinced that the answers are correct but you may feel sure that only those in the room and those known systems will be able to see your information and the answers. The discretion is an indication of what systems there are wires to.
Who to Trust
As computing facilities are built of simpler facilities {recursively} the holes of an object are inherited from the holes of its component objects. As a consequence of the factory rules, the discretion of a factory can not exceed the discretion of any of its components. Furthermore it is possible to compare the discretion of two factories. If a factory is proffered which is claimed to be discreet, one may compare it to a factory that is already owned and trusted.
How do these holes originate? When someone invents a service and is unwilling or unable to conform to the strictures of creation by pure factory logic he inserts a hole into the factory. This action is known to the factory logic.
The inventor must convince you, by logic or persuasion beyond the scope of factory design, that his exception {hole} is acceptable to you. When he has done this he provides you with the factory that resulted from the exemption.
You may now insert this factory into your "standard test factory" against which you test all factories with which you trust your secrets. Not only can you now use his products but you can use products built indirectly from his products.
Within an institution there will be factories of discretion deemed sufficient for particular purposes.
The code necessary to support a new object comes in three parts: Factory creation, object initialization and object execution. Normally this factory is created just once. {There is now in the WOMBKEEPER program a mechanism to create the factory for primordial programs.} A new {empty} factory is acquired. Components necessary for the creation of new objects are assembled and installed in the new factory. These components must be of three categories, factory requestor's keys, sensory keys {(p2,sensory)} and holes.
The discretion of the objects depends on the discretion of the factory requestor's keys that are installed in the new factory. (hole) tells you how to about discretion rules.
See (infact) and (prim-hole) on the origin of holes.
If logic within the object discovers a logical fault there are two scenarios: notify the requestor via a route established early in the life of the object, or notify the builder {if the object is not too discreet}. In this case we might invent a protocol for the builder to contact the requestor. We now have no such proposal.
If the requestor {user} of the object suspects a failure of the object he may be able to call a surveillance entry for a report on the object's status. This is of no interest to the factory.
If the requestor decides that he would rather trust the builder and potentially betray his secrets than to lose the use of the object, the requestor can send his object handle {gate key or segment key} directly to the builder who can disassemble it with the "get factory's domain keeper" operation on the builder's key.
If it is necessary to install a DDT over .program before the first instruction:
M is a meter key to a valid empty meter kept by MK, a program loyal to the requestor.
Just as .program is about to run, it traps to MK providing MK with a restart key E to the domain that is about to execute .program, whereupon the requestor passes E to the builder who is now in a position to debug the domain that is expected to misbehave.
For some objects, such as record collections, there is no need for the new factory to have the same domain creator as the old.