Triples.Mesa
Last Modified by Paul Rovner on 7-Mar-81 16:14:27
Last Edited by: Swinehart, January 6, 1983 2:59 pm
Triples: CEDAR DEFINITIONS =
BEGIN
TYPEs
Item: TYPE = REF ANY;
Triple: TYPE = REF READONLY TripleRec;
TripleRec: TYPE = RECORD[att, obj, val: Item];
nullTripleRec: TripleRec = [Any, Any, Any];
CONSTANTS
Any: Item = NIL;
PROCs
Make, Erase: PROC[att, obj, val: Item];
Is: PROC[att, obj, val: Item ← Any] RETURNS[BOOLEAN];
Select: PROC[att, obj, val: Item ← Any] RETURNS[Item];
Special function allows values that MIGHT be REFs to be validated by their appearance
in the triples structure. It is assumed that there is but one val corresponding to att and
objCandidate. Returns NIL if no such triple really exists. Demikludge.
SelectCandidate: PROC[att: Item, objCandidate: LONG CARDINAL]
RETURNS [ obj, val: Item ];
Enumerator
Foreach: PROC[att, obj, val: Item, proc: ForeachProc];
ForeachProc: TYPE = PROC[trip: TripleRec] RETURNS [continue: BOOLEAN←TRUE];
SIGNALS
ArgFault: ERROR[att, obj, val: Item];
END.