Last active
October 4, 2017 13:46
-
-
Save kenwebb/fb6d73433d5f825e63a1aedda6738019 to your computer and use it in GitHub Desktop.
Bigraphs 2017 04 - Big Red
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!--Xholon Workbook http://www.primordion.com/Xholon/gwt/ MIT License, Copyright (C) Ken Webb, Wed Oct 04 2017 09:46:02 GMT-0400 (EDT)--> | |
<XholonWorkbook> | |
<Notes><![CDATA[ | |
Xholon | |
------ | |
Title: Bigraphs 2017 04 - Big Red | |
Description: | |
Url: http://www.primordion.com/Xholon/gwt/ | |
InternalName: fb6d73433d5f825e63a1aedda6738019 | |
Keywords: | |
My Notes | |
-------- | |
October 4, 2017 | |
References | |
---------- | |
() https://github.com/ale-f/big-red | |
A graphical development environment for bigraphs, built upon Eclipse. | |
5 years old | |
() https://github.com/ale-f/big-red/tree/master/doc/examples/printing | |
a simple example | |
I can direectly add these files to the Xholon CSH | |
]]></Notes> | |
<_-.XholonClass> | |
<PhysicalSystem/> | |
<bigraph superClass="Bigraph"/> | |
<signature/> | |
<edge superClass="HyperedgeBG"/> | |
<appearance/> | |
<outername superClass="OuterNameBG"/> | |
<root superClass="RootBG"/> | |
<!--<node superClass="NodeBG"/> "node" is already in the Xholon IH as a child of "gexf" --> | |
<port superClass="PortBG"/> | |
<control/> | |
<shape/> | |
<point/> | |
</_-.XholonClass> | |
<xholonClassDetails> | |
</xholonClassDetails> | |
<PhysicalSystem> | |
<!-- signature --> | |
<signature:signature xmlns:signature="http://www.itu.dk/research/pls/xmlns/2010/signature"> | |
<signature:control xmlns:big-red="http://www.itu.dk/research/pls/xmlns/2010/big-red" big-red:label="P" kind="active" name="Printer"> | |
<signature:port name="spool"> | |
<big-red:port-appearance big-red:distance="0.4857142857142857" big-red:segment="2"/> | |
</signature:port> | |
<big-red:shape big-red:shape="polygon"> | |
<big-red:point big-red:x="30" big-red:y="40"/> | |
<big-red:point big-red:x="-40" big-red:y="40"/> | |
<big-red:point big-red:x="-40" big-red:y="-30"/> | |
<big-red:point big-red:x="30" big-red:y="-20"/> | |
</big-red:shape> | |
<big-red:appearance big-red:fillColor="#ffffff" big-red:outlineColor="#000000"/> | |
</signature:control> | |
<signature:control xmlns:big-red="http://www.itu.dk/research/pls/xmlns/2010/big-red" big-red:label="U" kind="active" name="User"> | |
<signature:port name="identifier"> | |
<big-red:port-appearance big-red:distance="0.0" big-red:segment="0"/> | |
</signature:port> | |
<big-red:shape big-red:shape="polygon"> | |
<big-red:point big-red:x="150" big-red:y="0"/> | |
<big-red:point big-red:x="279" big-red:y="225"/> | |
<big-red:point big-red:x="20" big-red:y="225"/> | |
</big-red:shape> | |
<big-red:appearance big-red:fillColor="#ffffff" big-red:outlineColor="#000000"/> | |
</signature:control> | |
<signature:control xmlns:big-red="http://www.itu.dk/research/pls/xmlns/2010/big-red" big-red:label="J" kind="active" name="Job"> | |
<signature:port name="owner"> | |
<big-red:port-appearance big-red:distance="0.9952856772511103" big-red:segment="0"/> | |
</signature:port> | |
<big-red:shape big-red:shape="oval"/> | |
<big-red:appearance big-red:fillColor="#ffffff" big-red:outlineColor="#ff0000"/> | |
</signature:control> | |
<signature:control xmlns:big-red="http://www.itu.dk/research/pls/xmlns/2010/big-red" big-red:label="R" kind="active" name="Room"> | |
<signature:port name="door"> | |
<big-red:port-appearance big-red:distance="0.5" big-red:segment="1"/> | |
</signature:port> | |
<big-red:shape big-red:shape="polygon"> | |
<big-red:point big-red:x="0" big-red:y="0"/> | |
<big-red:point big-red:x="0" big-red:y="40"/> | |
<big-red:point big-red:x="-40" big-red:y="40"/> | |
<big-red:point big-red:x="-40" big-red:y="0"/> | |
</big-red:shape> | |
<big-red:appearance big-red:fillColor="#ffffff" big-red:outlineColor="#000000"/> | |
</signature:control> | |
<signature:control xmlns:big-red="http://www.itu.dk/research/pls/xmlns/2010/big-red" big-red:label="S" kind="active" name="Spool"> | |
<signature:port name="pool"> | |
<big-red:port-appearance big-red:distance="0.48148148148148145" big-red:segment="3"/> | |
</signature:port> | |
<big-red:shape big-red:shape="polygon"> | |
<big-red:point big-red:x="30" big-red:y="0"/> | |
<big-red:point big-red:x="53" big-red:y="11"/> | |
<big-red:point big-red:x="59" big-red:y="36"/> | |
<big-red:point big-red:x="43" big-red:y="57"/> | |
<big-red:point big-red:x="16" big-red:y="57"/> | |
<big-red:point big-red:x="0" big-red:y="36"/> | |
<big-red:point big-red:x="6" big-red:y="11"/> | |
</big-red:shape> | |
<big-red:appearance big-red:fillColor="#ffffff" big-red:outlineColor="#000000"/> | |
</signature:control> | |
</signature:signature> | |
<!-- rules --> | |
<!-- bigraph | |
I've changed all instances of "node to "NodeBG" because the Xholon IH already uses "node" | |
--> | |
<bigraph:bigraph xmlns:bigraph="http://www.itu.dk/research/pls/xmlns/2010/bigraph"> | |
<signature:signature xmlns:signature="http://www.itu.dk/research/pls/xmlns/2010/signature" src="../signatures/printing.bigraph-signature"/> | |
<bigraph:edge name="a"> | |
<big-red:appearance xmlns:big-red="http://www.itu.dk/research/pls/xmlns/2010/big-red" big-red:fillColor="#000000" big-red:outlineColor="#7f7f7f"/> | |
</bigraph:edge> | |
<bigraph:edge name="b"> | |
<big-red:appearance xmlns:big-red="http://www.itu.dk/research/pls/xmlns/2010/big-red" big-red:fillColor="#000000" big-red:outlineColor="#ffa500" height="10" width="10" x="169" y="281"/> | |
</bigraph:edge> | |
<bigraph:outername name="Jeff"> | |
<big-red:appearance xmlns:big-red="http://www.itu.dk/research/pls/xmlns/2010/big-red" big-red:fillColor="#000000" big-red:outlineColor="#1e90ff" height="50" width="50" x="257" y="29"/> | |
</bigraph:outername> | |
<bigraph:root name="1"> | |
<bigraph:NodeBG control="Room" name="b"> | |
<bigraph:port link="b" name="door"/> | |
<bigraph:NodeBG control="Printer" name="e"> | |
<bigraph:port link="a" name="spool"/> | |
<big-red:appearance xmlns:big-red="http://www.itu.dk/research/pls/xmlns/2010/big-red" big-red:fillColor="#ffffff" big-red:outlineColor="#000000" height="50" width="50" x="25" y="25"/> | |
</bigraph:NodeBG> | |
<big-red:appearance xmlns:big-red="http://www.itu.dk/research/pls/xmlns/2010/big-red" big-red:fillColor="#ffffff" big-red:outlineColor="#000000" height="100" width="100" x="22" y="82"/> | |
</bigraph:NodeBG> | |
<bigraph:NodeBG control="Spool" name="c"> | |
<bigraph:port link="a" name="pool"/> | |
<big-red:appearance xmlns:big-red="http://www.itu.dk/research/pls/xmlns/2010/big-red" big-red:fillColor="#ffffff" big-red:outlineColor="#000000" height="50" width="50" x="47" y="13"/> | |
</bigraph:NodeBG> | |
<bigraph:NodeBG control="Room" name="f"> | |
<bigraph:port link="b" name="door"/> | |
<bigraph:NodeBG control="User" name="g"> | |
<bigraph:port link="Jeff" name="identifier"/> | |
<bigraph:NodeBG control="Job" name="h"> | |
<big-red:appearance xmlns:big-red="http://www.itu.dk/research/pls/xmlns/2010/big-red" big-red:fillColor="#ffffff" big-red:outlineColor="#ff0000" height="21" width="23" x="21" y="43"/> | |
</bigraph:NodeBG> | |
<big-red:appearance xmlns:big-red="http://www.itu.dk/research/pls/xmlns/2010/big-red" big-red:fillColor="#ffffff" big-red:outlineColor="#000000" height="75" width="66" x="24" y="21"/> | |
</bigraph:NodeBG> | |
<big-red:appearance xmlns:big-red="http://www.itu.dk/research/pls/xmlns/2010/big-red" big-red:fillColor="#ffffff" big-red:outlineColor="#000000" height="119" width="114" x="144" y="23"/> | |
</bigraph:NodeBG> | |
<big-red:appearance xmlns:big-red="http://www.itu.dk/research/pls/xmlns/2010/big-red" big-red:fillColor="#000000" big-red:outlineColor="#000000" height="200" width="282" x="25" y="100"/> | |
</bigraph:root> | |
</bigraph:bigraph> | |
</PhysicalSystem> | |
<PhysicalSystembehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[ | |
var me, beh = { | |
postConfigure: function() { | |
me = this.cnode.parent(); | |
me.println("removing GUI nodes ..."); | |
this.bigred2Xholon(me); | |
}, | |
bigred2Xholon: function(node) { | |
var nodeXhcName = node.xhc().name(); | |
switch (nodeXhcName) { | |
case "appearance": | |
case "shape": | |
case "point": | |
case "port-appearance": | |
node.remove(); | |
return; | |
case "control": | |
node.role("%" + node.kind + " " + node.name + "_" + node["big-red:label"] + " : " + "NUMPORTS" + ";"); | |
break; | |
case "edge": | |
node.role(node.name); | |
break; | |
case "outername": | |
node.role(node.name); | |
break; | |
case "root": | |
node.role(node.name); | |
break; | |
case "NodeBG": | |
node.role(node.control + " " + node.name); | |
break; | |
case "port": | |
node.role(node.link + " " + node.name); | |
break; | |
default: | |
break; | |
} | |
var child = node.first(); | |
while (child) { | |
var nextchild = child.next(); | |
this.bigred2Xholon(child); | |
child = nextchild; | |
} | |
} | |
} | |
]]></PhysicalSystembehavior> | |
<SvgClient><Attribute_String roleName="svgUri"><![CDATA[data:image/svg+xml, | |
<svg width="100" height="50" xmlns="http://www.w3.org/2000/svg"> | |
<g> | |
<title>bigraph</title> | |
<rect id="PhysicalSystem/bigraph" fill="#98FB98" height="50" width="50" x="25" y="0"/> | |
</g> | |
</svg> | |
]]></Attribute_String><Attribute_String roleName="setup">${MODELNAME_DEFAULT},${SVGURI_DEFAULT}</Attribute_String></SvgClient> | |
</XholonWorkbook> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment