This is experimental work. Some of it may be useful to people working with RDF, DAML, and other Semantic Web technologies. Discussion of this is welcome on


After some months of lying fallow, it's become clear to me that

  1. blindfold is just blindfold grammars; the current bf code base is really blindfold plus a C++ RDF library. The "diff" functionality is really a different app which happens to be built with both libraries.
  2. the semantic annotation language for blindfold grammars should be arbitrary, with a meta-syntax interface, so that blindfold is just an easy way to make efficient language translators. It translates well between tree-structured languages, but doesn't address re-ordering (which is fine for RDF languages).

Some rough notes to myself on this:

command line:

 blindfold (no args needed)
       -xml or -plaintext-tagged
       -auto (plaintext-tagged, then xml, then ...?)

*  @xmlns instead of prefix?
      @set xmlns:rdf="...."
*  @language(" ... ntriples ... ")
   or @set language="...."
   @set annotationLanguage="";
   @set annotationLanguage="";
   @set annotationLanguage="urn:uuid:458a4754-5fdf-11d6-9376-0001f4ec99c8";
*  @local(foo)    same as  foo    where elsewhere  foo::= ;

   @appendTo(symbol, text-expr)
*  @strcat(symbol, text-expr)
       which makes $text(sym) be longer by text-expr (eval'd now)
   @set text(foo)=text(foo)+"hello";

*  $foo and $text(foo) inside @{ ... }
   \{ and \} to include a { or } inside there.   or double them?
*  $$, {{, }}           [maybe only if unbalanced]

   turns $foo into whatever you set symbolTemplate to be with
   the $counter() part substituted.

   @set(_symbolTemplate, "_:bnf_$counter()")
*  @set(_symbolTemplate, "



Blindfold is a semantic web software toolkit. It can be used by programmers as a library of handy functions or at the command line to perform various data transformations.

I've tried hard to keep things are simple as possible, following the basic simplicity of the RDF model.

I generally treat RDF graphs as logical formulas, with existential variables for bNodes (anonymous nodes). An RDF graph merge is logical conjunction. Graph equivalence is equality of entailment (with existential instantiation being the non-trivial inference method). A graph "difference" (A-B) asks the question "what is the smallest formula I could conjoin with B to make it entail A?"

Command Line

The blindfold command can be used to perform a variety of general operations on knowledge encode as RDF graphs. With no parameters, it will give you general usage instructions which may be enough to get you started. In v0.1.1 all input and output is in N-Triples format.

Programming Interface

Blindfold's functionality is available in a general C++ library. The documentation, and general API architecture sometimes lag behind the current operational model. The on-line documentation is generated out of comments in the source code.

Grammar System

One of blindfold's more interesting features is its grammar system, which aims to demonstrate the practical equivalence of many languages. This system is present in a pre-alpha state in the 0.1.1 release, and is not available from the command line yet.


Several alternatives:

You need XSB installed (and in your path) for blindfold 0.1.1 to work properly.

Future Directions


Sandro Hawke
$Date: 2002/05/21 12:53:07 $