EDIFAndCore:
CEDAR
DEFINITIONS = {
Error: ERROR [msg: ROPE];
Warning: SIGNAL [msg: ROPE];
LORA: TYPE = LIST OF REF ANY;
ATOMList: TYPE = LIST OF ATOM;
ROPE: TYPE = Rope.ROPE;
RopeList: TYPE = LIST OF ROPE;
Dictionary: TYPE = HashTable.Table;
CoreCellType: TYPE = Core2.CellType;
Assertions: TYPE = Asserting.Assertions;
EDIFWhole: TYPE = REF EDIFWholePrivate;
EDIFWholePrivate:
TYPE =
RECORD [
name: NameStuff,
status: Status,
designs: Dictionary--of Design--,
libraries: Dictionary--of Library--,
externalLibraries: Dictionary--of <don't care>--,
comments: Comments,
ues: UserExtensions];
NameStuff:
TYPE =
RECORD [
edif:
ROPE ←
NIL,
The EDIF Identifier used
rename:
ROPE ←
NIL
The unrestricted string
];
Comment: TYPE = RopeList ← NIL;
Comments: TYPE = LIST OF Comment ← NIL;
UserExtensions: TYPE = LIST OF UserExtension ← NIL;
UserExtension:
TYPE =
RECORD [
name: NameStuff,
stuff: LORA
];
Status: TYPE = REF StatusPrivate;
StatusPrivate:
TYPE =
RECORD [
version: Version ← unspecifiedVersion,
level: Level ← unspecifiedLevel,
writtens: WrittenList,
comments: Comments,
ues: UserExtensions];
unspecifiedVersion: Version = [unspecifiedINT, unspecifiedINT, unspecifiedINT];
Version:
TYPE =
RECORD [major, medium, minor: INT ← 0]
← [unspecifiedINT, unspecifiedINT, unspecifiedINT];
Level: TYPE = INTEGER [-1 .. 2];
unspecifiedLevel: Level = -1;
WrittenList: TYPE = LIST OF Written;
Written: TYPE = REF WrittenPrivate;
WrittenPrivate:
TYPE =
RECORD [
time: BasicTime.GMT ← BasicTime.nullGMT,
accountings: AccountingList,
comments: Comments,
ues: UserExtensions];
AccountingList: TYPE = LIST OF Accounting;
Accounting: TYPE = REF AccountingPrivate;
AccountingPrivate:
TYPE =
RECORD [
name: ATOM,
data: ROPE ← NIL
];
Design: TYPE = REF DesignPrivate;
DesignPrivate:
TYPE =
RECORD [
name: NameStuff,
rootCellType: CellType,
status: Status ← NIL,
comments: Comments,
ues: UserExtensions];
CellType: TYPE = REF CellTypePrivate;
CellTypePrivate:
TYPE =
RECORD [
name: NameStuff,
Apply: PROC [args: LORA, data: REF ANY] RETURNS [cct: CoreCellType],
data: REF ANY
];
Library: TYPE = REF LibraryPrivate;
LibraryPrivate:
TYPE =
RECORD [
name: NameStuff,
status: Status ← NIL,
technology: Technology ← NIL,
cells: Dictionary--of CellType--,
comments: Comments,
ues: UserExtensions];
Technology: TYPE = REF TechnologyPrivate;
TechnologyPrivate:
TYPE =
RECORD [
figureGroupDefaults: Dictionary--of FigureGroupDefault--,
units: Units,
simulationAlgebras: Dictionary--of SimulationAlgebra--,
comments: Comments,
ues: UserExtensions];
Units:
TYPE =
RECORD [
systemToScales: Dictionary--of DScales--,
dimensionToScales: Dictionary--of SScales-- ← NIL
];
DScales: TYPE = REF DScalesPrivate;
DScalesPrivate:
TYPE =
RECORD [
system: ROPE,
scales: Dictionary--of Scale--,
comments: Comments,
ues: UserExtensions];
SScales: TYPE = REF SScalesPrivate;
SScalesPrivate:
TYPE =
RECORD [
dimension: ROPE,
scales: Dictionary--of Scale--
];
Scale: TYPE = REF ScalePrivate;
ScalePrivate:
TYPE =
RECORD [
system, dimension: ROPE,
factor: REAL
];
1 in the EDIF file corresponds to factor*name in system.
FigureGroupDefault: TYPE = REF FigureGroupDefaultPrivate;
FigureGroupDefaultPrivate:
TYPE =
RECORD [
name: NameStuff,
pathType: PathType ← unspecifiedPathType,
width: INT ← unspecifiedINT,
color: Imager.ConstantColor ← unspecifiedColor,
fillPattern: ImagerPixelMap.PixelMap ← unspecifiedPixelMap,
borderPattern: ImagerPixelMap.PixelMap ← unspecifiedPixelMap,
comments: Comments,
ues: UserExtensions];
unspecifiedPathType: PathType = [];
PathType:
TYPE =
RECORD [
end: EndType ← unspecified,
corner: CornerType ← unspecified
];
EndType: TYPE = {extend, truncate, round, unspecified};
CornerType: TYPE = {extend, truncate, round, unspecified};
unspecifiedINT: INT = FIRST[INT];
unspecifiedColor: Imager.ConstantColor = NIL;
unspecifiedPixelMap: ImagerPixelMap.PixelMap = [
sOrigin: 0, fOrigin: 0, sMin: 0, fMin: 0, sSize: 0, fSize: 0, refRep: NIL
];
SimulationAlgebra: TYPE = REF SimulationAlgebraPrivate;
SimulationAlgebraPrivate:
TYPE =
RECORD [
name: NameStuff,
values: ATOMSequence,
combinations: ATOMSequence,
values[i] join values[j] = combinations[c[i, j, values.Length[]]] when i <= j.
c[0, j, n] = j.
c[i, j, n] = c[i-1, n-1, n] + 1 + j - i
isolated: ATOM,
simulationMaps: HashTable.Table--from: SimulationAlgebra b SimulationAlgebraMap--
];
ATOMSequence: TYPE = REF ATOMSequencePrivate;
ATOMSequencePrivate: TYPE = RECORD [atoms: SEQUENCE length: NAT OF ATOM];
SimulationAlgebraMap: TYPE = REF SimulationAlgebraMapPrivate;
SimulationAlgebraMapPrivate:
TYPE =
RECORD [
from, to: SimulationAlgebra,
forward: HashTable.Table--from:ATOM b to:ATOM--,
comments: Comments,
ues: UserExtensions];
EDIFToRope: PROC [ew: EDIFWhole] RETURNS [r: ROPE];
EDIFToStream: PROC [ew: EDIFWhole, to: IO.STREAM];
EDIFToFile: PROC [ew: EDIFWhole, fileName: ROPE];
EDIFFromRope: PROC [r: ROPE] RETURNS [ew: EDIFWhole];
EDIFFromStream: PROC [from: IO.STREAM] RETURNS [ew: EDIFWhole];
EDIFFromFile: PROC [fileName: ROPE] RETURNS [ew: EDIFWhole];
ToEDIFIdentifier: PROC [r: ROPE] RETURNS [id: ROPE];
FromEDIFIdentifier: PROC [id: ROPE] RETURNS [r: ROPE];
}.