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: BOOL ← FALSE,
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:
BOOL ←
FALSE,
Connected to the border at least once
sawBords:
BOOL ←
FALSE,
Connected to the border by more than one port.
sawElse:
BOOL ←
FALSE,
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:
BOOL ←
FALSE];
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: BOOL ← FALSE] RETURNS [wa: WireAns];
instanceType: READONLY Function;
}.