Pics Start Date:
Notes Date (end):
Trees trees trees...
So... if trees are to be a native or primitive type for us in Ceptr... they need to more closely paralell native Ceptr communications (like envelope / body) so they don't need to be serialized/deserialized to be placed into signals/fluxes.
We explored a couple methods (depth first & breadth first) of having a linear surface for data with a "skip table" providing relative indexing for structure and nodes within that data for navigating tree structure. Both seemed doable. Both seem not to quite be the right answer.
My gut says that in same way we do alternating definition of structure and semantics with defs and labels, that having similarly structured grouping for trees... some other dimension to the data that allows the linear surface data to be pulled into a relational shape.
Akin to BNF grammars we made a TNF grammar to validate properly formatted semtrex trees. And again we started to get pulled down the path of thinking a BNF style notation could represent our semantic data.
Semtrex ::= Root [ / Child]
Root ::= Literal | Or | Any | Question | Group
Child ::= Root | Plus | Star | Sequence
Plus ::= "PLUS" / Semtrex
Star ::= "STAR" / Semtrex
Question ::= "QUESTION" / Semtrex
Sequence ::= "SEQUENCE" / Semtrex [, Semtrex]...
Or ::= "OR" / Semtrex1 , Semtrex2
Literal ::= "LITERAL(symbol)" [ / Semtrex]
Any ::= "ANY" [ / Semtrex]
Group ::= "GROUP(group_name)" / Semtrex
However, BNF notation is for constructing structures from structures, not from semantically named uses of structures. It fails to have the alternative structure/semantics that our defs do that seem to be vital to make the semantics work.
I think this is in fact how language works. Phones are structurally produced sounds by configuring mouth/tongue/vocal cords in certain positions, phonemes are semantically significant groups of phones considered to be equivalent / different from other phones. Word parts are structured sequences of sounds, that then have semantic significance based on where you place them in the sequence with other word parts. For example, think of the "in" sound which has very different meanings in "inquest" vs. "question."
The pattern seems to continue at each level. And may be vital to semantic protocols. I want to try thinking about subatomics and electro-magnetics in these terms and see if that sheds new light on the importance of this approach.
Eric has been making good progress on building a semtrex matching engine which constructs state machines from the semtrex for matching against semantic trees.
It seems BNF grammars can't get us our semantic approach because there are distinct operators/operations.
We can think of it like this:
- ::= means "is comprised of" and is for constructing new structures out of semantically identified elements. e.g Latlong ::= tree ( lat, long )
- --> means "is a named reference to" and is used to creating a semantic use of a particular structure/construct. e.g. Lat --> Float [ranged -90 - 90]
- And maybe we need some symbole for instance. 43.2351, -103.2405 is an instance of a latlong
Some way of representing trees which is more native to our serialized format and is possibly congruent with our defs/labels approach.
trees, semtrex, BNF