LichenArrayStuff.mesa
Last tweaked by Mike Spreitzer on October 20, 1987 8:13:03 pm PDT
DIRECTORY Collections, IO, LichenDataStructure, RefTab;
LichenArrayStuff: CEDAR DEFINITIONS
=
{OPEN LichenDataStructure, Colls:Collections;
CreateArrayRep: PROC [eltType: CellType, size2, basePeriod: Size2] RETURNS [a: Array];
MakeArrayNewConnection: PROC [act: CellType, rangeA: Range2, delta: Int2, epA, epB: Port];
FinishedMakingArrayConnections: PROC [act: CellType];
Connections may only be added before this; queries about array connectivity can only be made after this.
SetStatRep: PROC [act: CellType, statrep: StatRep, reset: BOOL];
Recomputes DumbRep, but doesn't mess with array ports.
ArrayEltPortsConnected: PROC [a: Array, ai1, ai2: ArrayIndex, ep1, ep2: Port] RETURNS [BOOL];
EnumerateConnectedEltPorts: PROC [a: Array, ep: Port, Consume: PROC [Port]];
GetArrayPortForPort: PROC [act: CellType, index: ArrayIndex, ep: Port, mayAdd: BOOL] RETURNS [arrayPort: Port];
NoteNewEltPort: PROC [a: Array, ep: Port];
IsIncompleteArray: PROC [CellType] RETURNS [BOOL];
ComposeIndex: PROC [i: Int2, relTo: Range2] RETURNS [NATURAL]
~ INLINE {RETURN [(i[Foo]-relTo[Foo].min) * (relTo[Bar].maxPlusOne-relTo[Bar].min) + i[Bar]-relTo[Bar].min]};
PrintArray: PROC [to: IO.STREAM, act: CellType, nameGen: NameGenerator ← NIL];
NameIndex: PROC [a: Array, index: ArrayIndex] RETURNS [SteppyName];
FmtIndex: PROC [a: Array, index: ArrayIndex] RETURNS [asRope: ROPE];
Subscript: PROC [ROPE, INT] RETURNS [ROPE];
Subscript2: PROC [ROPE, ArrayIndex] RETURNS [ROPE];
GetDumbWire: PROC [a: Array, ep: Port, ai: ArrayIndex] RETURNS [dw: DumbWire];
EnumerateDumbWiresForPort: PROC [a: Array, ep: Port, Consume: PROC [DumbWire]];
GetInstForPortInDumbWire: PROC [a: Array, dw: DumbWire, ep: Port] RETURNS [ArrayIndex];
ScanPortsInDumbWire: PROC [a: Array, dw: DumbWire, Test: PROC [Port] RETURNS [BOOL]] RETURNS [found: BOOL, ep: Port];
ScanStatVertices: PROC [a: Array, Test: PROC [StatVertex] RETURNS [BOOL]] RETURNS [found: BOOL, sv: StatVertex];
ScanStatEdgesFrom: PROC [sr: StatRep, from: StatVertex, Test: PROC [se: StatEdge, ob: BOOL] RETURNS [BOOL]] RETURNS [found: BOOL, se: StatEdge, ob: BOOL];
StatEdgeRedundant: PROC [a: Array, sep: StatEdgePrivate, avoid: StatEdge ← NIL] RETURNS [BOOL];
FindStatEdge: PROC [sr: StatRep, sep: StatEdgePrivate] RETURNS [StatEdge];
AddStatEdge: PROC [sr: StatRep, sep: StatEdgePrivate] RETURNS [se: StatEdge];
CreateStatRep: PROC RETURNS [StatRep];
statVerts, portsAtIndices: READONLY Colls.Space;
}.