DIRECTORY CD, CDBottomUp, CDCommandOps, CDOps, CDTextExtraction, CDSequencer, IO, Rope, TerminalIO; CDPExt: CEDAR PROGRAM IMPORTS CDBottomUp, CDCommandOps, CDOps, CDTextExtraction, CDSequencer, IO, TerminalIO = BEGIN propertyExtractor: CDBottomUp.Class = CDBottomUp.Register[DoExt, ReUseExt]; Message: PROC [handle: CDBottomUp.Handle, ob: CD.Object, errNo: INT, prefix: Rope.ROPE] = BEGIN TerminalIO.PutF[" %g %g; found %g errors\n", IO.rope[prefix], IO.rope[CDOps.ObjectRope[ob]], IO.int[errNo]]; IF errNo>0 THEN { handle.cnt _ handle.cnt+1; handle.r _ IO.PutFR["%g %g errors in %g\n", IO.rope[handle.r], IO.int[errNo], IO.rope[CDOps.ObjectRope[ob]]] }; CDSequencer.CheckAborted[handle.design]; END; DoExt: CDBottomUp.DoProc = BEGIN errNo: INT ~ CDTextExtraction.ExtractProperties[handle.design, ob].errors; Message[handle, ob, errNo, "extracting properties: "]; val _ NEW[INT_errNo]; END; ReUseExt: CDBottomUp.ReUseProc = BEGIN WITH previousVal SELECT FROM ri: REF INT => Message[handle, ob, ri^, "previously extracted properties: "]; ENDCASE => NULL; END; HierarchicalPropertyExtractionComm: PROC [comm: CDSequencer.Command] = BEGIN HierarchicalPropertyExtraction: PROC [design: CD.Design, ob: CD.Object] = BEGIN h: CDBottomUp.Handle _ CDBottomUp.StartRecurse[propertyExtractor, design, ob].handle; IF h.cnt=0 THEN TerminalIO.PutRope["no errors found\n"] ELSE TerminalIO.PutF1["error(s) found in %g object(s)\n", [integer[h.cnt]]] END; inst: CD.Instance _ CDOps.TheInstance[comm.design, "hierarchical Property extraction\n"]; IF inst#NIL THEN HierarchicalPropertyExtraction[comm.design, inst.ob]; END; CDCommandOps.RegisterWithMenu[menu: $ProgramMenu, entry: "Hierarchical Property extraction", proc: HierarchicalPropertyExtractionComm, key: $HPExt]; END. ΜCDPExt.mesa Copyright c 1985, 1986 by Xerox Corporation. All rights reserved. Created by Jacobi, December 12, 1985 2:19:57 pm PST Last edited by: Christian Jacobi, October 21, 1986 4:00:22 pm PDT ΚP˜codešœ ™ Kšœ Οmœ7™BK™3K™A—šΟk ˜ Kšžœ˜Kšœ ˜ Kšœ ˜ K˜Kšœ˜Kšœ ˜ Kšœ˜Kšœ˜Kšœ ˜ —K˜šΟnœžœž˜KšžœAžœ˜X—Kšžœ˜K˜KšœK˜KK˜š Ÿœžœ!žœžœžœ˜ZKšž˜Kšœ.žœžœžœ ˜mšžœ žœ˜Kšœ˜Kš œ žœ žœžœ žœ˜mK˜—Kšœ(˜(Kšžœ˜—K˜šΟbœ˜Kšž˜Kšœžœ@˜JKšœ6˜6Kšœžœžœ˜Kšžœ˜—K˜š œ˜ Kšž˜šžœ žœž˜KšœžœžœB˜MKšžœžœ˜—Kšžœ˜—K˜šΠbn"œžœ˜FKšž˜K˜šŸœžœ žœ žœ ˜IKšž˜KšœU˜UKšžœ žœ(˜7KšžœG˜KKšžœ˜—K˜KšœžœQ˜YKšžœžœžœ6˜FKšžœ˜—K˜Kšœ”˜”Kšžœ˜K˜—…—ξ