Some progress with proof generation

I made a *little* progress, setting up to generate reason.n3 formatted
proofs from the results of evaluating a network.  You can see the
diagram [1] ( also available [2] as SVG ) of the RETE-UL against which
I was able to infer 6 assertions from the  original 3 ( in the "She's
a witch and I have the proof (in N3)"  [3]  test case ), under the
'Proof Generation' section of the FuXi wiki:

http://code.google.com/p/python-dlp/wiki/FuXi

This is the output from my console (using the *latest* RIF EBNF for
readable syntax):

Forall ?x witch:WITCH(?x) :- And( witch:BURNS(?x) witch:WOMAN(?x) )
Forall ?x witch:BURNS(?x) :- witch:ISMADEOFWOOD(?x)
Forall ?x witch:ISMADEOFWOOD(?x) :- witch:FLOATS(?x)
Forall ?y ?x witch:FLOATS(?y) :- And( witch:FLOATS(?x)
witch:SAMEWEIGHT(?x ?y) )

Time to build production rule (RDFLib): 0.00752997398376 seconds
.. snip ..
Time to calculate closure on working memory:  29.7100543976 milli
seconds
## Going in ##
[witch:FLOATS(witch:DUCK),
 witch:SAMEWEIGHT(witch:DUCK witch:GIRL),
 witch:WOMAN(witch:GIRL)]
## Coming out ##
[witch:ISMADEOFWOOD(witch:DUCK),
 witch:FLOATS(witch:GIRL),
 witch:ISMADEOFWOOD(witch:GIRL),
 witch:BURNS(witch:GIRL),
 witch:WITCH(witch:GIRL),
 witch:BURNS(witch:DUCK)]
<Network: 4 rules, 10 nodes, 12 tokens in working memory, 6 inferred
tokens>
<TerminalNode (pass-thru): CommonVariables: [?x] (0 in left, 2 in
right memories)>
        {[(?x, rdflib.URIRef('http://www.w3.org/1999/02/22-rdf-syntax-
ns#type'), rdflib.URIRef('http://www.w3.org/2000/10/swap/test/reason/
witch#BURNS'))]}
                2 instanciations
<TerminalNode (pass-thru): CommonVariables: [?x] (0 in left, 2 in
right memories)>
        {[(?x, rdflib.URIRef('http://www.w3.org/1999/02/22-rdf-syntax-
ns#type'), rdflib.URIRef('http://www.w3.org/2000/10/swap/test/reason/
witch#BURNS'))]}
                2 instanciations
<TerminalNode (pass-thru): CommonVariables: [?x] (0 in left, 2 in
right memories)>
        {[(?x, rdflib.URIRef('http://www.w3.org/1999/02/22-rdf-syntax-
ns#type'), rdflib.URIRef('http://www.w3.org/2000/10/swap/test/reason/
witch#ISMADEOFWOOD'))]}
                2 instanciations
<TerminalNode (pass-thru): CommonVariables: [?x] (0 in left, 2 in
right memories)>
        {[(?x, rdflib.URIRef('http://www.w3.org/1999/02/22-rdf-syntax-
ns#type'), rdflib.URIRef('http://www.w3.org/2000/10/swap/test/reason/
witch#ISMADEOFWOOD'))]}
                2 instanciations
<TerminalNode : CommonVariables: [?x] (2 in left, 1 in right
memories)>
        {[(?x, rdflib.URIRef('http://www.w3.org/1999/02/22-rdf-syntax-
ns#type'), rdflib.URIRef('http://www.w3.org/2000/10/swap/test/reason/
witch#WITCH'))]}
                1 instanciations
<TerminalNode : CommonVariables: [?x] (2 in left, 1 in right
memories)>
        {[(?y, rdflib.URIRef('http://www.w3.org/1999/02/22-rdf-syntax-
ns#type'), rdflib.URIRef('http://www.w3.org/2000/10/swap/test/reason/
witch#FLOATS'))]}
                1 instanciations
<TerminalNode : CommonVariables: [?x] (2 in left, 1 in right
memories)>
        {[(?y, rdflib.URIRef('http://www.w3.org/1999/02/22-rdf-syntax-
ns#type'), rdflib.URIRef('http://www.w3.org/2000/10/swap/test/reason/
witch#FLOATS'))]}
                1 instanciations
ok

----------------------------------------------------------------------
Ran 1 test in 0.117s

OK

[1] http://python-dlp.googlecode.com/svn/trunk/fuxi/test/witches.jpg
[2] http://python-dlp.googlecode.com/svn/trunk/fuxi/test/witches.svg
[3] http://dig.csail.mit.edu/breadcrumbs/node/179

Received on Friday, 7 September 2007 04:05:24 UTC