Skip to content

Instantly share code, notes, and snippets.

@kenwebb
Last active September 5, 2017 20:31
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/809399e7c39cd6d16628395b3dfde9be to your computer and use it in GitHub Desktop.
Save kenwebb/809399e7c39cd6d16628395b3dfde9be to your computer and use it in GitHub Desktop.
Graph Construction and Maintenance
<?xml version="1.0" encoding="UTF-8"?>
<!--Xholon Workbook http://www.primordion.com/Xholon/gwt/ MIT License, Copyright (C) Ken Webb, Tue Sep 05 2017 16:30:30 GMT-0400 (EDT)-->
<XholonWorkbook>
<Notes><![CDATA[
Xholon
------
Title: Graph Construction and Maintenance
Description:
Url: http://www.primordion.com/Xholon/gwt/
InternalName: 809399e7c39cd6d16628395b3dfde9be
Keywords:
My Notes
--------
September 3 2017
General approaches to constructing and maintaining Xholon grpahs.
This includes moving nodes around, adding/deleting/modifying/etc nodes.
Especially how to do this in an ABM approach, from the perspective of objects inside the graph.
TODO look at the various approaches I've already used in Xholon: Meteor, XQuery Update Facility, Bigraphs
https://en.wikipedia.org/wiki/XQuery_Update_Facility
References
----------
() https://en.wikipedia.org/wiki/Graph_rewriting
Graph Rewriting
In computer science, graph transformation, or graph rewriting, concerns the technique of creating a new graph out of an original graph algorithmically.
It has numerous applications, ranging from software engineering (software construction and also software verification) to layout algorithms and picture generation.
Graph transformations can be used as a computation abstraction.
The basic idea is that the state of a computation can be represented as a graph, further steps in that computation can then be represented as transformation rules on that graph.
Such rules consist of an original graph, which is to be matched to a subgraph in the complete state, and a replacing graph, which will replace the matched subgraph.
() https://en.wikipedia.org/wiki/Rewriting
In mathematics, computer science, and logic, rewriting covers a wide range of (potentially non-deterministic) methods of replacing subterms of a formula with other terms. What is considered are rewriting systems (also known as rewrite systems, rewrite engines[1] or reduction systems). In their most basic form, they consist of a set of objects, plus relations on how to transform those objects.
() https://en.wikipedia.org/wiki/Extract,_transform,_load
In computing, Extract, Transform, Load (ETL) refers to a process in database usage and especially in data warehousing.
The ETL process became a popular concept in the 1970s.
Data extraction is where data is extracted from homogeneous or heterogeneous data sources;
data transformation where the data is transformed for storing in the proper format or structure for the purposes of querying and analysis;
data loading where the data is loaded into the final target database, more specifically, an operational data store, data mart, or data warehouse.
() https://en.wikipedia.org/wiki/Create,_read,_update_and_delete
CRUD
() https://web.cs.dal.ca/~eem/cvWeb/pubs/ITRA1991.pdf
Robotic exploration as graph construction, G Dudek, M Jenkin, E Milios… - IEEE transactions on …, 1991
cited by 317 - KSW some of these look interesting
Abstract:
Addressed is the problem of robotic exploration of a graphlike world, where no distance or orientation metric is assumed of the world.
The robot is assumed to be able to autonomously traverse graph edges, recognize when it has reached a vertex,
and enumerate edges incident upon the current vertex relative to the edge via which it entered the current vertex.
The robot cannot measure distances, and it does not have a compass.
It is demonstrated that this exploration problem is unsolvable in general without markers, and, to solve it,
the robot is equipped with one or more distinct markers that can be put down or picked up at will and that can be recognized by the robot if they are at the same vertex as the robot.
An exploration algorithm is developed and proven correct. Its performance is shown on several example worlds, and heuristics for improving its performance are discussed.
() https://en.wikipedia.org/wiki/Simultaneous_localization_and_mapping
() google: Topological map, Topological diagram
"In cartography and geology, a topological map is a type of diagram that has been simplified so that only vital information remains and unnecessary detail has been removed. These maps lack scale, and distance and direction are subject to change and variation, but the relationship between points is maintained. A good example is the tube map of the London Underground or the map for the New York City Subway." wikipedia
() XQuery Update Facility
) https://en.wikipedia.org/wiki/XQuery_Update_Facility
) https://www.w3.org/TR/xquery-update-10/
) https://www.w3.org/TR/2017/NOTE-xquery-update-30-20170124/
) http://www.xmlmind.com/tutorials/XQueryUpdate/index.html
() https://en.wikipedia.org/wiki/Query_language
Query languages are computer languages used to make queries in databases and information systems.
() https://en.wikipedia.org/wiki/Data_manipulation_language
() org.primordion.xholon.base.transferobject.XholonPatch
) org.primordion.xholon.base.transferobject.IXholonPatch
) <a href="https://tools.ietf.org/html/rfc5261">RFC 5261 XML Patch spec</a>
) <a href="https://tools.ietf.org/html/rfc6902">RFC 6902 JSON Patch spec</a>
() Graph Grammar Library (GGL) - A rule based chemical reaction application
) https://www.tbi.univie.ac.at/software/
) http://www.bioinf.uni-freiburg.de/Publications/Mann_GGL_13.pdf
) https://www.tbi.univie.ac.at/software/GGL/Tutorials/tutorial-rules.pdf
) https://github.com/BackofenLab/GGL
() Bigraph reaction rules, Bigraphical reactive systems
http://bigraph.org/
]]></Notes>
<_-.XholonClass>
<!-- domain objects -->
<PhysicalSystem/>
<Block/>
<Brick/>
<!-- quantities -->
<Height superClass="Quantity"/>
</_-.XholonClass>
<xholonClassDetails>
<Block>
<port name="height" connector="Height"/>
</Block>
</xholonClassDetails>
<PhysicalSystem>
<Block>
<Height>0.1 m</Height>
</Block>
<Brick multiplicity="2"/>
</PhysicalSystem>
<Blockbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
var a = 123;
var b = 456;
var c = a * b;
if (console) {
console.log(c);
}
]]></Blockbehavior>
<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;
}
}
]]></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);
};
]]></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