Skip to content

Instantly share code, notes, and snippets.

@kenwebb
Last active July 31, 2019 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenwebb/f5a7245f2523f10b71545f6f949bab48 to your computer and use it in GitHub Desktop.
Save kenwebb/f5a7245f2523f10b71545f6f949bab48 to your computer and use it in GitHub Desktop.
Island Bigraph4 - Elementary Bigraphs
<?xml version="1.0" encoding="UTF-8"?>
<!--Xholon Workbook http://www.primordion.com/Xholon/gwt/ MIT License, Copyright (C) Ken Webb, Wed Jul 31 2019 06:48:50 GMT-0400 (Eastern Daylight Time)-->
<XholonWorkbook>
<Notes><![CDATA[
Xholon
------
Title: Island Bigraph4 - Elementary Bigraphs
Description:
Url: http://www.primordion.com/Xholon/gwt/
InternalName: f5a7245f2523f10b71545f6f949bab48
Keywords:
My Notes
--------
July 30, 2019
Elementary Bigraphs
References
----------
(1) Milner's Bigraph book (p. 29+)
- elementary node-free bigraphs
- elementary placings
- elementary linkings
(2) Type Systems for Bigraphs, by Ebbe Elsborg, Thomas T. Hildebrandt, and Davide Sangiorgi, 2008
Abstract We propose a novel and uniform approach to type systems for (pro-
cess) calculi, which roughly pushes the challenge of designing type systems
and proving properties about them to the meta-model of bigraphs. Concretely,
we propose to define type systems for the term language for bigraphs, which
is based on a fixed set of elementary bigraphs and operators on these. An
essential elementary bigraph is an ion, to which a control can be attached
modelling its kind (its ordered number of channels and whether it is a guard),
e.g. an input prefix of π-calculus. A model of a calculus is then a set of con-
trols and a set of reaction rules, collectively a bigraphical reactive system
(BRS). Possible advantages of developing bigraphical type systems include: a
deeper understanding of a type system itself and its properties; transfer of the
type systems to the concrete family of calculi that the BRS models; and the
possibility of modularly adapting the type systems to extensions of the BRS
(with new controls). As proof of concept we present a model of a π-calculus,
develop an i/o-type system with subtyping on this model, prove crucial prop-
erties (including subject reduction) for this type system, and transfer these
properties to the (typed) π-calculus.
All bigraphs are obtained by combining elementary bigraphs via the operators of categorical tensor
product and composition. An essential elementary bigraph is an ion, to which a con-
trol can be attached modelling its kind (its ordered number of channels and whether
it is a guard), e.g. an input prefix of π-calculus.
]]></Notes>
<_-.XholonClass>
<TheSystem/>
<BigraphParser superClass="script"/>
</_-.XholonClass>
<xholonClassDetails>
<BigraphParser><DefaultContent>@BigraphParser</DefaultContent></BigraphParser>
<Avatar><Color>rgba(200,0,0,1.0)</Color></Avatar>
</xholonClassDetails>
<TheSystem>
<!-- γ1,1 : 2 → 2 [ref 1] this is the Xholon XML notation rather than Milner's Bigraph notation -->
<Bigraph roleName="0">
<RootBG roleName="0">
<SiteBG roleName="1"/>
</RootBG>
<RootBG roleName="1">
<SiteBG roleName="0"/>
</RootBG>
</Bigraph>
<Bigraph roleName="0.b"><Attribute_String><![CDATA[
B = (VB,EB,PB,ctrlB,prntB,linkB) : 〈m,X〉 → 〈n,Y〉,
m=2, X=∅, n=2, Y={},
VB = {r0,r1,s0,s1},
EB = ∅,
ctrlB = {(r0,RootBG),(r1,RootBG),(s0,SiteBG),(s1,SiteBG)},
prntB = {(s1,r0),(s0,r1)}
]]></Attribute_String><BigraphParser/></Bigraph>
<!-- 1 : 0 → 1 [ref 1] -->
<Bigraph roleName="1">
<RootBG roleName="0"/>
</Bigraph>
<Bigraph roleName="1.b"><Attribute_String><![CDATA[
B = (VB,EB,PB,ctrlB,prntB,linkB) : 〈m,X〉 → 〈n,Y〉,
m=0, X=∅, n=1, Y={},
VB = {0},
EB = ∅,
ctrlB = {(0,RootBG)}
]]></Attribute_String><BigraphParser/></Bigraph>
<!-- join : 2 → 1 [ref 1] -->
<Bigraph roleName="2">
<RootBG roleName="0">
<SiteBG roleName="0"/>
<SiteBG roleName="1"/>
</RootBG>
</Bigraph>
<Bigraph roleName="2.b"><Attribute_String><![CDATA[
B = (VB,EB,PB,ctrlB,prntB,linkB) : 〈m,X〉 → 〈n,Y〉,
m=2, X=∅, n=1, Y={},
VB = {r0,s0,s1},
EB = ∅,
ctrlB = {(r0,RootBG),(s0,SiteBG),(s1,SiteBG)},
prntB = {(s0,r0),(s1,r0)}
]]></Attribute_String><BigraphParser/></Bigraph>
<Animate duration="0.25" selection="#xhanim" xpath="./TheSystem" cssStyle=".d3cpnode circle {stroke-width: 0.5px;}" efParams="{&quot;selection&quot;:&quot;#xhanim&quot;,&quot;sort&quot;:&quot;disable&quot;,&quot;width&quot;:700,&quot;height&quot;:700,&quot;mode&quot;:&quot;tween&quot;,&quot;labelContainers&quot;:true,&quot;includeClass&quot;:true,&quot;includeId&quot;:true,&quot;shape&quot;:&quot;circle&quot;}"/>
</TheSystem>
<TheSystembehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
this.parent().parent().append(this.parent().xpath("Animate").remove());
//# sourceURL=TheSystembehavior.js
]]></TheSystembehavior>
<Heightbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
var myHeight, testing;
var beh = {
postConfigure: function() {
testing = Math.floor(Math.random() * 10);
myHeight = this.cnode.parent();
},
act: function() {
myHeight.println(this.toString());
},
toString: function() {
return "testing:" + testing;
}
}
//# sourceURL=Heightbehavior.js
]]></Heightbehavior>
<Brickbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
$wnd.xh.Brickbehavior = function Brickbehavior() {}
$wnd.xh.Brickbehavior.prototype.postConfigure = function() {
this.brick = this.cnode.parent();
this.iam = " red brick";
};
$wnd.xh.Brickbehavior.prototype.act = function() {
this.brick.println("I am a" + this.iam);
};
//# sourceURL=Brickbehavior.js
]]></Brickbehavior>
<Brickbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
console.log("I'm another brick behavior");
]]></Brickbehavior>
<SvgClient><Attribute_String roleName="svgUri"><![CDATA[data:image/svg+xml,
<svg width="100" height="50" xmlns="http://www.w3.org/2000/svg">
<g>
<title>Block</title>
<rect id="PhysicalSystem/Block" fill="#98FB98" height="50" width="50" x="25" y="0"/>
<g>
<title>Height</title>
<rect id="PhysicalSystem/Block/Height" fill="#6AB06A" height="50" width="10" x="80" y="0"/>
</g>
</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