CoreRecord.mesa 
Copyright © 1985 by Xerox Corporation. All rights reserved.
Barth, October 2, 1985 9:34:23 am PDT
Serlet, July 11, 1985 3:49:37 pm PDT
Spreitzer, September 9, 1985 11:21:21 pm PDT
DIRECTORY Core;
CoreRecord: CEDAR DEFINITIONS = BEGIN OPEN Core;
Theory
This interface describes the structuring mechanism which takes a collection of cell types of various classes and binds them together.
Some invariants must be established by a program which creates this data structure:
1) For each instance the actualWire field must conform to the publicWire field of the cell type which is pointed to by the instance.
Conform[w1, w2] {
w1.structure = w2.structure '
w1.structure ` atom Ò
w1.elements.size = w2.elements.size '
i  [0, w1.elements.size): Conform[w1.elements[i], w2.elements[i]]
2) The wires of each actualWire field must point to wires that are reachable from the internalWire of the RecordCell.
3) The publicWire of the CellType must point to wires that are reachable from the internalWire of the RecordCell.
Practice
recordCellClass: CellClass;
RecordCellType: TYPE = REF RecordCellTypeRec;
RecordCellTypeRec: TYPE = RECORD [
internalWire: Wire,
instances: CellInstanceList ← NIL];
CellInstance: TYPE = REF CellInstanceRec;
CellInstanceList: TYPE = LIST OF CellInstance;
CellInstanceRec: TYPE = RECORD [
name: ROPENIL,
actualWire: Wire,
type: CellType,
properties: Properties ← NIL];
Print: PROC [recordCellType: RecordCellType, out: STREAM];
Conform: PROC [w1, w2: Wire] RETURNS [BOOL];
Bound: PROC [instance1, instance2: CellInstance, public1, public2: Wire] RETURNS [b: BOOL];
b ← actual of instance1 corresponding to public1 = actual of instance2 corresponding to public2
internalWireFullName: ATOM;
Used to put full names on internal wires when CoreOps.NameAllWires is called.
END.