Thursday, October 4, 2018

Looking more closely at the semantic join

We consider the case:
 of a result graph equals a left graph joined to  right graph.  The join producess their intersection.

As in gout = join(right,left)

The join routine knows nothing about database format, except that it has valid database pointers for the three graphs.  Their implementation is completely external but needs to respond to call backs append,step,fetch, and eval.

The join machine does nothing, really, it is a reentrant loop which is guided by the response status from the call backs. So it becomes a simple manager of the cursor stacks, as the join descends.

The only built in grammar is the match, two nodes have to be comparable in the grammar imposed. 

The join loop becomes a small executive that manages a complete exploration of the left graph over the right, and the 'and,or' function needed to traverse the graphs. It juses match as a completion signal, and the stack unwinds.

Databases can be anything, a write only screen window, a binary format, plain json text. or temporary ram.   So, for example, to display json test use: screen = join("*".json).


The '*' is a valid graph, in my version of json, it is the wild card collector.  screen is a windows interface which displays widgets from a directed graph.  Bots could use this, it is an easy method for them to scoffm up the relevant data from a large set.

No comments: