DIRECTORY Core, CoreRecordCellClass; CoreFlatten: CEDAR DEFINITIONS = BEGIN OPEN Core, CoreRecordCellClass; instantiationPath: ATOM; InstantiationPath: TYPE = REF InstantiationPathRep; InstantiationPathRep: TYPE; IsInstantiationPath: PROC [ra: REF ANY] RETURNS [BOOL]; NarrowToInstantiationPath: PROC [ra: REF ANY] RETURNS [InstantiationPath]; IsEmpty: PROC [ip: InstantiationPath] RETURNS [BOOL]; Split: PROC [ip: InstantiationPath, end: InstantiationPathDirection] RETURNS [step: Instance, rest: InstantiationPath]; Exhibit: PROC [ip: InstantiationPath, later: InstantiationPathDirection, to: PROC [step: Instance]]; InstantiationPathDirection: TYPE = {deeper, shallower}; wireSource: ATOM; WireSource: TYPE = REF WireSourceRec; WireSourceRec: TYPE = RECORD [ instantiationPath: InstantiationPath, wire: Wire ]; Flatten: PROC [design: Design, cellType: CellType, control: FlattenControl] RETURNS [flat: CellType]; expandNonPrimitive: FlattenControl; FlattenControl: TYPE = REF FlattenControlRec; FlattenControlRec: TYPE = RECORD [Decide: FlattenControlProc, data: REF ANY]; FlattenControlProc: TYPE = PROC [data: REF ANY, who: InstantiationPath] RETURNS [ExpandDecision]; ExpandDecision: TYPE = {leaf, expand}; ControlByFile: PROC [fileName: ROPE] RETURNS [control: FlattenControl]; END. φCoreFlatten.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Spreitzer, August 15, 1985 8:05:29 pm PDT Introduction This interface defines a utility for flattening the data structure defined in Core. Flat Core A flattened piece of Core is a record cell type. None of the instances or wires has a name. Each instance notes its instantiation path on its instantiationPath property. Each wire notes its source on its wireSource property, or is a descendant of a wire with such a note. Relative to the containing cell type, the number of levels of intermediate structure (i.e., cell instances) have been removed. Flattening Each descendent is expanded or not, depending on what control says. expands those whose recast is not NIL Control Flattening can be carried out to an arbitrary depth. The decision of whether to expand or stop is made at each node in the hierarchy. Control by File There is a yet-to-be-determined file format that allows a textual specification of flattening control. Κ<˜– "Cedar" stylešœ™Jšœ Οmœ1™