CoreArrayCellClass.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Barth, August 14, 1985 9:30:46 pm PDT
Theory
The theory section is not up to date. This interface has been generalized to handle heterogenous and homogenous arrays.
This interface describes the structuring mechanism which takes a collection of cell instances of identical type and binds them together. Currently it is only useful to sequence cells whose publicWire consists of a top level record or sequence structure. The public wire of the assembly is computed from the base and the sequence and stitch fields. The components of the top level sequence indicated by the sequence field turn into wires which are sequenced by the count. The components of the top level sequence indicated by the stitches field represent portions of the public wire which are bound together with an internal node. The sink of the first instance and the source of the last instance are made part of the public wire of the assembly.
Practice
ArrayParams: TYPE = REF ArrayParamsRec;
ArrayParamsRec:
TYPE =
RECORD [
l: INT ← 0,
u: INT ← 0,
stitches: Stitches ← NIL,
sequences: Sequences ← NIL];
Sequences: TYPE = REF SequencesRec;
SequencesRec: TYPE = RECORD [SEQUENCE length: NAT OF NAT];
Stitches: TYPE = REF StitchesRec;
StitchesRec: TYPE = RECORD [SEQUENCE length: NAT OF Stitch];
Stitch:
TYPE =
RECORD [
source: NAT,
sink: NAT];
Arrays
arrayCellClass: CellClass;
ArrayCellType: TYPE = REF ArrayCellTypeRec;
ArrayCellTypeRec:
TYPE =
RECORD [
xparams: ArrayParams ← NIL,
yparams: ArrayParams ← NIL,
base: CellType];
CreateArrayCellType:
PROC [arrayCellType: ArrayCellType, name:
ROPE ←
NIL]
RETURNS [cellType: CellType];
PrintArrayCellType: PROC [arrayCellType: ArrayCellType, out: STREAM];
Maps
mapCellClass: CellClass;
MapCellType: TYPE = REF MapCellTypeRec;
MapCellTypeRec:
TYPE =
RECORD [
xparams: ArrayParams ← NIL,
yparams: ArrayParams ← NIL,
func: XYFunction,
cellTypes: SEQUENCE length: NAT OF CellType];
XYFunction:
TYPE =
PROC [x, y:
INT, mapCellType: MapCellType]
RETURNS [cellType: CellType];
These procedures must persist during the lifetime of the core data structure which accesses them.
CreateMapCellType:
PROC [mapCellType: MapCellType, name:
ROPE ←
NIL]
RETURNS [cellType: CellType];
PrintMapCellType: PROC [mapCellType: MapCellType, out: STREAM];