ANNALF(n;SB,M,SB=>kt+5;,,,CO) CO(0;KEY=>0;FKEY,RKEY,DEL) produces a fake key FKEY that behaves, for the most part, as arbitrary key KEY. When FKEY is used as KEY would normally be used, a record of the use is made in the segment to which RKEY is a key. DEL(kt+4;==>0;) deletes the system. ANNALF may be found as "SYS.ANNALISTF".
The strategy of the annalist is to ensure that outbound keys inside and inbound keys outside are all fake, whereas no inbound keys inside or outbound keys outside are faked. The annalist is able to maintain this situation if it is initially true and only it wields the initial key.
The annalist processes and records all messages between the inside and outside. It fakes (replaces) new keys within messages. Such keys occuring in inbound messages are deemed outbound and vice-versa. Old keys, of-course, are in two flavors: real and fake. Outbound keys in outbound messages and inbound keys in inbound messages should all be fake and are replaced by their real counterparts. Outbound keys in inbound messages and inbound keys in outbound messages should all be real and are replaced by their fake counterparts. Annalist reports observed violations of the above two "shoulds".
Keys that discrim as 2 are resume keys and fake resume keys are provided to simulate the real ones. Fake resume keys vanish, of course, upon invokation but do not vanish upon invocation of the real key.
Keys that discrim as 3 are memory keys and fake segment keys are provided to simulate the real ones. Invocations of such fake keys behave as they should. Currently the segment keys may not be used to define memory however. Currently attempts to use a fake memory key to define memory cause a distinctive crash in the annalist. Fake node keys may, of course, not be used except by invocation.
Meter and data keys are not faked and are passed intact.
Messages delivered via fake keys are recorded in the annal. Records of messages delivered by fake start keys begin as "St < i" or "St > i". Reports of messages via resume keys begin "Rsm< i" or "Rsm> i". Memory key message reports begin "Mem > i" or "Mem < i". The integer identifies the key via which the message is passed and the "<" or ">" indicates the direction of the message.
Keys are reported within processed messages as being old or new ("o" or "n"), inbound or outbound ("<" or ">") and according to their discrim results. Their integer designator is also provided. Thus "3 n<s" depicts a newly observed start key to an inside object and declares that 3 will refer to this key in subsequent message reports.