Scheme.Mesa
Last Edited by: Spreitzer, February 12, 1984 6:33 pm
DIRECTORY Atom, OrderedSymbolTableRef, Rope;
SchemeRep: CEDAR DEFINITIONS =
BEGIN
LORA: TYPE = LIST OF REF ANY;
ROPE: TYPE = Rope.ROPE;
Table: TYPE = OrderedSymbolTableRef.Table;
PropList: TYPE = Atom.PropList;
CellType: TYPE = REF CellTypeRep; CellTypeRep: TYPE = RECORD [
name: ROPE,
otherProps: PropList ← NIL,
icons: Table --of PictureDef--,
expansion: PictureDef,
ports: Table --of Port--,
nets: Table --of Net--,
components: Table --of Component--,
writtenFor: INT ← 0 --used only during Write--];
Port: TYPE = REF PortRep; PortRep: TYPE = RECORD [
name: ROPE,
otherProps: PropList ← NIL,
pt: Point,
label: Text ← NIL];
Net: TYPE = REF NetRep; NetRep: TYPE = RECORD [
name: ROPE,
otherProps: PropList ← NIL,
stuff: LORA, --LIST OF UNION [Point, Line, Text]
eatenBy: Net ← NIL];
ComponentPort: TYPE = REF ComponentPortRep; ComponentPortRep: TYPE = RECORD [
component: Component,
port: Port,
point: Point];
Component: TYPE = REF ComponentRep; ComponentRep: TYPE = RECORD [
name: ROPE,
otherProps: PropList ← NIL,
type: CellType,
ports: Table--Of ComponentPort--,
inst: PictureInstance,
label: Text ← NIL];
PictureDef: TYPE = REF PictureDefRep; PictureDefRep: TYPE = RECORD [
name: ROPE,
coordsByValue: ARRAY Axis OF Table --of UNION [Coord, LORA]--,
coordsByName, points: Table,
objects: Table --OF UNION [Line, Text, PictureInstance]--,
instances--of self--: LORANIL, --LIST OF PictureInstance
editor: REF ANYNIL
];
Coord: TYPE = REF CoordRep; CoordRep: TYPE = RECORD [
name: ROPE,
pic: PictureDef,
axis: Axis ← X,
exported: BOOLEANFALSE,
z, sz, dz: REAL ← 0,
dependents: LORA, --LIST OF UNION [Coord, Point]
portName: ROPENIL, --if from PictureInstance
parent: REF ANYNIL, --UNION [Coord, PictureInstance]
exportedTo: Coord --only meaningful during instantiation operation
];
Axis: TYPE = {X, Y};
Vertex: TYPE = ARRAY Axis OF Coord;
VertexReals: TYPE = ARRAY Axis OF REALALL[0];
Point: TYPE = REF PointRep; PointRep: TYPE = RECORD [
c: Vertex,
name: ROPE,
pic: PictureDef,
exported, deleted: BOOLEANFALSE,
dependents: LORA, --LIST OF UNION [Text, Line, PictureInstance]
fromPort: ROPENIL,
fromPI: PictureInstance ← NIL,
fromCP: ComponentPort ← NIL,
toPort: Port ← NIL,
net: Net ← NIL];
Line: TYPE = REF LineRep; LineRep: TYPE = RECORD [
name: ROPE,
a, b: Point,
sa, sb: VertexReals,
net: Net ← NIL];
Text: TYPE = REF TextRep; TextRep: TYPE = RECORD [
name: ROPE,
org: Point,
sxy: VertexReals,
rope, sr: ROPE,
labelOf: REF ANYNIL--UNION [Port, Net, Component]
];
PictureInstance: TYPE = REF PictureInstanceRep;
PictureInstanceRep: TYPE = RECORD [
name: ROPE,
in, of: PictureDef,
org: Point,
s: VertexReals,
coords, points: Table,
asComponent: Component ← NIL];
END.
PictureDefPort: TYPE = REF PictureDefPortRep; PictureDefPortRep: TYPE = RECORD [
pic: PictureDef,
portName: ROPE,
point: Point];
PictureInstancePort: TYPE = REF PictureInstancePortRep;
PictureInstancePortRep: TYPE = RECORD [
pi: PictureInstance,
portName: ROPE,
point: Point];