DIRECTORY Pipal, PipalInt, PipalMos; PipalConnect: CEDAR DEFINITIONS = BEGIN Type: TYPE = {null, leaf, composite}; GetTypeProc: TYPE = PROC [object: Pipal.Object, mode: Mode] RETURNS [type: Type]; GetType: GetTypeProc; EnumerationType: GetTypeProc; NullType: GetTypeProc; LeafType: GetTypeProc; CompositeType: GetTypeProc; EachPortProc: TYPE = PROC [transformation: PipalInt.Transformation, portIndex: NAT, port: Pipal.Object] RETURNS [quit: BOOL _ FALSE]; EnumeratePortsProc: TYPE = PROC [object: Pipal.Object, mode: Mode, privateArea: PipalInt.Rectangle, eachPort: EachPortProc, transformation: PipalInt.Transformation _ []] RETURNS [quit: BOOL _ FALSE]; EnumeratePorts: EnumeratePortsProc; CountPorts: PROC [object: Pipal.Object, mode: Mode, privateArea: PipalInt.Rectangle] RETURNS [count: NAT _ 0]; EnumerationEnumeratePorts: EnumeratePortsProc; ComposerEnumeratePorts: EnumeratePortsProc; AtomicEnumeratePorts: EnumeratePortsProc; WellAtomicEnumeratePorts: EnumeratePortsProc; Composer: TYPE = REF ComposerRec; ComposerRec: TYPE = RECORD [ object: Pipal.Object, -- enumerated object provides correct childIndex for bindings ports: REF PortsSequence, nodes: SEQUENCE size: NAT OF Node ]; PortsSequence: TYPE = RECORD [ports: SEQUENCE size: NAT OF Pipal.Object]; Node: TYPE = REF NodeRec; NodeRec: TYPE = RECORD [ bindings: SEQUENCE size: NAT OF Binding ]; Binding: TYPE = RECORD [childIndex, nodeIndex: NAT]; GetComposerProc: TYPE = PROC [object: Pipal.Object, mode: Mode, privateArea: PipalInt.Rectangle] RETURNS [cc: Composer]; GetComposer: GetComposerProc; EnumerationComposer: GetComposerProc; AbutComposer: GetComposerProc; RoutingComposer: GetComposerProc; TilingComposer: GetComposerProc; Mode: TYPE = REF ModeRec; ModeRec: TYPE = RECORD [ getTypeMethod, enumeratePortsMethod, getComposerMethod: Pipal.Method, name: Pipal.ROPE, touch: PipalMos.TouchProc, nbOfLayers: NAT _ 1, objectLayer: PROC [Pipal.Object] RETURNS [LayerRange] _ NIL ]; LayerRange: TYPE = RECORD [min, max: NAT]; layoutMode: Mode; schematicMode: Mode; rawLayoutMode: Mode; InternalBug: SIGNAL []; CallerBug: SIGNAL []; END. τPipalConnect.mesa Copyright Σ 1988 by Xerox Corporation. All rights reversed. Created by Bertrand Serlet March 18, 1988 5:38:22 pm PST Bertrand Serlet April 14, 1988 10:29:55 pm PDT Theory This interface defines how to intersect rectangles in order to obtain Connectors. We call this operation connectizing. Connector Type Each Object can connectize into a null connector (e.g. text in layout), a leaf connector (e.g a contact or a transistor, in which only the interface is known) or a composite connector (e.g. an overlay). In the leaf and composite cases, it is possible to enumerate the ports, stars or names of the object. When the object is a composite connector, it is also possible to reach inside it. Applies the getType method, EnumerationType by default. Applies PipalInt.Enumerate and returns null if there was no child, null or leaf if there was a single null or leaf child, composite otherwise. Always returns null. Always returns leaf. Always returns composite. Ports Enumeration First portIndex is 0 Can only be called if GetType[object, mode] is leaf or composite. privateArea is the area in which nodes are not promoted. It is used only for composite connectors. Applies the enumeratePortsMethod method, EnumerationEnumeratePorts by default. Two invocations with same object, mode and privateArea applies eachPort with the same arguments, in the same order. Returns the number of ports. Applies PipalInt.ObjectEnumerate, assuming there is a single child, and applies children enumeration. Enumerate the ports of a the composite connector obtained by GetComposer (see below). Used for primitive objects which extract as one electric component. Used for primitive objects which extract as one or two electric components. Composite Connector size>=ports.size. first nodes corresponds to ports, in the same order. Bindings are guaranteed to be sorted in lexicographic order (lowest childIndex first) childIndex refers to the index obtained when enumerating the composite connector. children[childIndex] must be composite. Can only be called if GetType[object, mode] is composite. privateArea is the area in which nodes are not promoted. eachInstance is called first on all sub-composite connectors, then eachNode is called on each node. Applies the enumerateNodes method. If none then applies GetEnumerationComposer. Two invocations of that function with same object, mode and privateArea returns the same Composer. Enumerate the object, and creates a Composer. Typically used for overlay. Faster than GetEnumerationComposer for abuts. Faster than GetEnumerationComposer for routing objects. Faster than GetEnumerationComposer for tilings. Mode Connectizing requires a few parameters, summarized in Mode. methods for recursion. identifies the mode Specifies if two decorations touch and provoke a geometric fusion. determines the number of interesting layers corresponding to subinstances of obj. Efficiency hack: should be defaulted for clients unaware of implementation details. Also note layer means in this context "virtual layers", not PipalMos.Layer. determines the [min .. max] layers corresponding to a subinstance of obj. Efficiency hack: should be set to DefaultObjectLayer for clients unaware of implementation details. min and max are included Some Connectize Modes Default mode for layout. Default mode for schematics. Same as layoutMode, but deals with overlap. Exceptions ConnectizeProcs, may raise the following exceptions. Please notify maintainors. Something is obviously wrong in client code. Κ†˜– "Cedar" stylešœ™Jšœ<™