DIRECTORY Core; CoreOps: CEDAR DEFINITIONS = BEGIN OPEN Core; nameProp: ATOM; printClassProcProp: ATOM; PrintClassProc: TYPE = PROC [data: REF ANY, out: STREAM]; CreateCellType: PROC [class: CellClass, public: WireSequence, data: REF ANY _ NIL, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [cellType: CellType]; GetCellTypeName: PROC [cellType: CellType] RETURNS [name: ROPE _ NIL]; Recast: RecastProc; PrintCellType: PROC [cellType: CellType, out: STREAM, depth: NAT _ 0]; PrintIndent: PROC [depth: NAT, out: STREAM]; -- utility CreateAtomWire: PROC [name: ROPE _ NIL, props: Properties _ NIL] RETURNS [wire: Wire]; CreateRecordWire: PROC [components: LIST OF Wire, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [wire: Wire]; CreateBasicSequenceWire: PROC [length: NAT, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [wire: Wire]; CreateSequenceWire: PROC [components: LIST OF Wire, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [wire: Wire]; SubrangeWire: PROC [wire: Wire, start, length: NAT, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [sub: Wire]; WiresToWireSequence: PROC [wires: LIST OF Wire] RETURNS [wireSeq: WireSequence]; WireSequenceToWire: PROC [wireSeq: WireSequence] RETURNS [wire: Wire]; CopyWire: PROC [wire: Wire] RETURNS [new: Wire]; CopyWireSequence: PROC [wireSeq: WireSequence] RETURNS [newSeq: WireSequence]; sequenceProp: ATOM; EachWireProc: TYPE = PROC [wire: Wire] RETURNS [subWires: BOOL _ TRUE, quit: BOOL _ FALSE]; EachWirePairProc: TYPE = PROC [actualWire, publicWire: Wire] RETURNS [subWires: BOOL _ TRUE, quit: BOOL _ FALSE]; VisitWire: PROC [wire: Wire, eachWire: EachWireProc] RETURNS [quit: BOOL]; VisitWireSequence: PROC [wireSeq: WireSequence, eachWire: EachWireProc] RETURNS [quit: BOOL]; VisitBinding: PROC [actual, public: WireSequence, eachWirePair: EachWirePairProc] RETURNS [quit: BOOL]; Conform: PROC [actual, public: WireSequence] RETURNS [BOOL]; GetWireName: PROC [wire: Wire] RETURNS [name: ROPE _ NIL]; FullNameWireSequence: PROC [wireSeq: WireSequence, name: ROPE _ NIL, prop: ATOM _ publicFullName, isSequence: BOOL _ FALSE]; NameWireProc: TYPE = PROC [data: REF ANY]; nameClassWireProcProp: ATOM; publicFullName: ATOM; PrintWire: PROC [wire: Wire, out: STREAM, depth: NAT _ 0]; PrintWireSequence: PROC [wireSeq: WireSequence, out: STREAM, depth: NAT _ 0]; Reverse: PROC [wires: LIST OF Wire] RETURNS [revWires: LIST OF Wire _ NIL]; Delete: PROC [wires: LIST OF Wire, wire: Wire] RETURNS [newWires: LIST OF Wire _ NIL]; Member: PROC [wires: LIST OF Wire, wire: Wire] RETURNS [BOOL]; END. xCoreOps.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Barth, October 2, 1985 11:39:31 am PDT Bertrand Serlet November 13, 1985 3:28:13 pm PST Spreitzer, November 7, 1985 5:20:31 pm PST Theory This interface defines interesting utilities for the data structure defined in Core. Names The standard property nameProp allows naming of cellTypes, instances, wires (in that last case the name is the step name, by contrast with the full name). Cell Classes Cell Types name is added to the other properties (under the prop nameProp) Always returns the same pointer, given same cell type. Creation of Wires For the following creation procs, name is added to the other properties (under the prop nameProp) Waiting for a replacement, a non-nil value indicates that the structure should be viewed as a sequence Enumerating Wires TRUE is returned if some invocation of eachWirePair returns quit=TRUE or if the 2 wires do not conform Checks that the actual and the public conform, i.e. that they are either atomic, or made of conformant sequence of wires of the same size. Naming of Wires (temporary) Attaches full path names to wire tree starting with initial name "name" on wire "wire" using property "prop". For each recursive call appends .(wire.elements[i].name) if structure = record or [index] if structure = sequence. Printing of Wires (temporary) Operations on LIST OF Wires Κ`˜– "Cedar" stylešœ ™ Jšœ Οmœ1™J™——Jšžœ˜—…— τ