!759 sS inputDiagram1 = [[CirclesAndLines(circles=[Circle(quickvis="A pixel", text="A pixel", x=d("0.056195965417867436"), y=d("0.058027079303675046")), Circle(text="2-tuple", x=d("0.1988472622478386"), y=d("0.5241779497098646")), Circle(text="x coordinate", x=d("0.5072046109510087"), y=d("0.172147001934236")), Circle(text="y coordinate", x=d("0.5115273775216138"), y=d("0.5377176015473888")), Circle(text="an integer", x=d("0.69164265129683"), y=d("0.3481624758220503"))], imgZoom=d("1.0"), lines=[Arrow(a=t5, b=t30, text="is a"), Arrow(a=t30, b=t51, text="containing"), Arrow(a=t30, b=t72, text="containing"), Arrow(a=t51, b=t93, text="which is"), Arrow(a=t72, b=t93, text="which is")], translate=Pt(x=147, y=83))]]; sS inputDiagram2 = [[CirclesAndLines(circles=[Circle(text="collapse backwards", x=d("0.29827089337175794"), y=d("0.47775628626692457")), Circle(text="is a", x=d("0.670028818443804"), y=d("0.4700193423597679"))], imgZoom=d("1.0"), lines=[Arrow(a=t5, b=t26, text="")], translate=Pt(x=0, y=0))]]; sS inputDiagram3 = [[CirclesAndLines(circles=[Circle(text="containing", x=d("0.31988472622478387"), y=d("0.43133462282398455")), Circle(text="has", x=d("0.7334293948126801"), y=d("0.4274661508704062"))], imgZoom=d("1.0"), lines=[Arrow(a=t5, b=t26, text="replace with")])]]; p { Web web = webFromCALStructure(inputDiagram1); web_upper(web); final Web outWeb = web_cloneWeb(web); for (WebNode toCollapse : web_allForwardRelated(webFromCALStructure(inputDiagram2), "collapse backwards", "")) for (Pair p : web_relationsOfType(outWeb, toCollapse.text())) web_collapseNodeTo(p.b, p.a); web_performReplace(webFromCALStructure(inputDiagram3), outWeb); web_lower(outWeb); printWeb(outWeb); JTabbedPane tabs = showTabbedWebs("Input", web, "Output", outWeb); addToWindow(tabs, jcenteredline( jbutton("Make form", r { thread { L webs = concatLists(ll(outWeb), allWebsFromCE()); O o = hotwire(#1010024); call(o, 'makeForm, quickExport(webs, o), "a pixel"); } }))); }