PairList.Mesa
Last changed by: 26-Jun-81 18:28:36
Cedar version:18-Jun-81 14:24:37
Ordered pairs; building and searching
Last Edited by: Beach, May 1, 1984 2:08:58 pm PDT
PairList: CEDAR DEFINITIONS =
BEGIN
RelationHead: TYPE = RECORD[first, last: REF Pair];
Relation: TYPE = REF RelationHead;
Pair: TYPE = RECORD[link: REF Pair, left, right: REF ANYNIL];
NotFound: SIGNAL;
EqualProc: TYPE = PROC[left,right: REF ANY] RETURNS[return: BOOLEAN];
CreateRelation: PROCEDURE RETURNS [Relation];
AddPair: PROCEDURE [relation: Relation, left, right: REF ANYNIL];
Left: PROCEDURE[relation: Relation, equals: EqualProc, right: REF ANYNIL]
RETURNS [REF ANYNIL];
Right: PROCEDURE[relation: Relation, equals: EqualProc, left: REF ANYNIL]
RETURNS [REF ANYNIL];
ForAllPairs: PROCEDURE[relation: Relation,
do: PROCEDURE[leftPart, rightPart: REF ANYNIL]];
DestroyRelation: PROCEDURE[relation: Relation];
END.