A RESTful Scutter Protocol for Redfoot Kernel

Redfoot recently had 'native' scuttering capabilities added to it's kernel. The original motivation was as a testbed to determine some reasonable parameters for a 'scuttering protocol'. That document was prepared in haste, but for the most part, the load function on Redfoot has been extended to provide built-in scuttering capabilities - using that protocol as a guide.

Redfoot provides a framework for loading (and persisting) remotely hosted chunks of executable code (redfoot programs – the current ones are mostly written in Python / KID). The most common context in which scuttering is discussed is the interpretation of FOAF graphs (social networks). However, I found the idea of a network of executable code with the dependencies (on applicaton 'data' and other third party 'bits' of funcionality / code) expressed via rdfs:seeAlso and rdfs:isDefinedBy very appealing as an alternative subtext to the whole 'Semantic Web' idea.

The main point of the scuttering protocol above is the use of a provenance graph (RDF graphs which contain statements about other RDF graphs) which uses a vocabulary to express (and persist) the HTTP headers of remote RDF graphs.

The cached HTTP headers are used to automate subsequent content-negotiated requests to the same resources to effectively mirror an HTTP network of RDF graphs (where the links are expressed by rdfs:seeAlso, owl:import, and rdfs:isDefinedBy) in a local store – applying RESTful best practices.

Below is an example of the statements added after a fetch of the URL http://metacognition.info/profile/webwho.xrdf.

For every URL fetched, the 'scutter links' (rdfs:seeAlso,rdfs:isDefinedBy,and owl:import) are traversed recursively (up to a system-wide maximum recursion depth). Links that do not resolve to an RDF graph are marked in the local cache as “non-rdf” to avoid redundant fetches to URLs known not to be RDF.

Chimezie Ogbuji

via Copia

FuXi: FOAFed and DOAPed

I just upgraded and repackaged FuXi (v0.7): added some extra prints in the Versa extension function, added a 'test' directory to the source tree with an appropriate example of how FuXi could be used to make a prospective query against OWL rules and a source graph, created a DOAP instance for FuXi, a FOAF instance for myself, created a permanent home for FuXi, and added FuXi to the SemanticWebDOAPBulletinBoard WiKi. This was primarily motivated by Libby's post on Semantic Web Applications and Demos. I thought it would be perfect forum for FuXi. I probably need to move it into a CVS repository when I can find time.

Below is the output of running the test case:

loaded model with owl/rdfs minimal rules and initial test facts
executing Versa query:
                               'distribute(list(test:Lion,test:Don_Giovanni),\'. - rdf:type -> *\')',
extracted 35 rules from urn:uuid:MinimalRules
extracted 16 facts from source model (scoped by urn:uuid:InitialFacts) into interpreter. Executing...
inferred 15 statements in 0.0526609420776 seconds
time to add inferred statements (to scope: urn:uuid:InitialFacts): 0.000159025192261
compiled prospective query, executing (over scope: urn:uuid:InitialFacts)
time to execute prospective query:  0.0024938583374
time to remove inferred statements:  0.0132219791412

This particular test extracts inferred statements from an initial graph using a functional subset of the original owl-rules.n3 and executes the Versa query (which essentially asks: what classes do the resources test:Lion and test:Don_Giovanni belong to?) to demonstrate OWL reasoning (class membership extension by owl:oneOf and owl:unionOf, specifically).

see previous posts on FuXi/N3/4Suite:

Chimezie Ogbuji

via Copia

Using 4RDFs Triclops from Commandline

I recently merged an old RDF graphing library (within 4Suite) into the 4Suite 4RDF command-line in preperation for the beta release. The library is called Triclops. With this addition, the 4RDF command-line can now render RDF graphs into a representative SVG or Jpeg diagram.

Using Graphviz

Triclops makes use of Graphviz to render .dot graphs (generated from RDF serializations) into various formats. One of the advantages is that Graphviz's neato can be used to apply a spring graph layout algorithm to the final graph. This often results in a more informative layout of the final graph than the default. The downside is the large amount of processing needed by this function.

4RDF Options

Below is a listing of the 4RDF command-line options

The Triclops integration consists of 3 additions:

First, the additional values to the -s / --serialize option:

  • svg
  • jpeg

Second, the -g / --graphviz option (which is required when either of the above options are used) takes the path to the dot / neato executables. And finally, the -l / --spring option requests that neato is used instead of dot. This results in the spring algorithm being applied to the graph.

FOAF example

To demonstrate, I'm using the Dan Brickley FOAF example (as listed in the specification). In the terminal below, I list the content of the FOAF document, then convert it to a jpeg diagram first and then an SVG diagram right afterwards (using neato to layout the graph). On my machine, the dot and neato executables are located in /usr/bin, so I set the -g option accordingly:

The generated jpg diagram is below while its svg alternative is here.

Another example

Below are jpeg and svg diagrams of the 4Suite Repository Ontology (modeled in OWL):

My long-term plan is to make Triclops completely configurable so that the generated graphs are tailored to the user's specification for things such as the font used for text, how to format blank nodes, etc. Porting it to use Pydot might go a long way in this regard.

[Chimezie Ogbuji]

via Copia