RoseSimCheck.Mesa
Last Edited by: Spreitzer, April 15, 1985 3:06:49 pm PST
DIRECTORY OrderedSymbolTableRef, RoseTypes;
RoseSimCheck: CEDAR PROGRAM
IMPORTS OrderedSymbolTableRef, RoseTypes
={OPEN RoseTypes;
Check: PROC [rootCell: Cell] = {
[] ← CheckCell[rootCell];
};
CheckCell: PROC [item: REF ANY] RETURNS [stop: BOOL] = {
cell: Cell ← NARROW[item];
IF cell.substantiality # (SELECT cell.expansion FROM Leaf => Real, Expand => Shadow, ENDCASE => ERROR) THEN ERROR;
IF (cell.substantiality=Real) # (cell.realCellStuff # NIL) THEN ERROR;
IF (cell.firstInternalNode#NIL) AND (cell.substantiality=Real) THEN ERROR;
IF (cell.leftChild#NIL) AND (cell.substantiality=Real) THEN ERROR;
FOR pi: PortIndex IN [0 .. cell.type.ports.length) DO
IF NOT Conforming[cell.interfaceNodes[pi].type, cell.type.ports[pi].type] THEN ERROR;
ENDLOOP;
cell.components.EnumerateIncreasing[CheckCell];
stop ← FALSE;
};
}.