Sequence.mesa
Copyright Ó 1988 by Xerox Corporation. All rights reserved.
Barth, April 28, 1988 12:55:44 pm PDT
Types and Procedures
sequenceCellClass: Core.CellClass;
SequenceCellType: TYPE = REF SequenceCellTypeRec;
SequenceCellTypeRec:
TYPE =
RECORD [
base: Core.CellType,
count: NAT,
bindings: WireBindings ← NIL,
operations: Operations ← NIL];
FOR cell: NAT IN [0..count-1) DO
FOR wpl: WirePairs ← bindings, wpl.rest UNTIL wpl=NIL DO
bind CorrespondingActual[instances[cell+1].actual, base.public, wpl.first.this] to CorrespondingActual[instances[cell].actual, base.public, wpl.first.that]
ENDLOOP;
ENDLOOP;
WireBindings: TYPE = LIST OF WireBindRec;
WireBindRec:
TYPE =
RECORD [this, that: Core.Wire];
Operations: TYPE = RefTab.Ref;
Operation: TYPE = REF OperationRec;
OperationRec:
TYPE =
RECORD [
expose: ARRAY PublicWireType OF BOOL ← ALL[FALSE]];
PublicWireType:
TYPE = {sequence, flatSequence, common, first, last};
DecorateProc:
TYPE =
PROC [baseWire: Core.Wire, parentWires:
ARRAY PublicWireType
OF Core.Wire ←
ALL[
NIL]];
CreateSequence:
PROC [base: Core.CellType, count:
NAT, bindings: WireBindings ←
NIL, operations: Operations ←
NIL, name: Rope.
ROPE ←
NIL, props: Core.Properties ←
NIL, decorateProc: DecorateProc ←
NIL]
RETURNS [cellType: Core.CellType];