<> <> DIRECTORY Basics, AbSets, IO, LichenDataStructure, SetBasics, ViewerClasses; LichenFromExtPrivate: CEDAR DEFINITIONS IMPORTS SetBasics = {OPEN Sets:AbSets, LichenDataStructure; REFTEXT: TYPE = REF TEXT; Viewer: TYPE = ViewerClasses.Viewer; Path: TYPE ~ RECORD [ cells: LORA _ NIL, wireName: SteppyName _ noName]; PathV: PROC [p: Path] RETURNS [Sets.Value] ~ INLINE {RETURN [[NEW [Path _ p]]]}; VPath: PROC [v: Sets.Value] RETURNS [Path] ~ INLINE {RETURN [NARROW[v.VA, REF Path]^]}; PTail: PROC [p: Path] RETURNS [Path] ~ INLINE {RETURN [[p.cells.rest, p.wireName]]}; paths: READONLY Sets.Space; SourceList: TYPE = LIST OF Source; Source: TYPE = RECORD [stream: IO.STREAM _ NIL, name: ROPE _ NIL]; Reader: TYPE = REF ReaderRep; ReaderRep: TYPE = RECORD [ keyword: ROPE, read: PROC [s: Source, reader: Reader, cr: CellReading], <> data: REF ANY]; DesignReading: TYPE = REF DesignReadingRep; DesignReadingRep: TYPE = MONITORED RECORD [ d: Design, wDir: ROPE, rg: Renaming, fetTypes: Fn--FetType unkosherArrays: Set, toMerge: Fn--array prefix arraySpecs: Fn--array cell type mostRecentPathToMerge: Path _ [], impossibleMerges: ImpossibleMergeList _ NIL, buffer: REFTEXT, pacifier, pie, label, pause: Viewer, stop: BOOL _ FALSE, stack: SourceList _ NIL, curCellTypeName, prefix: ROPE _ NIL, curArray: BOOL _ FALSE, curCellFileLength: REAL _ 0, change: CONDITION]; undefinedINT: INT = FIRST[INT]; Renaming: TYPE ~ Fn--cell type name ImpossibleMergeList: TYPE = LIST OF ImpossibleMerge; ImpossibleMerge: TYPE = RECORD [ arrayInstance: CellInstance, path1, path2: Path]; CellReading: TYPE = REF CellReadingRep; CellReadingRep: TYPE = RECORD [ dr: DesignReading, ct: CellType, name: ROPE, firstMerge: BOOL _ TRUE, resistClasses: INT _ undefinedINT, rScale: REAL--ohms-- _ 1.0E-3, cScale: REAL--farads-- _ 1.0E-18, lUnits: REAL--meters-- _ 1.0E-8, scalingDefined: BOOL _ FALSE, fetCount: INT _ 0, newArrays: Set--of array cell types instantiated in ct--, waitingMerges: PathPairList _ NIL ]; PathPairList: TYPE = LIST OF PathPair; Use: TYPE = RECORD [childName: ROPE, as: ArraySpec]; ArraySpec: TYPE = RECORD [ variant: SELECT kind: * FROM scalar => [], array => [ range: Range2, sep: Int2 ] ENDCASE]; FetTerminal: TYPE = RECORD [ name: ROPE, length: INT]; IntBox: TYPE = RECORD [xmin, ymin, xmax, ymax: INT]; PathPair: TYPE = REF PathPairPrivate; PathPairPrivate: TYPE = RECORD [p1, p2: Path]; FetType: TYPE = REF FetTypeRep; FetTypeRep: TYPE = RECORD [ className: ROPE, area, perim, twiceLength: INT, ct: CellType _ NIL]; Register: PROC [keyword: ROPE, read: PROC [s: Source, reader: Reader, cr: CellReading], data: REF ANY _ NIL]; ReadCellType: PROC [d: Design, cellFileName: ROPE, dr: DesignReading] RETURNS [ct: CellType]; TryArrayFile: PROC [cr: CellReading]; FinishWaitingMerges: PROC [cr: CellReading]; MergeWork: PUBLIC PROC [cr: CellReading, path1, path2: Path] RETURNS [success: BOOL]; MergeFinal: PROC [dr: DesignReading, ct: CellType, path1, path2: Path]; ArrayMerge: PROC [cr: CellReading, arrayInstance: CellInstance, instanceName: ROPE, path1, path2: Path, may: BOOL] RETURNS [merged: BOOL]; DoMerges: PROC [s: Source, cr: CellReading]; ComparePaths: PROC [path1, path2: Path] RETURNS [c: SetBasics.TotalComparison]; CheckArrayUsage: PROC [d: Design, act: CellType]; ParsePath: PROC [s: Source, dr: DesignReading, from: CellType, asRope: ROPE, map: BOOL] RETURNS [Path]; FmtPath: PROC [path: Path] RETURNS [r: ROPE]; MapName: PROC [dr: DesignReading, ct: CellType, wn: ROPE] RETURNS [SteppyName]; MapFirst: PROC [dr: DesignReading, ct: CellType, sn: SteppyName] RETURNS [SteppyName]; PathGet: PROC [dr: DesignReading, from: CellType, path: Path, mayAdd: BOOL] RETURNS [w: Wire]; TokenBreak: IO.BreakProc; R: PROC [r: ROPE] RETURNS [ROPE] ~ INLINE {RETURN [r]}--stupid goddam anachronism--; }.