* <a href="../GeorgLehner/">GeorgLehner</a> <span class="createlink"><a href="/sw/wiki/ikiwiki.cgi?page=AndreasHangler&amp;from=TripleUniverse&amp;do=create" rel="nofollow">?</a>AndreasHangler</span> 


The TripleUniverse is a closed computing universe of triples representing elements of binary relations (source,relation,destination). The TripleUniverse starts empty and can be expanded by explicit declaration as well as a simple pattern match and rewrite operation. A minimum set of primitive relations and datatypes is built in, to perform computational tasks which on the one hand are natural to programming and on the othe hand would be cumbersome and slow to implement on top of purely relational algebra. Meta commands allow to operate on the universe, loading new relations from files, deleting and modifying existing relations and provoking side effects which implement interaction with the outer world. The primary use case for the TripleUniverse is the use in knowledge management, mainly in systems analysis, modeling of domains and creation of ontology. Design goals of TripleUniverse are: absolute minimum of primitives to maintain the highest level of abstraction possible. Absolute minimum of meta commands to maintain all "programming" logic within the domain and syntax of binary relations. Both goals should lead to the highest possible flexibility and to a minimum of core functionality, allowing easy prototyping and rewriting of the TripleUniverse core.

Informal Introduction

The basic syntax of TripleUniverse "programs" is the triple:

     * `(source,relation,destination)` 

On startup the universe is empty, with exception of #primitives. Relations are declared either by sourcing in a file or by introducing them interactively via the console.

The triples are stored in the universe in the order in which they appear in the input stream.

Note that any of source, relation and destination above are by themselves references to triples, i.e. to relations. There exists a special 'Null' relation with the notation

     * `(,,)` 

The Null relation is referred to by the empty string.

Pattern rewriting

Relations are either explicit, or declared implicitely via rewriting rules. A rewriting rule is a member of the rewritten to relation, which links a /match/ to a /pattern/. #wildcards may appear in any position of a wildcard triple. The notation of wildcards is an asterisk followed by a number, e.g. *1, *2, *3. The following is an example of a TripleUniverse with pattern rewriting:

     * <pre>(Jesus,child of,Mary)

((1,child of,2),rewritten to,(2,parent of,1)) This universe implicitely holds also the relation:

     * `(Mary,parent of,Jesus)` 

and if expanded afterwards with

     * <pre>(Mary,child of,Elisabeth)

it also holds the implicit relation:

     * `(Elisabeth,parent of,Mary)`