Gnosis allows many kinds of sharing unavailable in more traditional architectures. Unlimited use of these features makes copying and moving things difficult.
“When one tugs at a single thing in nature, he finds it attached to the rest of the world”.
There are a variety of problems that may have a common solution that seem similar to the copy function. These problems are:
We would like to preserve an object for incorporation into the world of a new big bang.
We would like to move an object from one space bank to another.
We may want to place the cost of preserving an object on another budget.
New command systems from factories.
While we still do not know how to make a copy, we can begin to see what it means to make a copy.
What holes may be in this command factory.
However indiscreet a set of factories that are to be allowed will be found in the command environment generated by the command system factory.
Consider a key to a record collection {(rc)}. Such a collection is of records which are composed of text and a key. We can clearly copy a record by copying the keys and texts to form a new record collection like the old. If the collection is a directory the user might think of some of the keys (that are to other collections) as sub-directories of the original, in which he would expect them to be copied. Other members of the directory, which designate record collections are thought of otherwise and should not be copied. How is the copier to know?
If there were a concept of an “owning reference” and a “subsidiary reference” we could copy the objects designated by the owning references and not the others. I record this idea but I will not pursue it here.
Space banks certainly have extraordinary power but putting logic there is bad because banks are so fundamental. It is nearly as bad as modifying the kernel.
On the other hand, it might be the case that users of such general copying facilities are ipso-facto subject to the bugs of such logic and thus it makes no difference to them whether the buggy code is integrated with the space bank or not: they are just as dead if it breaks.
When the bank is called upon to “copy the world”:
Some nodes have processes in them. This needs to be determined. Perhaps the only meter should be turned off. A program standing in the position of the keeper of that meter would then be in a position to collect exits to those nodes with processes. But how long must he wait??
The bank contemplates each of the node keys that is has kept. It creates a new node for each such key and places keys in the new nodes to correspond to the keys that it finds in the old nodes. This correspondence requires being able to determine if a node designating key designates a node for which the bank holds a key.
The facilities of (p2,node-cmp) provide most of what is needed here. It may not be sufficiently easy, or even possible, to tell what kind of key to the known key is held.
Another issue is the efficiency of finding out which nodes are designated by which keys. A key indexed directory {(p2,kid)} can solve this problem efficiently.
Another problem is to copy the pages. This is easy. Page keys found in the nodes may likewise be identified with the pages that they designate.
There remains the issue of returning to the requestor of the world-copy, keys suitable for the situation.
Before I attempt a definition lets make some rules that we would like to be true and that should follow from any definition.
A perceived dilemma in both language design and Gnosis design is to know when to stop copying. I say “perceived” because I think that the solution, when found, will answer this question naturally so as to make the dilemma unprofound and uninteresting.
Copy in another messy case
How does one request a copy of such an object?
We must first ask what it means to copy such an object?
Assume, for concreteness, that the filter watches raw stock data and provides reduced and processed data for the consumer.
Assume that the consumer is to move to another machine and that we wish to copy his world there. He has built the filter and thus it belongs to his world. In this case he will be copying his world which presumably includes the filter. The question remains of the supplier.
A similar service might exist on the other machine: ...
We might wish to make provisions for the filter to stay behind and pass its results to the new machine.
At the time of the copy the filter may or may not hold an exit to the supplier.
If the filter holds the supplier exit:
Pointers found inside objects, created by a factory, got there by one of two ways:
They were passed in by the requestor after the creation.
I still don't know what it means: What about the recursive directories,
Where do you conveniently keep the copy capabilities so you have them when you need them?
Algebraic Specifications
Lets review the form of an algebraic specifications.
We are given operators which are just functions which yield either a datum or a new abstract value. These operations typically take just one abstract value as one of their arguments.
The advent of languages supporting data abstraction has brought a new dilemma:
Should the user be allowed to copy such composite values?
Other languages have provided special hooks for the designer to participate in the duplication of objects of his type.
Ideally we would find rules compliance with which would be manifest. This would mean that evidence that the copies were different from the original could be laid at the feet of the copy mechanism.
Some Relevant Digressions
What does it mean to copy something that is a functioning part of a larger system?
In the Gnosis world, however, a component may be a portion of two larger, otherwise disjoint systems.
How about gates that will not pass gates. This is a kernel change. That is bad but let us proceed for a bit.
The .program of the current style factory finds an exit key to the requestor. Suppose that this exit key were of this “don't pass entries” kind.
VERY LOOSE END!
While there are no “natural” solutions to these dilemmas, it is comforting to note that there are a variety of ad-hoc solutions to these dilemmas.
An ad-hoc solution to the bank account problem is to divide the account into two accounts, each of half the size.
Suppose that we presumed the following rigid restriction of modes of programming in Gnosis. These restrictions might be enforced somehow.
Gate jumps not “involved with creation” can't pass capabilities.
Some provision must be made for record collections and super nodes, for one passes keys to and from them after creation.
The restriction against passing capabilities is to avoid the entangling alliances that lead to uncopyable things.
Hint: I don't think we have to change the kernel.(??)
The generalization breaks down because the user can entangle his object so as to be unable to find its boundaries.
A work space might be provided where all outside connections would be registered so that they might be reviewed by the copier (or security officer).
Where does one place the copy logic that we have implied?
Even if we knew where the edges of the object were how do we reach them?
The ideas of (gnosisdoc,x-ray,) might do the job but I hope that they are unnecessary. The lesser facilities of (rel-unspec) would already do the job I think, but still by wielding overly powerful tools.
One may determine if a given bank is willing to make copies. Some .programs may be unwilling to use such a bank (Accounts?).
There would be a call (on the guard key?) that would make a copy of all of the guarded material. In addition it would return analogs to keys provided upon the copy call.
This call would take a new space bank (which might or might not be guarded etc.) which would provide the material for the copy.
There would be a transformation on a willing bank to produce an unwilling bank. This is necessary if I want my command system to be moved to another Gnosis system. I would loose my bank account but that seems necessary.
{“copy object”} G("copy";KO,B==>c;KN)
G obeys a new order code called “copy”. B is a space bank. KO is a key {presumably designating a node from the bank}.
For each node safe node N a new node is created from B. This new node is said to correspond to N.
For each safe page create a new page from B. The new page is said to correspond to the safe page.
For each key K in a slot of a safe node the corresponding slot of the new node is filled with KX where:
Answer: You get a node from the bank, put those keys in it, pass the key to that node as KO, Upon return KN will designate a new node from the new bank with the mapped keys.
In the extreme paranoia mode we would have to have two kindred banks communicating over some secure circuit.
We should modularize the solution so that ciphering code isn't the space bank.