TestPipalCD.cm
Copyright Ó 1988 by Xerox Corporation. All rights reserved.
Louis Monier January 18, 1988 10:40:55 am PST
Bertrand Serlet July 3, 1988 2:16:42 pm PDT
Install PipalCD
Run -a PipalCDPackage
Run -a TestPipalCD
← &cdobj ← CDCurves.CreateLine[LIST [[0, 0], [100, 64]], 4, CMosB.pol].ob
← &ob ← PipalCD.CDToPObject[&cdobj]
← &ov ← Pipal.CreateOverlay[LIST [&ob]]
← PipalOverlayEditorImpl.Test[PipalOverlayMutant.Create[&ov]]
← TestPipalCD.Draw[&ob]
← &ob2 ← TestPipalCD.InOut[&ob]
← &ov2 ← Pipal.CreateOverlay[LIST [&ob2]]
← PipalOverlayEditorImpl.Test[PipalOverlayMutant.Create[&ov2]]
← TestPipalCD.Draw[&ob2]
← &master ← RopeFile.SimpleCreate["WavesColor.ip"]
← &ob ← PipalMos.CreatePictureFromInterpress[[100, 100], &master]
← &ob2 ← TestPipalCD.InOut[&ob]
← TestPipalCD.Draw[&ob2]
← &design ← PW.OpenDesign["SCLibCMOSB"]
← &cdobj ← PW.Get[&design, "nand2.mask"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← PipalReal.ObjectSize[&ob] -- to avoid crashing during a paint proc!
← &viewer ← PipalEdit.CreateViewer[&ob]
← CDImports.LoadAndBindAll[&design]
← &cdobj ← PW.Get[&design, "nand2.sch"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← PipalReal.ObjectSize[&ob] -- to avoid crashing during a paint proc!
← &viewer ← PipalEdit.CreateViewer[&ob]
← &design ← PW.OpenDesign["Logic"]
← &cdobj ← PW.Get[&design, "CounterUp.sch"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← PipalReal.ObjectSize[&ob] -- to avoid crashing during a paint proc!
← &viewer ← PipalEdit.CreateViewer[&ob]
← &design ← PW.OpenDesign["DynabusPads"]
← &cdobj ← PW.Get[&design, "PadAll.mask"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← PipalReal.ObjectSize[&ob] -- to avoid crashing during a paint proc!
← &ob ← PipalReal.CreateTransform[ImagerTransformation.Scale[0.2], &ob]
← &viewer ← PipalEdit.CreateViewer[&ob]
← BasicTime.PulsesToSeconds[PipalEditImpl.lastViewerPaintTime]
big object!
TakeHeapStats
← &design ← PW.OpenDesign["AnalogTestLayout"]
← &cdobj ← PW.Get[&design, "AnalogTest"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← PipalReal.ObjectSize[&ob] -- to avoid crashing during a paint proc!
TakeHeapStats -d
← &ob ← PipalReal.CreateTransform[ImagerTransformation.Scale[0.2], &ob]
← &viewer ← PipalEdit.CreateViewer[&ob]
← BasicTime.PulsesToSeconds[PipalEditImpl.lastViewerPaintTime]
← &design ← PW.OpenDesign["SCLibCMOSB"]
← &cdobj ← PW.Get[&design, "nand2.mask"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← PipalReal.ObjectSize[&ob] -- to avoid crashing during a paint proc!
← PipalOverlayEditorImpl.Test[PipalOverlayMutant.Create[&ob.child.child]]
IO test
← &design ← PW.OpenDesign["SCLibCMOSB"]
← &cdobj ← PW.Get[&design, "nand2.mask"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← &ob2 ← TestPipalCD.InOut[&ob]
← CDImports.LoadAndBindAll[&design]
← &cdobj ← PW.Get[&design, "nand2.sch"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← &ob2 ← TestPipalCD.InOut[&ob]
← TestPipalCD.Draw[&ob]
← TestPipalCD.Draw[&ob2]
← &design ← PW.OpenDesign["Logic"]
← &cdobj ← PW.Get[&design, "CounterUp.sch"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← &ob2 ← TestPipalCD.InOut[&ob]
← &design ← PW.OpenDesign["DynabusPads"]
← &cdobj ← PW.Get[&design, "PadAll.mask"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← &ob2 ← TestPipalCD.InOut[&ob]
← &design ← PW.OpenDesign["AnalogTestLayout"]
← &cdobj ← PW.Get[&design, "AnalogTest"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← &ob2 ← TestPipalCD.InOut[&ob]
← TestPipalCD.Draw[&ob]
← TestPipalCD.Draw[&ob2]
-- Directory/Import test
← &design ← PW.OpenDesign["SCLibCMOSB"]
← &cdobj ← PW.Get[&design, "nand2.mask"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← &ob2 ← TestPipalCD.InOut[&ob]
← &import ← PipalIO.CreateRefereedImport["Foo.Bar.sch", FALSE, &ob]
← &child ← PipalInt.NthChild[&import].nthChild
← IF LOOPHOLE[&import.creationTime, INT]=LOOPHOLE[BasicTime.nullGMT, INT] THEN $OK ELSE ERROR
← &bidon ← Pipal.CreateOverlay[LIST[&import]]
← PipalIO.SaveObject["Bidon.sch", &bidon]
← IF LOOPHOLE[&import.creationTime, INT]#LOOPHOLE[BasicTime.nullGMT, INT] THEN $OK ELSE ERROR
← &table ← RefTab.Create[3, NIL, NIL]
← RefTab.Store[&table, &ob, &ob2]
← PipalOps.TransitiveReplace[&bidon, &table]
← IF RefTab.Fetch[&table, &ob].val=&ob2 THEN $OK ELSE ERROR
← &import2 ← RefTab.Fetch[&table, &import].val
← IF &import2=NIL OR &import2#&import THEN $OK ELSE ERROR
← IF LOOPHOLE[&import2.creationTime, INT]=LOOPHOLE[BasicTime.nullGMT, INT] THEN $OK ELSE ERROR
← &bidon2 ← RefTab.Fetch[&table, &bidon].val
← IF &bidon2=NIL OR &bidon2#&bidon THEN $OK ELSE ERROR
← PipalIO.SaveObject["Bidon.sch", &bidon2]
← IF LOOPHOLE[&import2.creationTime, INT]#LOOPHOLE[BasicTime.nullGMT, INT] THEN $OK ELSE ERROR
Stats
Statistics on
← &design ← PW.OpenDesign["DynabusPads"]
← &cdobj ← PW.Get[&design, "PadAll.mask"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← TestPipalCD.Stats[&ob]
← PipalOpsImpl.simpleReplace ← TRUE
← &map1 ← TestPipalCD.FindEquals[&ob]
← PipalOps.TransitiveReplace[&ob, &map1]
← &ob1 ← RefTab.Fetch[&map1, &ob].val
← IF Pipal.Equal[&ob1, &ob] THEN $OK ELSE ERROR
← &map2 ← TestPipalCD.FindEquals[&ob]
← PipalOps.TransitiveReplace[&ob, &map2]
← &ob2 ← RefTab.Fetch[&map2, &ob].val
← IF Pipal.Equal[&ob2, &ob] THEN $OK ELSE ERROR
← PipalOpsImpl.simpleReplace ← FALSE
← &map3 ← TestPipalCD.FindEquals[&ob]
← PipalOps.TransitiveReplace[&ob, &map3]
← &ob3 ← RefTab.Fetch[&map3, &ob].val
← IF Pipal.Equal[&ob3, &ob] THEN $OK ELSE ERROR
← &map4 ← TestPipalCD.FindEquals[&ob]
← PipalOps.TransitiveReplace[&ob, &map4]
← &ob4 ← RefTab.Fetch[&map4, &ob].val
← IF Pipal.Equal[&ob4, &ob] THEN $OK ELSE ERROR
← PipalOpsImpl.hashSetFlag ← TRUE
← &map5 ← TestPipalCD.FindEquals[&ob]
← PipalOps.TransitiveReplace[&ob, &map5]
← &ob5 ← RefTab.Fetch[&map5, &ob].val
← IF Pipal.Equal[&ob5, &ob] THEN $OK ELSE ERROR
← &map6 ← TestPipalCD.FindEquals[&ob]
← PipalOps.TransitiveReplace[&ob, &map6]
← &ob6 ← RefTab.Fetch[&map6, &ob].val
← IF Pipal.Equal[&ob6, &ob] THEN $OK ELSE ERROR
← &design ← PW.OpenDesign["AnalogTestLayout"]
← &cdobj ← PW.Get[&design, "AnalogTest"]
← &ob ← PipalCD.CDToPObject[&cdobj]
← TestPipalCD.Stats[&ob]
← &map ← TestPipalCD.FindEquals[&ob]
← PipalOps.TransitiveReplace[&ob, &map]
← &ob ← RefTab.Fetch[&map, &ob].val