DIRECTORY Core; CoreClasses: CEDAR DEFINITIONS = BEGIN OPEN Core; 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]; CellInstances: TYPE = LIST OF CellInstance; CreateRecordCell: PROC [public: Wire, internal: Wire, instances: LIST OF CellInstance, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [recordCell: CellType]; CreateInstance: PROC [actual: Wire, type: CellType, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [instance: CellInstance]; SetCellInstanceName: PROC [instance: CellInstance, name: ROPE] RETURNS [sameInstance: CellInstance]; GetCellInstanceName: PROC [instance: CellInstance] RETURNS [name: ROPE]; CorrespondingActual: PROC [instance: CellInstance, public: Wire] RETURNS [actual: Wire _ NIL]; ReverseCellInstances: PROC [instances: CellInstances] RETURNS [rev: CellInstances _ NIL]; transistorCellClass: CellClass; Transistor: TYPE = REF TransistorRec; TransistorRec: TYPE = RECORD [ type: TransistorType _ nE, length: NAT _ 2, width: NAT _ 4]; TransistorType: TYPE = {nE, pE, nD}; TransistorPort: TYPE = MACHINE DEPENDENT {gate(0), ch1(1), ch2(2)}; transistorTypeNames: ARRAY TransistorType OF ROPE; transistorPortNames: ARRAY TransistorPort OF ROPE; CreateTransistor: PROC [args: TransistorRec, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [transistor: CellType]; identityCellClass: CellClass; CreateIdentity: PROC [cellType: CellType, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [identity: CellType]; unspecifiedCellClass: CellClass; CreateUnspecified: PROC [public: Wire _ NIL, name: ROPE _ NIL, props: Properties _ NIL] RETURNS [cellType: CellType]; END. ΨCoreClasses.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Bertrand Serlet, March 18, 1986 0:05:29 am PST Pradeep Sindhu December 2, 1985 3:36:33 pm PST Barth, May 6, 1986 5:05:24 pm PDT Spreitzer, January 10, 1986 4:03:48 pm PST Theory This interface defines a set of Classes of general interest. Record The record class describes the structuring mechanism which takes a collection of cell types of various classes and binds them together. Some invariants must be established by programs which create this data structure: 1) The actual wire of an instance must conform to the public wire of the cell type which is pointed to by the instance. 2) The actual field of an instance must point directly to a wire that is not reachable from the internal of the record cell. This wire, as is true of all public wires, must not be atomic and all of its subwires must be reachable from the internal of the cell type. 3) The public field of a cell type of record cell class must point to a wire that is not reachable from the internal of the record cell. This wire, as is true of all public wires, must not be atomic and all of its subwires must be reachable from the internal of the cell type. 4) The first level of the internal wire hierarchy exists only to allow smooth recursion, and to give a handle on the whole internal. Consequently, internal.size=0 should be interpreted as an empty internal and not an atomic wire. CoreOps naming strategy requires that internal are immutable, once part of a recordCell. internal.size#0 instances.size may be 0 actual.size#0 Checks that actuals conform to the sub publics and that actuals and public are part of the internals. Returns the actual bound to the public in the instance, NIL if not found Reverses a list of CellInstances Transistor Public wires: gate, ch1, ch2. Identity An identity cell type has the same Core data structure as some other cell type but has a new property list. It is useful when properties describe instances of a class all of whose members have the same Core data structure. Unspecified Unspecified is the cell class that means to not specify structure. Cell types in this class are not necessarily leaves, nor composites --- their internal structure is unspecified. Κz˜– "Cedar" stylešœ™Jšœ Οmœ1™