<> <> <> <> DIRECTORY Core; CoreClasses: CEDAR DEFINITIONS = BEGIN OPEN Core; <> <> <> <> <> <<1) For each instance the actual field must conform to the public field of the cell type which is pointed to by the instance.>> <<2) The wires of each actual field must point to wires that are reachable from the internal of the RecordCell.>> <<3) The public of the CellType must point to wires that are reachable from the internal of the RecordCell.>> <<4) The public of the CellType is a non atomic wire.>> recordCellClass: CellClass; RecordCellType: TYPE = REF RecordCellTypeRec; RecordCellTypeRec: TYPE = RECORD [ internal: Wire, instances: SEQUENCE size: NAT OF CellInstance]; <> <> CellInstance: TYPE = REF CellInstanceRec; CellInstanceRec: TYPE = RECORD [ actual: Wire, type: CellType, properties: Properties _ NIL]; <> CreateRecordCell: PROC [public: Wire, internal: Wire, instances: LIST OF CellInstance, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [recordCell: CellType]; GetCellInstanceName: PROC [instance: CellInstance] RETURNS [name: ROPE _ NIL]; <> RecordPrint: PROC [recordCellType: RecordCellType, out: STREAM]; CorrespondingActual: PROC [instance: CellInstance, public: Wire] RETURNS [actual: Wire _ NIL]; <> internalFullName: ATOM; <> <> <> <<>> transistorCellClass: CellClass; Transistor: TYPE = REF TransistorRec; TransistorRec: TYPE = RECORD [ type: TransistorType _ nE, length: NAT _ 2, width: NAT _ 4]; TransistorType: TYPE = {nE, pE, nD}; <> CreateTransistor: PROC [args: TransistorRec] RETURNS [transistor: CellType]; <> identityCellClass: CellClass; CreateIdentity: PROC [cellType: CellType, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [identity: CellType]; <> <> <> unspecifiedCellClass: CellClass; <<>> END.