LichenTransformsPrivate.mesa
Last tweaked by Mike Spreitzer on April 29, 1987 4:39:14 pm PDT
DIRECTORY LichenDataStructure, LichenSetTheory;
LichenTransformsPrivate: CEDAR DEFINITIONS
= {OPEN LichenDataStructure, LichenSetTheory;
RoledPortList: TYPE ~ LIST OF RoledPort;
RoledPort: TYPE ~ RECORD [role: NATURAL, port: Port];
Analysis: TYPE = REF AnalysisPrivate;
AnalysisPrivate: TYPE = RECORD [
roles: NATURAL,
subjTypes: RefSeq--role b CellType--,
wag: WireAnswering,
doomedPorts: Set ← --CreateHashSet[]--,
losses, fromGains, toGains: NATURAL ← 0
];
WireAnswering: TYPE = REF WireAnsweringPrivate;
WireAnsweringPrivate: TYPE = RECORD [
oldSubjConnectionss: RefSeq--role b RefTable(subj port b wire connected to that port of that subject at first site)--,
anses: Mapper--wire b WireAns--];
WireAns: TYPE = REF WireAnsPrivate;
Data for the wire connected to a port of a vertex to be moved.
WireAnsPrivate: TYPE = RECORD [
proto: Wire,
analyzed: BOOLFALSE,
sawSelves: BoolSeq,
fromPort: Port ← NIL,
A border port found, if any.
toPort: Port ← NIL,
The border port created on the splinter cell type.
subjPorts: RoledPortList ← NIL,
sawBord: BOOLFALSE,
Connected to the border at least once
sawBords: BOOLFALSE,
Connected to the border by more than one port.
sawElse: BOOLFALSE,
Connected to something other than the border & subjects.
child: CellInstance ← NIL,
counterpart: Wire ← NIL,
doFrom: PortAction ← leave,
sawElse ' sawBord Ò leave (existing port)
sawElse ' ¬sawBord { addPort
¬sawElse ' sawBord ' ¬sawBords { dePort
¬sawElse ' sawBord ' sawBords { leave (existing ports)
¬sawElse ' ¬sawBord Ò dontAdd
doTo: PortAction[dontAdd..addPort] ← dontAdd
sawElse ( sawBord { addPort
¬sawElse ' ¬sawBord { dontAdd
];
PortAction: TYPE ~ {dontAdd, addPort, dePort, leave};
Survey: PROC [parent: CellType, child: Vertex, sibs: RefSeq--role b subject--, analysis: Analysis, first: BOOL] RETURNS [dif: BOOLFALSE];
The sibs should all be components of parent. The border is taken to be child, if non-NIL, otherwise the mirror of parent. The child, if any, should not be among the sibs.
GetRPAns: PROC [wag: WireAnswering, role: NATURAL, subjPort: Port, wire: Wire ← NIL, mayChange: BOOLFALSE] RETURNS [wa: WireAns];
}.