LichenTransformsPrivate.mesa
Last tweaked by Mike Spreitzer on July 10, 1987 3:01:22 pm PDT
DIRECTORY LichenDataStructure;
LichenTransformsPrivate: CEDAR DEFINITIONS
= {OPEN LichenDataStructure;
RoledPortList: TYPE ~ LIST OF RoledPort;
RoledPort: TYPE ~ RECORD [role: NATURAL, port: Port];
Analysis: TYPE = REF AnalysisPrivate;
AnalysisPrivate: TYPE = RECORD [
roles: NATURAL,
subjTypes: Seq--role é CellType--,
wag: WireAnswering,
doomedPorts: VarSet ← --CreateHashSet[]--,
losses, fromGains, toGains: NATURAL ← 0
];
WireAnswering: TYPE = REF WireAnsweringPrivate;
WireAnsweringPrivate: TYPE = RECORD [
oldSubjConnectionss: RefSeq--role é RefTable(subj port b wire connected to that port of that subject at first site)--,
anses: Function--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: Seq--role é 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];
instanceType: READONLY Function;
}.