DIRECTORY CedarBaseType USING [TypeIndex], CedarBaseValue USING [Value], SaffronGenericDef USING [idNode], IO USING [STREAM]; CedarBaseContext: CEDAR DEFINITIONS ~ { idNode: TYPE ~ SaffronGenericDef.idNode; TypeIndex: TYPE ~ CedarBaseType.TypeIndex; Value: TYPE ~ CedarBaseValue.Value; LocalContext: TYPE ~ REF LocalContextRep; LocalContextRep: TYPE; PrintLocalContext: PROC [LocalContext, IO.STREAM] RETURNS [BOOLEAN]; XLocalContext: PROC [LocalContext] RETURNS [LocalContext]; CreateLocalContext: PROC [] RETURNS [LocalContext]; LocalLookup: PROC [LocalContext, idNode] RETURNS [Descriptor]; InsertContext: PROC [LocalContext, idNode, Descriptor] RETURNS [LocalContext, BOOLEAN]; ReplaceContext: PROC [LocalContext, idNode, Descriptor] RETURNS [LocalContext, BOOLEAN]; RibContext: TYPE ~ REF RibContextRep; RibContextRep: TYPE; CreateRibContext: PROC [] RETURNS [RibContext]; RibLookup: PROC [RibContext, idNode] RETURNS [Descriptor]; Lookup: PROC [RibContext, LocalContext, idNode] RETURNS [Descriptor]; ExtendRibContext: PROC [RibContext, LocalContext] RETURNS [RibContext]; Descriptor: TYPE ~ REF DescriptorRep; DescriptorRep: TYPE; BuildValueDescriptor: PROC [Value] RETURNS [Descriptor]; GetValue: PROC[Descriptor] RETURNS [Value]; IsValueDescriptor: PROC [Descriptor] RETURNS [BOOLEAN]; BuildSuspendedDescriptor: PROC [REF] RETURNS [Descriptor]; IsSuspendedDescriptor: PROC [Descriptor] RETURNS [BOOLEAN]; DescriptorGetDecl: PROC [Descriptor] RETURNS [REF]; BuildInaccessibleDescriptor: PROC [] RETURNS [Descriptor]; IsInaccessibleDescriptor: PROC [Descriptor] RETURNS [BOOLEAN]; BuildTypeDescriptor: PROC [TypeIndex] RETURNS [Descriptor]; GetType: PROC [Descriptor] RETURNS [TypeIndex]; IsTypeDescriptor: PROC [Descriptor] RETURNS [BOOLEAN]; BuildUndefinedDescriptor: PROC [] RETURNS [Descriptor]; IsUndefinedDescriptor: PROC [Descriptor] RETURNS [BOOLEAN]; ContextTree: TYPE ~ REF ContextTreeRep; ContextTreeRep: TYPE; BuildContextTree: PROC [RibContext, ContextTreeList] RETURNS [ContextTree]; ContextTreeList: TYPE ~ REF ContextTreeListRep; ContextTreeListRep: TYPE; BuildEmptyContextTreeList: PROC [] RETURNS [ContextTreeList]; }... าCedarBaseContext.Mesa Copyright ำ 1987 by Xerox Corporation. All rights reserved. Shoup, August 4, 1986 6:20:47 pm PDT Bill Jackson (bj) April 16, 1987 1:05:15 am PDT LocalContext A LocalContext is a map from idNode to Descriptor. The identity fcn ... needed to appease Casaba. Returns an Undefined Descriptor if idNode is not found. If idNode has not already been entered, it is entered and the BOOLEAN result flag is set to TRUE; otherwise, the LocalContext is unchanged and the flag is set to FALSE. If idNode has already been entered, its descriptor is changed and the BOOLEAN result flag is set to TRUE; otherwise, the LocalContext is unchanged and the flag is set to FALSE. RibContext A RibContext is a map from idNode to Descriptor, just like a LocalContext. A RibContext is constructed from a sequence of LocalContext's. RibContext's are never damaged. This does a LocalLookup, followed by a RibLookup if necessary. The entries in the LocalContext take precedence over the entries in the input RibContext. Descriptor A Descriptor is the denotation of identifiers, i.e. the range of the Context maps. Represents a value, e.g. the INTEGER 3. Represents a named value whose declaration has not yet been examined. Represents a named value whose declaration is currently being examined. If you bump into one of these, you have detected a circularly defined value. Represents a TYPE. This is returned by the Context lookup fcns for undeclared names. ContextTree ContextTreeList สญ˜šœ™Icode™J™7—J˜šž œœ$œœ˜WJšœจ™จ—J˜šžœœ$œœ˜XJšœฐ™ฐ——šœ ™ Jšœซ™ซJ˜Jšœ  œ˜%Jšœœ˜J˜Jšžœœœ˜/J˜Jšž œœœ˜:J˜šžœœ$œ˜EJ™>—J˜šžœœœ˜GJšœY™Y——šœ ™ J™RJ˜Jšœ  œ˜%Jšœœ˜J˜Jšžœœ œ˜8Jšžœœ œ ˜+šžœœœœ˜7J™'—J˜Jšžœœœœ˜:Jšžœœœœ˜;šžœœœœ˜3J™E—J˜Jšžœœœ˜:šžœœœœ˜>J™•—J˜Jšžœœ œ˜;Jšžœœœ ˜/šžœœœœ˜6J™—J˜Jšžœœœ˜7šžœœœœ˜;J™A——šœ ™ Jšœ  œ˜'Jšœœ˜J˜Jšžœœœ˜K—šœ™Jšœ œ˜/Jšœœ˜J˜Jšžœœœ˜=J˜—J˜J˜——…—|๛