Verify:
PUBLIC
PROC [env: EnvironmentNode] =
BEGIN
fileNames: LIST OF Rope.ROPE ← NIL;
includedCells: IncludedFileCell ← env.firstIncludedFile
DoFile:
PROC [fileName: Rope.
ROPE, contextTree: ContextTreeNode] =
BEGIN
FOR fns:
LIST
OF Rope.
ROPE ← fileNames, fns.rest
DO
IF Rope.Compare[fileName, fns.first] = equal
THEN ERROR Violation[IO.PutFR["Duplicate file name %g in environment", IO.rope[fileName]]];
ENDLOOP;
fileNames: ← CONS[fileName, fileNames];
VerifyContextTree[contextTree];
END;
DoFile[env.mainFileName, env.mainContextTree];
WHILE includedCells #
NIL
DO
DoFile[includedCells.fileName, includedCells.contextTree];
includedCells ← includedCells.next;
ENDLOOP;
END;