SinixFlatten.mesa
Copyright © 1985 by Xerox Corporation. All rights reversed.
Bertrand Serlet September 23, 1985 2:30:07 pm PDT
DIRECTORY Core;
SinixFlatten: CEDAR DEFINITIONS = BEGIN
A flattened piece of Core is a record cell type. Wires might get meaningless names.
Flatten: PROC [cellType: Core.CellType, expand: ExpandProc] RETURNS [flat: Core.CellType, isRecordCell: BOOLTRUE];
Each descendent is expanded or not, depending on what expand says. The flat cellType returned is either a recordCell (isRecordCell=TRUE) made of atomic objects, or an atomic object (with respect to expand). Expand might be arbitrarily complex, for example, expand can look at some properties and act depending on them. The decision of whether to expand or stop is made at each node in the hierarchy.
Some strange copying (including some geometrical transformations) is done on some properties.
ExpandProc: TYPE = PROC [cellType: Core.CellType] RETURNS [expand: BOOLTRUE];
NonTransistorsExpand: ExpandProc
expands instances whose class is not CoreTransistor.transistorCellClass
END.