DIRECTORY CD, CDDirectory, CDRects, CDSatellites, CDCells, Core, CoreClasses, CoreOps, IO, PipalSinix, PipalSisyph, PW, Rope, TerminalIO; TestPipalSisyph: CEDAR PROGRAM IMPORTS CDDirectory, CoreClasses, CoreOps, PipalSinix, PipalSisyph, PW, TerminalIO = BEGIN CellType: TYPE = Core.CellType; Wire: TYPE = Core.Wire; Object: TYPE = CD.Object; ROPE: TYPE = Core.ROPE; Context: TYPE = PipalSisyph.Context; StructWire: PROC [name: ROPE, n: INT] RETURNS [Wire] = { subWires: LIST OF Wire _ NIL; WHILE n > 0 DO subWires _ CONS[CoreOps.CreateWire[], subWires]; n _ n-1; ENDLOOP; RETURN [CoreOps.CreateWire[elements: subWires, name: name]] }; TreeCellCode: PROC [] RETURNS [CellType] = { wire: Wire _ StructWire["father", 3]; RETURN [CoreClasses.CreateRecordCell[CoreOps.CreateWire[elements: LIST[wire]], CoreOps.CreateWire[elements: LIST[wire]], NIL]]; }; TestWireIcon: PROC [] RETURNS [wire: Wire] = { wire _ CoreOps.CreateWires[size: 3, name: "BigStruct"]; wire[0] _ CoreOps.CreateWire[name: "Zero"]; wire[1] _ CoreOps.CreateWire[name: "One"]; wire[2] _ CoreOps.CreateWires[size: 2, name: "SmallStruct"]; wire[2][0] _ CoreOps.CreateWire[name: "Zero"]; wire[2][1] _ CoreOps.CreateWire[name: "TwoOne"]; }; FooBarWireIcon: PROC [] RETURNS [wires: Core.Wires] = { wires _ LIST [CoreOps.CreateWire[name: "foo"], CoreOps.CreateWire[name: "bar"]]; }; TestCx: PROC [] = BEGIN design: CD.Design _ PW.OpenDesign["ExtractExample"]; targetObj: CD.Object _ CDDirectory.Fetch[design, "nD"].object; cx: Context _ PipalSisyph.Create[design]; result: REF _ PipalSinix.Extract[obj: targetObj, mode: PipalSisyph.mode, userData: cx].result; CoreOps.Print[result, TerminalIO.TOS[]]; ERROR; END; Test: PROC [] = BEGIN design: CD.Design _ PW.OpenDesign["TestPipalSisyph"]; targetObj: CD.Object _ CDDirectory.Fetch[design, "TestCell"].object; cx: Context _ PipalSisyph.Create[design]; result: REF _ PipalSinix.Extract[obj: targetObj, mode: PipalSisyph.mode, userData: cx].result; CoreOps.Print[result, TerminalIO.TOS[]]; END; END. ,TestPipalSisyph.mesa Copyright Σ 1985, 1986, 1987, 1988 by Xerox Corporation. All rights reserved. Created by Pradeep Sindhu, November 26, 1985 3:06:31 pm PST Pradeep Sindhu February 19, 1986 1:11:20 am PST Bertrand Serlet March 5, 1988 7:13:31 pm PST Barth, January 13, 1986 3:30:54 pm PST Κ›˜šœ™JšœN™NIcodešœ8Οk™;Kšœ,™/Kšœ,™,Kšœ#™&J™—š ˜ Kšœ/˜1Kšœ˜Kšœ˜Kšœ˜Kšœ˜K˜—J™šΟnœœ˜Kšœ=œ˜ZK˜Jšœ œ˜Jšœœ ˜Jšœœœ˜Jšœœœ˜Jšœ œ˜$K˜š ž œœœœœ ˜8Jšœ œœœ˜Jšœœ œ+œ˜QJšœ5˜;Jšœ˜J˜—šž œœœ˜,J˜%Jšœ<œ&œ œ˜Jšœ˜K˜—šž œœœ˜.J˜7Jšœ+˜+Jšœ*˜*Jšœ<˜Kšœ)˜)KšœœS˜^Kšœ!œ˜(Kšœ˜Kšœ˜K˜—šžœœ˜Kšœœ œ˜5Kšœ œ7˜DKšœ)˜)KšœœS˜^Kšœ!œ˜(Kšœ˜K˜—Kšœ˜——…—ή ₯