Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test code fails - rdflib 3.2.0 #1

Closed
dvic opened this issue Feb 27, 2012 · 11 comments
Closed

test code fails - rdflib 3.2.0 #1

dvic opened this issue Feb 27, 2012 · 11 comments

Comments

@dvic
Copy link

dvic commented Feb 27, 2012

The following code fails (in the test directory):

Traceback (most recent call last):
File "testOWL.py", line 6, in
from FuXi.Rete import *
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/FuXi-1.3.production-py2.7.egg/FuXi/Rete/init.py", line 1, in
from Network import ReteNetwork, InferredGoal
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/FuXi-1.3.production-py2.7.egg/FuXi/Rete/Network.py", line 18, in
from Util import xcombine
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/FuXi-1.3.production-py2.7.egg/FuXi/Rete/Util.py", line 5, in
from FuXi.Rete.AlphaNode import AlphaNode
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/FuXi-1.3.production-py2.7.egg/FuXi/Rete/AlphaNode.py", line 3, in
from RuleStore import N3Builtin
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/FuXi-1.3.production-py2.7.egg/FuXi/Rete/RuleStore.py", line 11, in
from rdflib.Graph import QuotedGraph, Graph
ImportError: No module named Graph

I saw that, when I installed this library, rdflib 3.2.0 is installed. Is this correct?

@ghost
Copy link

ghost commented Mar 1, 2012

Thanks for raising this - it has prompted me to make some adjustments to the FuXi repos. I've removed support for rdflib2.4.X because Chimezie recommends his "layercake" fork if you are running with rdflib 2. I've also trimmed the Python version support to 2.6 and above, at least for the time being.

I have tightened FuXi's dependency on rdflib to >2 and corrected the omission of a dependency on rdfextras, which I have set to the GitHub rdfextras repository code.

You should have better results if you follow this path (virtualenv usually gives the best experience)::

$ git clone git://github.com/RDFLib/FuXi.git
$ cd FuXi

If you want to tinker with the FuXi code, you can install as "python setup.py develop" if you first make a soft-link from ./lib to ./FuXi. Otherwise, just::

$ python setup.py install

This should trigger the installation of rdfextras-0.2-dev, rdflib==3.0.2 , pyparsing1.5.6 and isodate 0.4.7

If you want to run the tests (recommended):

$ pip install nose
$ nosetests

The results should match the console output of the Hudson Python 2.7 continuous integration build, e.g. http://bel-epa.com/hudson/job/FuXi/TOXENV=py27/4/console

To run all the tests in testOwl.py, you'll need to download the approved test files.

$ cd test/OWL
$ wget http://www.w3.org/2002/03owlt/approved.zip
$ unzip approved.zip
$ cd ..
$ python testOwl.py

Locally (Ubuntu 11.10 Python 2.7), all but one of the approved tests are passing.

HTH.

Graham

@ghost ghost self-assigned this Mar 1, 2012
@lucag
Copy link

lucag commented Oct 24, 2012

Hi there,

I can't seem to run setup.py install. I tried two different versions of Python 2.7 (2.7.2 and 2.7.3), but the setup fails because the correct version of rdfextras (0.2-dev) is somehow not available. I have checked out the describe-fix branch of rdfextras, and that seems to provide the right version, so setup.py install actually terminates without errors. But nosetests fails, and also testOWL.py under test. What should I do?

@chimezie
Copy link
Member

Hi. FuXi currently isn't compatible with rdflib 3+

see earlier thread:

https://groups.google.com/forum/?fromgroups=#!searchin/fuxi-discussion/rdflib$203/fuxi-discussion/6oUiMuxIRZc/JbTgMTdZAsEJ

Chime Ogbuji
Sent with Sparrow (http://www.sparrowmailapp.com)

On Tuesday, October 23, 2012 at 9:31 PM, lucag wrote:

Hi there,
I can't seem to run setup.py install. I tried two different versions of Python 2.7 (2.7.2 and 2.7.3), but the setup fails because the correct version of rdfextras (0.2-dev) is somehow not available. I have checked out the describe-fix branch of rdfextras, and that seems to provide the right version, so setup.py install actually terminates without errors. But nosetests fails, and also testOWL.py under test. What should I do?


Reply to this email directly or view it on GitHub (#1 (comment)).

@gromgull
Copy link
Member

Chimezie: but this is the issue tracker for Graham's FuXi fork that SHOULD support rdflib >3

I guess the issue is that rdfextras has actually seen "releases" - so that now there exists an rdfextras 0.3 available from pypi among other places. Updating the setup.py to refer to rdfextras 0.3 without any download location should "just work".

I wont actually make the change though - since I know nothing about FuXi, maybe Graham will drop by and make sure it's ok?

lucag: if you try to edit it locally and it works, please report back!

@lucag
Copy link

lucag commented Oct 24, 2012

Hey everybody,

thank you all for your prompt response!

So, I tried, as gromgull suggested, to change the required library (setup.py:79), and re-ran the tests. Unfortunately nosetests fails:

[... FuXi] $ nosetests 2>&1 | egrep -i "error|fail"
ERROR: testBFPQueryMemoization.test2
ERROR: testOwl (testOWL.OwlTestSuite)
TypeError: reduce() of empty sequence with no initial value
ERROR: testUnionSkolemization (testSkolemization.UnionSkolemizedTest)
self.failIf(p.formula.body.arg[-1].find(SKOLEMIZED_CLASS_NS) >- 1,
AttributeError: 'And' object has no attribute 'arg'
FAIL: testQueryMemoization (testBFPQueryMemoization.QueryMemoizationTest)
self.failUnlessEqual(len(self.owlGraph.queriesDispatched),4,"Duplicate query")
AssertionError: Duplicate query
FAIL: testTransitivity (test_sameAs.test_sameAs)
self.failUnless(not solns.difference(result))
AssertionError: False is not true
FAILED (errors=3, failures=2)
(py2)[lucag@scone FuXi]$ nosetests 2>&1 | egrep -i "error|fail"
ERROR: testBFPQueryMemoization.test2
ERROR: testOwl (testOWL.OwlTestSuite)
TypeError: reduce() of empty sequence with no initial value
ERROR: testUnionSkolemization (testSkolemization.UnionSkolemizedTest)
self.failIf(p.formula.body.arg[-1].find(SKOLEMIZED_CLASS_NS) >- 1,
AttributeError: 'And' object has no attribute 'arg'
FAIL: testQueryMemoization (testBFPQueryMemoization.QueryMemoizationTest)
self.failUnlessEqual(len(self.owlGraph.queriesDispatched),4,"Duplicate query")
AssertionError: Duplicate query
FAIL: testTransitivity (test_sameAs.test_sameAs)
self.failUnless(not solns.difference(result))
AssertionError: False is not true
FAILED (errors=3, failures=2)

Ideas?

Thanks a lot!
--Luca

@ghost
Copy link

ghost commented Oct 29, 2012

I have to admit that I'm in two minds whether to remove this fork from the github RDFLib organisation space because it's verging on the unsupportable or whether to keep it around because of its unique status as a Python-native reasoner for RDFLib. I would welcome comments/opinions on the matter.

Attempting an RDFLib3-compatible version was an experimental venture for me in the first place. I consider a Python-native reasoning package to be potentially a hugely valuable addition to RDFLib's capability and I was concerned not to let the code simply fall by the wayside for lack of basic TLC.

What I find promising about the RDFLib3-compat version is, given the following doctest in a file "footest.py":

"""
>>> import platform
>>> platform.python_implementation()
'PyPy'
>>> from rdflib.graph import Graph
>>> from FuXi.Rete.RuleStore import SetupRuleStore
>>> from FuXi.Rete.Util import generateTokenSet
>>> from FuXi.Horn.HornRules import HornFromN3
>>> rule_store, rule_graph, network = SetupRuleStore(makeNetwork=True)
>>> closureDeltaGraph=Graph()
>>> network.inferredFacts = closureDeltaGraph
>>> network
<Network: 0 rules, 0 nodes, 0 tokens in working memory, 0 inferred tokens>
>>> for rule in HornFromN3('http://fuxi.googlecode.com/hg/test/sameAsTestRules.n3'): network.buildNetworkFromClause(rule)
... 
<TerminalNode (owl:sameAs(?y ?x) :- owl:sameAs(?x ?y)) (pass-thru): CommonVariables: [?y, ?x] (0 in left, 0 in right memories)>
<TerminalNode (?p(?y ?o) :- And( owl:sameAs(?x ?y) ?p(?x ?o) )) : CommonVariables: [?x] (0 in left, 0 in right memories)>
>>> network
<Network: 2 rules, 4 nodes, 0 tokens in working memory, 0 inferred tokens>
>>> factGraph = Graph().parse('http://fuxi.googlecode.com/hg/test/sameAsTestFacts.n3',format='n3')
>>> network.feedFactsToAdd(generateTokenSet(factGraph))
>>> print closureDeltaGraph.serialize(format='n3')
@prefix ns1: <http://example.org/> .
<BLANKLINE>
ns1:bar ns1:x "xxxx";
    = ns1:bar,
        ns1:foo .
<BLANKLINE>
ns1:foo ns1:y "yyyy";
    = ns1:foo .
<BLANKLINE>
<BLANKLINE>
"""

The command "./.tox/pypy/bin/nosetests --with-doctest footest.py" produces:

.
----------------------------------------------------------------------
Ran 1 test in 1.072s

OK

So that's FuXi running under PyPy. It also runs under Python3.2 and Python3.3.

On the minus side, the main problem is that in many places the original development of the FuXi codebase had outstripped the docstrings/tests and the resultant failure "noise" makes it very difficult to assess how much work is likely to be involved in bringing (at least) the docstrings/tests up to date as part of a comprehensive test suite that can be successfully executed against an RDFLib3-compatible codebase.

For anyone interested in deep-diving into the FuXi-under-RDFLib3 test suite, I strongly recommend checking the current test output against the screed of test results produced by a virtualenv instance of a pukka "layercake" distro (Python 2.5.2, rdflib2.4.1/2), as recommended on http://code.google.com/p/fuxi/.

FTR, I've included the "layercake" test output in a separate follow-up comment. Note, the FuXi test suite runner is specific to the package, unittest-only and unsuitable for testing with "nosetests", the test output can be reproduced with "python test/suite.py".

(It would appear that some of the test failures have been extant for some time. For example, googling for the 'NON_LINEAR_MS_QUERY' complained about in "NameError: name 'NON_LINEAR_MS_QUERY' is not defined" reveals no references other than the test code itself.)

@ghost
Copy link

ghost commented Oct 29, 2012

Test output from layercake:

Running testOWL with gms ====================================
testOwl (testOWL.OwlTestSuite) ... {}
ok

----------------------------------------------------------------------
Ran 1 test in 0.001s

OK

Running testOWL with sld ====================================
testOwl (testOWL.OwlTestSuite) ... {}
ok

----------------------------------------------------------------------
Ran 1 test in 0.001s

OK

Running testOWL with bfp ====================================
testOwl (testOWL.OwlTestSuite) ... {}
ok

----------------------------------------------------------------------
Ran 1 test in 0.001s

OK

Running FuXi External Unit Tests (other than testOWL) ====================================
ex:NumDisV2D(?X)
    :- ex:contains(?X ?qAzGsGcG146)
       ex:MajorStenosis(?qAzGsGcG146), 
       ex:locatedIn(?qAzGsGcG146 ex:RCA), 
       ex:Cath(?X), 
       ex:contains(?X ?qAzGsGcG169), 
       ex:MajorStenosis(?qAzGsGcG169), 
       ex:locatedIn(?qAzGsGcG169 ex:LAD), 
.../fuxi/test/test_builtin_ordering.py:53: DeprecationWarning: Rules in a network should be built *after* construction via  self.buildNetworkClause(HornFromN3(n3graph)) for instance
  network = ReteNetwork(rule_store)
setting up DLP...
[Forall ?Q ?P ( owl:FunctionalProperty(?Q) :- And( owl:inverseOf(?P ?Q) owl:InverseFunctionalProperty(?P) ) ),
 Forall ?Q ?P ( owl:InverseFunctionalProperty(?Q) :- And( owl:inverseOf(?P ?Q) owl:FunctionalProperty(?P) ) ),
 Forall ?Y ?X ( exterms:has_brother(?X ?Y) :- exterms:brother(?X ?Y) ),
 Forall ?SC ?A ?C ( rdfs:subClassOf(?A ?SC) :- And( rdfs:subClassOf(?C ?SC) rdfs:subClassOf(?A ?C) ) ),
 Forall ?X ( exterms:Agent(?X) :- exterms:Person(?X) ),
 Forall ?S ?O ( owl:complementOf(?O ?S) :- owl:complementOf(?S ?O) ),
 Forall ?X ?C ?L ?P ( owl:InverseFunctionalProperty(?P) :- And( owl:oneOf(?C ?L) rdf:first(?L ?X) rdf:rest(?L rdf:nil) rdfs:domain(?P ?C) ) ),
 Forall ?X ?qAzGsGcG419 ( exterms:Person(?X) :- exterms:has_brother(?X ?qAzGsGcG419) ),
 Forall ?Y ?X ( exterms:brother(?X ?Y) :- exterms:has_brother(?X ?Y) ),
 Forall ?Y ?C ?B ?M ( owl:differentFrom(?M ?Y) :- And( owl:disjointWith(?C ?B) ?C(?M) ?B(?Y) ) ),
 Forall ?X ?qAzGsGcG401 ( exterms:Person(?qAzGsGcG401) :- exterms:has_brother(?X ?qAzGsGcG401) ),
 Forall ?Y ?X ( exterms:has_sibling(?X ?Y) :- exterms:has_brother(?X ?Y) ),
 Forall ?X ?C ?L ?P ( owl:FunctionalProperty(?P) :- And( owl:oneOf(?C ?L) rdf:first(?L ?X) rdf:rest(?L rdf:nil) rdfs:range(?P ?C) ) ),
 Forall ?S ?O ( owl:disjointWith(?O ?S) :- owl:disjointWith(?S ?O) ),
 Forall ?SC ?C ( owl:equivalentClass(?C ?SC) :- And( rdfs:subClassOf(?C ?SC) rdfs:subClassOf(?SC ?C) ) ),
 Forall ?A ?C ( And( rdfs:subClassOf(?C ?A) rdfs:subClassOf(?A ?C) ) :- owl:equivalentClass(?C ?A) ),
 Forall ?S ?O ( owl:differentFrom(?O ?S) :- owl:differentFrom(?S ?O) ),
 Forall ?X ?qAzGsGcG410 ( exterms:Person(?X) :- exterms:brother(?X ?qAzGsGcG410) ),
 Forall ?qAzGsGcG392 ?X ( exterms:Person(?qAzGsGcG392) :- exterms:brother(?X ?qAzGsGcG392) )]
<Network: 18 rules, 53 nodes, 0 tokens in working memory, 0 inferred tokens>
feeding TBox... 
feeding ABox...
@prefix ex: <http://example.org/> .
@prefix exterms: <http://example.org/terms/> .

ex:jack a exterms:Agent,
        exterms:Person;
    exterms:has_brother ex:john;
    exterms:has_sibling ex:john .

ex:john a exterms:Agent,
        exterms:Person;
    exterms:brother ex:jack;
    exterms:has_sibling ex:jack .


Checking...
.../fuxi/test/testExistentialInHead.py:49: DeprecationWarning: Rules in a network should be built *after* construction via  self.buildNetworkClause(HornFromN3(n3graph)) for instance
  inferredTarget = deltaGraph)
Time to calculate closure on working memory: 3.50403785706 m seconds
@prefix : <file://.../fuxi/#> .
@prefix m: <http://example.com/#> .

:det1 m:inference [ a m:Inference;
            m:inference_name "Inference1" ] .

:det2 m:inference [ a m:Inference;
            m:inference_name "Inference2" ] .


@prefix ns1: <http://example.com/#> .
@prefix ns2: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

ns1:chimezie ns2:mbox_sha1sum "8f90d9335f967f58b40d5b6a49f8d9afca64b5ae",
        rdf:Literal .


FAIL:  testBasePredicateEquivalence (additionalDLPTests.AdditionalDescriptionLogicTests) (unit test)
Traceback (most recent call last):
  File ".../fuxi/test/additionalDLPTests.py", line 60, in testBasePredicateEquivalence
    "[Forall ?X ( ex:Bar(?X) :- ex:Foo(?X) ), Forall ?X ( ex:Foo(?X) :- ex:Bar(?X) )]")
AssertionError: 'set([Forall ?X ( ex:Bar(?X) :- ex:Foo(?X) ), Forall ?X ( ex:Foo(?X) :- ex:Bar(?X) )])' != '[Forall ?X ( ex:Bar(?X) :- ex:Foo(?X) ), Forall ?X ( ex:Foo(?X) :- ex:Bar(?X) )]'

FAIL:  testExistentialInRightOfGCI (additionalDLPTests.AdditionalDescriptionLogicTests) (unit test)
Traceback (most recent call last):
  File ".../fuxi/test/additionalDLPTests.py", line 69, in testExistentialInRightOfGCI
    self.assertEqual(repr(Class(EX_NS.Foo)),"Class: ex:Foo SubClassOf: ( ex:someProp some ex:Omega )")
AssertionError: 'Class: ex:Foo SubClassOf: ( ex:someProp SOME ex:Omega )' != 'Class: ex:Foo SubClassOf: ( ex:someProp some ex:Omega )'

FAIL:  testGCIConDisjunction (additionalDLPTests.AdditionalDescriptionLogicTests) (unit test)
Traceback (most recent call last):
  File ".../fuxi/test/additionalDLPTests.py", line 34, in testGCIConDisjunction
    "[Forall ?X ( ex:Bar(?X) :- And( ex:Foo(?X) ex:Alpha(?X) ) ), Forall ?X ( ex:Bar(?X) :- And( ex:Foo(?X) ex:Omega(?X) ) )]")
AssertionError: 'set([Forall ?X ( ex:Bar(?X) :- And( ex:Foo(?X) ex:Alpha(?X) ) ), Forall ?X ( ex:Bar(?X) :- And( ex:Foo(?X) ex:Omega(?X) ) )])' != '[Forall ?X ( ex:Bar(?X) :- And( ex:Foo(?X) ex:Alpha(?X) ) ), Forall ?X ( ex:Bar(?X) :- And( ex:Foo(?X) ex:Omega(?X) ) )]'

FAIL:  testOtherForm2 (additionalDLPTests.AdditionalDescriptionLogicTests) (unit test)
Traceback (most recent call last):
  File ".../fuxi/test/additionalDLPTests.py", line 158, in testOtherForm2
    "Some Class SubClassOf: Class: ex:ITALeft  . EquivalentTo: ( ( ex:hasCoronaryBypassConduit value ex:CoronaryBypassConduit_internal_thoracic_artery_left_insitu ) or ( ex:hasCoronaryBypassConduit value ex:CoronaryBypassConduit_internal_thoracic_artery_left_free ) )")
AssertionError: 'Some Class SubClassOf: Class: ex:ITALeft  . EquivalentTo: ( ( ex:hasCoronaryBypassConduit VALUE <http://example.com/CoronaryBypassConduit_internal_thoracic_artery_left_insitu> ) OR ( ex:hasCoronaryBypassConduit VALUE <http://example.com/CoronaryBypassConduit_internal_thoracic_artery_left_free> ) )' != 'Some Class SubClassOf: Class: ex:ITALeft  . EquivalentTo: ( ( ex:hasCoronaryBypassConduit value ex:CoronaryBypassConduit_internal_thoracic_artery_left_insitu ) or ( ex:hasCoronaryBypassConduit value ex:CoronaryBypassConduit_internal_thoracic_artery_left_free ) )'

FAIL:  testValueRestrictionInLeftOfGCI (additionalDLPTests.AdditionalDescriptionLogicTests) (unit test)
Traceback (most recent call last):
  File ".../fuxi/test/additionalDLPTests.py", line 90, in testValueRestrictionInLeftOfGCI
    "ex:Bar that ( ex:someProp value ex:fish )")
AssertionError: 'ex:Bar THAT ( ex:someProp VALUE ex:fish )' != 'ex:Bar that ( ex:someProp value ex:fish )'

ERROR:  testUnionSkolemization (testSkolemization.UnionSkolemizedTest) (unit test)
Traceback (most recent call last):
  File ".../fuxi/test/testSkolemization.py", line 33, in testUnionSkolemization
    self.failIf(p.formula.body.arg[-1].find(SKOLEMIZED_CLASS_NS)>-1,
AttributeError: 'And' object has no attribute 'arg'

*** DocTestRunner.merge: '__main__.extractEmbeddedSuite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.runEmbeddedTests' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.moduleIterator' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.suite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.runSuite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.splash' in both testers; summing outcomes.
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/SidewaysInformationPassing.py", line 249, in FuXi.Rete.SidewaysInformationPassing.BuildNaturalSIP
Failed example:
    ruleStore,ruleGraph=SetupRuleStore(StringIO(PROGRAM2))
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Rete.SidewaysInformationPassing.BuildNaturalSIP[0]>", line 1, in <module>
        ruleStore,ruleGraph=SetupRuleStore(StringIO(PROGRAM2))
    NameError: name 'PROGRAM2' is not defined
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/SidewaysInformationPassing.py", line 250, in FuXi.Rete.SidewaysInformationPassing.BuildNaturalSIP
Failed example:
    ruleStore._finalize()
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Rete.SidewaysInformationPassing.BuildNaturalSIP[1]>", line 1, in <module>
        ruleStore._finalize()
    NameError: name 'ruleStore' is not defined
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/SidewaysInformationPassing.py", line 251, in FuXi.Rete.SidewaysInformationPassing.BuildNaturalSIP
Failed example:
    fg=Graph().parse(StringIO(PROGRAM2),format='n3')
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Rete.SidewaysInformationPassing.BuildNaturalSIP[2]>", line 1, in <module>
        fg=Graph().parse(StringIO(PROGRAM2),format='n3')
    NameError: name 'PROGRAM2' is not defined
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/SidewaysInformationPassing.py", line 252, in FuXi.Rete.SidewaysInformationPassing.BuildNaturalSIP
Failed example:
    rs=Ruleset(n3Rules=ruleGraph.store.rules,nsMapping=ruleGraph.store.nsMgr)
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Rete.SidewaysInformationPassing.BuildNaturalSIP[3]>", line 1, in <module>
        rs=Ruleset(n3Rules=ruleGraph.store.rules,nsMapping=ruleGraph.store.nsMgr)
    NameError: name 'ruleGraph' is not defined
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/SidewaysInformationPassing.py", line 253, in FuXi.Rete.SidewaysInformationPassing.BuildNaturalSIP
Failed example:
    for rule in rs: print rule
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Rete.SidewaysInformationPassing.BuildNaturalSIP[4]>", line 1, in <module>
        for rule in rs: print rule
    NameError: name 'rs' is not defined
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/SidewaysInformationPassing.py", line 256, in FuXi.Rete.SidewaysInformationPassing.BuildNaturalSIP
Failed example:
    sip=BuildNaturalSIP(list(rs)[-1])
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Rete.SidewaysInformationPassing.BuildNaturalSIP[5]>", line 1, in <module>
        sip=BuildNaturalSIP(list(rs)[-1])
    NameError: name 'rs' is not defined
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/SidewaysInformationPassing.py", line 257, in FuXi.Rete.SidewaysInformationPassing.BuildNaturalSIP
Failed example:
    for N,x in IncomingSIPArcs(sip,MAGIC.sg): print N.n3(),x.n3()
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Rete.SidewaysInformationPassing.BuildNaturalSIP[6]>", line 1, in <module>
        for N,x in IncomingSIPArcs(sip,MAGIC.sg): print N.n3(),x.n3()
    NameError: name 'sip' is not defined
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/SidewaysInformationPassing.py", line 261, in FuXi.Rete.SidewaysInformationPassing.BuildNaturalSIP
Failed example:
    sip=BuildNaturalSIP(list(rs)[-1],[MAGIC.sg])
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Rete.SidewaysInformationPassing.BuildNaturalSIP[7]>", line 1, in <module>
        sip=BuildNaturalSIP(list(rs)[-1],[MAGIC.sg])
    NameError: name 'rs' is not defined
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/SidewaysInformationPassing.py", line 262, in FuXi.Rete.SidewaysInformationPassing.BuildNaturalSIP
Failed example:
    list(sip.query('SELECT ?q {  ?prop a magic:SipArc . [] ?prop ?q . }',initNs={u'magic':MAGIC}))
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Rete.SidewaysInformationPassing.BuildNaturalSIP[8]>", line 1, in <module>
        list(sip.query('SELECT ?q {  ?prop a magic:SipArc . [] ?prop ?q . }',initNs={u'magic':MAGIC}))
    NameError: name 'sip' is not defined
**********************************************************************
1 items had failures:
   9 of   9 in FuXi.Rete.SidewaysInformationPassing.BuildNaturalSIP
***Test Failed*** 9 failures.
testConsistentBinding (FuXi.Rete.BetaNode.PartialInstanciationTests) ... ok

----------------------------------------------------------------------
Ran 1 test in 0.071s

OK
ERROR--exception running doctest for BetaNode.py
Traceback (most recent call last):
  File "test/suite.py", line 194, in runEmbeddedTests
    failures, tests = doctest.testmod(mod)
  File "/usr/lib/python2.5/doctest.py", line 1814, in testmod
    for test in finder.find(m, name, globs=globs, extraglobs=extraglobs):
  File "/usr/lib/python2.5/doctest.py", line 839, in find
    self._find(tests, obj, name, module, source_lines, globs, {})
  File "/usr/lib/python2.5/doctest.py", line 893, in _find
    globs, seen)
  File "/usr/lib/python2.5/doctest.py", line 881, in _find
    test = self._get_test(obj, name, module, globs, source_lines)
  File "/usr/lib/python2.5/doctest.py", line 965, in _get_test
    filename, lineno)
  File "/usr/lib/python2.5/doctest.py", line 594, in get_doctest
    return DocTest(self.get_examples(string, name), globs,
  File "/usr/lib/python2.5/doctest.py", line 608, in get_examples
    return [x for x in self.parse(string, name)
  File "/usr/lib/python2.5/doctest.py", line 570, in parse
    self._parse_example(m, name, lineno)
  File "/usr/lib/python2.5/doctest.py", line 640, in _parse_example
    lineno + len(source_lines))
  File "/usr/lib/python2.5/doctest.py", line 726, in _check_prefix
    (lineno+i+1, name, line))
ValueError: line 91 of the docstring for FuXi.Rete.BetaNode.BetaNode has inconsistent leading whitespace: '\\    >>> joinNode1.memories[LEFT_MEMORY]'
*** DocTestRunner.merge: '__main__.extractEmbeddedSuite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.runEmbeddedTests' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.moduleIterator' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.suite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.runSuite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.splash' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.extractEmbeddedSuite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.runEmbeddedTests' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.moduleIterator' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.suite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.runSuite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.splash' in both testers; summing outcomes.
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/Util.py", line 197, in FuXi.Rete.Util.lazyGeneratorPeek
Failed example:
    result  # doctest:+ELLIPSIS
Expected:
    <generator object at ...>
Got:
    <FuXi.Rete.Util.InformedLazyGenerator object at 0xaa3576c>
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/Util.py", line 202, in FuXi.Rete.Util.lazyGeneratorPeek
Failed example:
    lazyGeneratorPeek((i for i in []))
Expected nothing
Got:
    <FuXi.Rete.Util.InformedLazyGenerator object at 0xaa3588c>
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/Util.py", line 203, in FuXi.Rete.Util.lazyGeneratorPeek
Failed example:
    lazyGeneratorPeek(result,4)
Expected nothing
Got:
    <FuXi.Rete.Util.InformedLazyGenerator object at 0xaa3576c>
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/Util.py", line 204, in FuXi.Rete.Util.lazyGeneratorPeek
Failed example:
    lazyGeneratorPeek(result,3) # doctest:+ELLIPSIS
Expected:
    <generator object at ...>
Got:
    <FuXi.Rete.Util.InformedLazyGenerator object at 0xaa3590c>
**********************************************************************
1 items had failures:
   4 of  11 in FuXi.Rete.Util.lazyGeneratorPeek
***Test Failed*** 4 failures.
*** DocTestRunner.merge: '__main__.extractEmbeddedSuite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.runEmbeddedTests' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.moduleIterator' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.suite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.runSuite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.splash' in both testers; summing outcomes.
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/RuleStore.py", line 212, in FuXi.Rete.RuleStore.N3RuleStore
Failed example:
    try: 
      g=g.parse(StringIO(src),format='n3')
    except Exception,e:
      print e
Expected:
    Builtin refers to variables without previous reference! (<http://www.w3.org/2000/10/swap/math#lessThan>(?M,?Z))
Got nothing
**********************************************************************
1 items had failures:
   1 of  41 in FuXi.Rete.RuleStore.N3RuleStore
***Test Failed*** 1 failures.
*** DocTestRunner.merge: '__main__.extractEmbeddedSuite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.runEmbeddedTests' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.moduleIterator' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.suite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.runSuite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.splash' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.extractEmbeddedSuite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.runEmbeddedTests' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.moduleIterator' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.suite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.runSuite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.splash' in both testers; summing outcomes.
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/Network.py", line 63, in FuXi.Rete.Network.HashablePatternList
Failed example:
    b in a
Expected:
    True
Got:
    False
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/Network.py", line 65, in FuXi.Rete.Network.HashablePatternList
Failed example:
    a == b 
Expected:
    True
Got:
    False
**********************************************************************
1 items had failures:
   2 of   7 in FuXi.Rete.Network.HashablePatternList
***Test Failed*** 2 failures.

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
ERROR--exception running unittest Magic.py
Traceback (most recent call last):
  File "test/suite.py", line 182, in runEmbeddedTests
    mod.__dict__["test"]()
  File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/Magic.py", line 818, in test
    unittest.main()
  File "/usr/lib/python2.5/unittest.py", line 768, in __init__
    self.runTests()
  File "/usr/lib/python2.5/unittest.py", line 806, in runTests
    sys.exit(not result.wasSuccessful())
SystemExit: False
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/Magic.py", line 580, in FuXi.Rete.Magic.AdornLiteral
Failed example:
    query=RenderSPARQLAlgebra(parse(NON_LINEAR_MS_QUERY))
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Rete.Magic.AdornLiteral[1]>", line 1, in <module>
        query=RenderSPARQLAlgebra(parse(NON_LINEAR_MS_QUERY))
    NameError: name 'NON_LINEAR_MS_QUERY' is not defined
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/Magic.py", line 581, in FuXi.Rete.Magic.AdornLiteral
Failed example:
    literal=query.patterns[0][:3]
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Rete.Magic.AdornLiteral[2]>", line 1, in <module>
        literal=query.patterns[0][:3]
    NameError: name 'query' is not defined
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/Magic.py", line 582, in FuXi.Rete.Magic.AdornLiteral
Failed example:
    literal
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Rete.Magic.AdornLiteral[3]>", line 1, in <module>
        literal
    NameError: name 'literal' is not defined
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/Magic.py", line 584, in FuXi.Rete.Magic.AdornLiteral
Failed example:
    aLit=AdornLiteral(literal,query.prolog.prefixBindings)
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Rete.Magic.AdornLiteral[4]>", line 1, in <module>
        aLit=AdornLiteral(literal,query.prolog.prefixBindings)
    NameError: name 'literal' is not defined
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/Magic.py", line 585, in FuXi.Rete.Magic.AdornLiteral
Failed example:
    aLit
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Rete.Magic.AdornLiteral[5]>", line 1, in <module>
        aLit
    NameError: name 'aLit' is not defined
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/Magic.py", line 587, in FuXi.Rete.Magic.AdornLiteral
Failed example:
    aLit.adornment
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Rete.Magic.AdornLiteral[6]>", line 1, in <module>
        aLit.adornment
    NameError: name 'aLit' is not defined
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/Magic.py", line 589, in FuXi.Rete.Magic.AdornLiteral
Failed example:
    aLit.getBindings(Uniterm(EX.sg,[Variable('X'),EX.jill]))
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Rete.Magic.AdornLiteral[7]>", line 1, in <module>
        aLit.getBindings(Uniterm(EX.sg,[Variable('X'),EX.jill]))
    NameError: name 'aLit' is not defined
**********************************************************************
1 items had failures:
   7 of   8 in FuXi.Rete.Magic.AdornLiteral
***Test Failed*** 7 failures.
*** DocTestRunner.merge: '__main__.extractEmbeddedSuite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.runEmbeddedTests' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.moduleIterator' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.suite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.runSuite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.splash' in both testers; summing outcomes.
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/SPARQL/BackwardChainingStore.py", line 62, in FuXi.SPARQL.BackwardChainingStore.TopDownSPARQLEntailingStore.isaBaseQuery
Failed example:
    topDownStore = TopDownSPARQLEntailingStore(graph.store,[RDFS.seeAlso],nsBindings={u'rdfs':RDFS.RDFSNS})
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.SPARQL.BackwardChainingStore.TopDownSPARQLEntailingStore.isaBaseQuery[1]>", line 1, in <module>
        topDownStore = TopDownSPARQLEntailingStore(graph.store,[RDFS.seeAlso],nsBindings={u'rdfs':RDFS.RDFSNS})
      File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/SPARQL/BackwardChainingStore.py", line 109, in __init__
        self.derivedPredicates = list(DerivedPredicateIterator(self.edb,self.idb))
      File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/Magic.py", line 609, in DerivedPredicateIterator
        if fact[1] != LOG.implies]
      File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Horn/PositiveConditions.py", line 19, in buildUniTerm
        def buildUniTerm((s,p,o),newNss=None):
    ValueError: too many values to unpack
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/SPARQL/BackwardChainingStore.py", line 63, in FuXi.SPARQL.BackwardChainingStore.TopDownSPARQLEntailingStore.isaBaseQuery
Failed example:
    rt=topDownStore.isaBaseQuery("SELECT * { [] rdfs:seeAlso [] }")
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.SPARQL.BackwardChainingStore.TopDownSPARQLEntailingStore.isaBaseQuery[2]>", line 1, in <module>
        rt=topDownStore.isaBaseQuery("SELECT * { [] rdfs:seeAlso [] }")
    NameError: name 'topDownStore' is not defined
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/SPARQL/BackwardChainingStore.py", line 64, in FuXi.SPARQL.BackwardChainingStore.TopDownSPARQLEntailingStore.isaBaseQuery
Failed example:
    isinstance(rt,(BasicGraphPattern,AlgebraExpression))
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.SPARQL.BackwardChainingStore.TopDownSPARQLEntailingStore.isaBaseQuery[3]>", line 1, in <module>
        isinstance(rt,(BasicGraphPattern,AlgebraExpression))
    NameError: name 'rt' is not defined
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/SPARQL/BackwardChainingStore.py", line 66, in FuXi.SPARQL.BackwardChainingStore.TopDownSPARQLEntailingStore.isaBaseQuery
Failed example:
    rt=topDownStore.isaBaseQuery("SELECT * { [] a [] }")
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.SPARQL.BackwardChainingStore.TopDownSPARQLEntailingStore.isaBaseQuery[4]>", line 1, in <module>
        rt=topDownStore.isaBaseQuery("SELECT * { [] a [] }")
    NameError: name 'topDownStore' is not defined
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/SPARQL/BackwardChainingStore.py", line 67, in FuXi.SPARQL.BackwardChainingStore.TopDownSPARQLEntailingStore.isaBaseQuery
Failed example:
    isinstance(rt,(Query,basestring))
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.SPARQL.BackwardChainingStore.TopDownSPARQLEntailingStore.isaBaseQuery[5]>", line 1, in <module>
        isinstance(rt,(Query,basestring))
    NameError: name 'rt' is not defined
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/SPARQL/BackwardChainingStore.py", line 69, in FuXi.SPARQL.BackwardChainingStore.TopDownSPARQLEntailingStore.isaBaseQuery
Failed example:
    rt=topDownStore.isaBaseQuery("SELECT * { [] a [] OPTIONAL { [] rdfs:seeAlso [] } }")
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.SPARQL.BackwardChainingStore.TopDownSPARQLEntailingStore.isaBaseQuery[6]>", line 1, in <module>
        rt=topDownStore.isaBaseQuery("SELECT * { [] a [] OPTIONAL { [] rdfs:seeAlso [] } }")
    NameError: name 'topDownStore' is not defined
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/SPARQL/BackwardChainingStore.py", line 70, in FuXi.SPARQL.BackwardChainingStore.TopDownSPARQLEntailingStore.isaBaseQuery
Failed example:
    isinstance(rt,(BasicGraphPattern,AlgebraExpression))
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.SPARQL.BackwardChainingStore.TopDownSPARQLEntailingStore.isaBaseQuery[7]>", line 1, in <module>
        isinstance(rt,(BasicGraphPattern,AlgebraExpression))
    NameError: name 'rt' is not defined
**********************************************************************
1 items had failures:
   7 of   8 in FuXi.SPARQL.BackwardChainingStore.TopDownSPARQLEntailingStore.isaBaseQuery
***Test Failed*** 7 failures.
*** DocTestRunner.merge: '__main__.extractEmbeddedSuite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.runEmbeddedTests' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.moduleIterator' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.suite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.runSuite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.splash' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.extractEmbeddedSuite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.runEmbeddedTests' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.moduleIterator' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.suite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.runSuite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.splash' in both testers; summing outcomes.
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Horn/PositiveConditions.py", line 539, in FuXi.Horn.PositiveConditions.ExternalFunction
Failed example:
    ExternalFunction(Uniterm(URIRef('http://www.w3.org/2000/10/swap/math#greaterThan'),[Variable('VAL'),Literal(2)]))
Expected:
    math:greaterThan(?VAL "2"^^<http://www.w3.org/2001/XMLSchema#integer>)
Got:
    math:greaterThan(?VAL 2)
**********************************************************************
1 items had failures:
   1 of   1 in FuXi.Horn.PositiveConditions.ExternalFunction
***Test Failed*** 1 failures.
*** DocTestRunner.merge: '__main__.extractEmbeddedSuite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.runEmbeddedTests' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.moduleIterator' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.suite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.runSuite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.splash' in both testers; summing outcomes.
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Horn/HornRules.py", line 179, in FuXi.Horn.HornRules.Rule.isSafe
Failed example:
    r1.isSafe()
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Horn.HornRules.Rule.isSafe[4]>", line 1, in <module>
        r1.isSafe()
      File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Horn/HornRules.py", line 195, in isSafe
        GetArgs(self.formula.head)):
      File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/SidewaysInformationPassing.py", line 185, in GetArgs
        raise term
    TypeError: exceptions must be classes, instances, or strings (deprecated), not Uniterm
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Horn/HornRules.py", line 181, in FuXi.Horn.HornRules.Rule.isSafe
Failed example:
    r2.isSafe()
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Horn.HornRules.Rule.isSafe[5]>", line 1, in <module>
        r2.isSafe()
      File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Horn/HornRules.py", line 195, in isSafe
        GetArgs(self.formula.head)):
      File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/SidewaysInformationPassing.py", line 185, in GetArgs
        raise term
    TypeError: exceptions must be classes, instances, or strings (deprecated), not Uniterm
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Horn/HornRules.py", line 187, in FuXi.Horn.HornRules.Rule.isSafe
Failed example:
    r1.isSafe()
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Horn.HornRules.Rule.isSafe[9]>", line 1, in <module>
        r1.isSafe()
      File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Horn/HornRules.py", line 195, in isSafe
        GetArgs(self.formula.head)):
      File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/SidewaysInformationPassing.py", line 185, in GetArgs
        raise term
    TypeError: exceptions must be classes, instances, or strings (deprecated), not Exists
**********************************************************************
1 items had failures:
   3 of  10 in FuXi.Horn.HornRules.Rule.isSafe
***Test Failed*** 3 failures.
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Syntax/InfixOWL.py", line 68, in FuXi.Syntax.InfixOWL
Failed example:
    c
Expected:
    ( ex:Opera or ex:CreativeWork or ex:Work )
Got:
    ( ex:Opera OR ex:CreativeWork OR ex:Work )
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Syntax/InfixOWL.py", line 74, in FuXi.Syntax.InfixOWL
Failed example:
    c
Expected:
    ( ex:Opera or ex:CreativeWork )
Got:
    ( ex:Opera OR ex:CreativeWork )
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Syntax/InfixOWL.py", line 81, in FuXi.Syntax.InfixOWL
Failed example:
    woman
Expected:
    ( ex:Female and ex:Human )
Got:
    ( ex:Female AND ex:Human )
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Syntax/InfixOWL.py", line 94, in FuXi.Syntax.InfixOWL
Failed example:
    Restriction(exNs.hasParent,graph=g,allValuesFrom=exNs.Human)
Expected:
    ( ex:hasParent only ex:Human )
Got:
    ( ex:hasParent ONLY ex:Human )
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Syntax/InfixOWL.py", line 98, in FuXi.Syntax.InfixOWL
Failed example:
    exNs.hasParent |some| Class(exNs.Physician,graph=g)
Expected:
    ( ex:hasParent some ex:Physician )
Got:
    ( ex:hasParent SOME ex:Physician )
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Syntax/InfixOWL.py", line 101, in FuXi.Syntax.InfixOWL
Failed example:
    Property(exNs.hasParent,graph=g) |max| Literal(1)
Expected:
    ( ex:hasParent max 1 )
Got:
    ( ex:hasParent MAX 1 )
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Syntax/InfixOWL.py", line 1343, in FuXi.Syntax.InfixOWL.BooleanClass.changeOperator
Failed example:
    testClass
Expected:
    ( ex:Fire and ex:Water )
Got:
    ( ex:Fire AND ex:Water )
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Syntax/InfixOWL.py", line 1346, in FuXi.Syntax.InfixOWL.BooleanClass.changeOperator
Failed example:
    testClass
Expected:
    ( ex:Fire or ex:Water )
Got:
    ( ex:Fire OR ex:Water )
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Syntax/InfixOWL.py", line 1252, in FuXi.Syntax.InfixOWL.BooleanClassExtentHelper
Failed example:
    for c in BooleanClass.getIntersections():
        print c
Expected:
    ( ex:Fire and ex:Water )
Got:
    ( ex:Fire AND ex:Water )
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Syntax/InfixOWL.py", line 1255, in FuXi.Syntax.InfixOWL.BooleanClassExtentHelper
Failed example:
    for c in BooleanClass.getUnions():
        print c
Expected:
    ( ex:Fire or ex:Water )
Got:
    ( ex:Fire OR ex:Water )
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Syntax/InfixOWL.py", line 907, in FuXi.Syntax.InfixOWL.Class.__and__
Failed example:
    youngWoman
Expected:
    ex:YoungPerson that ( ex:Female and ex:Human )
Got:
    ex:YoungPerson THAT ( ex:Female AND ex:Human )
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Syntax/InfixOWL.py", line 1000, in FuXi.Syntax.InfixOWL.Class._get_parents
Failed example:
    sibling
Expected:
    ( ex:Brother or ex:Sister )
Got:
    ( ex:Brother OR ex:Sister )
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Syntax/InfixOWL.py", line 1002, in FuXi.Syntax.InfixOWL.Class._get_parents
Failed example:
    first(brother.parents)
Expected:
    Class: ex:Sibling EquivalentTo: ( ex:Brother or ex:Sister )
Got:
    Class: ex:Sibling EquivalentTo: ( ex:Brother OR ex:Sister )
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Syntax/InfixOWL.py", line ?, in FuXi.Syntax.InfixOWL.Class.parents
Failed example:
    sibling
Expected:
    ( ex:Brother or ex:Sister )
Got:
    ( ex:Brother OR ex:Sister )
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Syntax/InfixOWL.py", line ?, in FuXi.Syntax.InfixOWL.Class.parents
Failed example:
    first(brother.parents)
Expected:
    Class: ex:Sibling EquivalentTo: ( ex:Brother or ex:Sister )
Got:
    Class: ex:Sibling EquivalentTo: ( ex:Brother OR ex:Sister )
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Syntax/InfixOWL.py", line 664, in FuXi.Syntax.InfixOWL.DeepClassClear
Failed example:
    classA
Expected:
    ( ex:E or ex:F or ( ex:someProp some ex:D ) )
Got:
    ( ex:E OR ex:F OR ( ex:someProp SOME ex:D ) )
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Syntax/InfixOWL.py", line 671, in FuXi.Syntax.InfixOWL.DeepClassClear
Failed example:
    classB
Expected:
    Class: ex:B SubClassOf: ( ex:someProp some ex:C )
Got:
    Class: ex:B SubClassOf: ( ex:someProp SOME ex:C )
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Syntax/InfixOWL.py", line 675, in FuXi.Syntax.InfixOWL.DeepClassClear
Failed example:
    otherClass
Expected:
    ( ex:D or ( ex:someProp some ex:D ) )
Got:
    ( ex:D OR ( ex:someProp SOME ex:D ) )
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Syntax/InfixOWL.py", line 1451, in FuXi.Syntax.InfixOWL.Restriction.serialize
Failed example:
    restr1
Expected:
    ( ex:someProp some ex:Foo )
Got:
    ( ex:someProp SOME ex:Foo )
**********************************************************************
8 items had failures:
   6 of  28 in FuXi.Syntax.InfixOWL
   2 of  13 in FuXi.Syntax.InfixOWL.BooleanClass.changeOperator
   2 of  12 in FuXi.Syntax.InfixOWL.BooleanClassExtentHelper
   1 of  13 in FuXi.Syntax.InfixOWL.Class.__and__
   2 of  18 in FuXi.Syntax.InfixOWL.Class._get_parents
   2 of  18 in FuXi.Syntax.InfixOWL.Class.parents
   3 of  30 in FuXi.Syntax.InfixOWL.DeepClassClear
   1 of  14 in FuXi.Syntax.InfixOWL.Restriction.serialize
***Test Failed*** 19 failures.
*** DocTestRunner.merge: '__main__.extractEmbeddedSuite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.runEmbeddedTests' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.moduleIterator' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.suite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.runSuite' in both testers; summing outcomes.
*** DocTestRunner.merge: '__main__.splash' in both testers; summing outcomes.
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/DLP/LPNormalForms.py", line 54, in FuXi.DLP.LPNormalForms.ApplyDemorgans
Failed example:
    clause
Expected:
    ex:somePredicate4(?X) :- And( ex:somePredicate(?X ?Y) And( not ex:somePredicate2(?X ex:individual1) not ex:somePredicate3(?Y) ) )
Got:
    ex:somePredicate4(?X) :- And( ex:somePredicate(?X ?Y) not Or( ex:somePredicate2(?X ex:individual1) ex:somePredicate3(?Y) ) )
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/DLP/LPNormalForms.py", line 57, in FuXi.DLP.LPNormalForms.ApplyDemorgans
Failed example:
    clause
Expected:
    ex:somePredicate4(?X) :- And( ex:somePredicate(?X ?Y) not ex:somePredicate2(?X ex:individual1) not ex:somePredicate3(?Y) )
Got:
    ex:somePredicate4(?X) :- And( ex:somePredicate(?X ?Y) not Or( ex:somePredicate2(?X ex:individual1) ex:somePredicate3(?Y) ) )
**********************************************************************
1 items had failures:
   2 of  13 in FuXi.DLP.LPNormalForms.ApplyDemorgans
***Test Failed*** 2 failures.
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/DLP/CompletionReasoning.py", line 184, in FuXi.DLP.CompletionReasoning.StructuralTransformation
Failed example:
    newGraph,conceptMap = StructuralTransformation(graph)
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.DLP.CompletionReasoning.StructuralTransformation[18]>", line 1, in <module>
        newGraph,conceptMap = StructuralTransformation(graph)
    TypeError: StructuralTransformation() takes exactly 2 arguments (1 given)
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/DLP/CompletionReasoning.py", line 185, in FuXi.DLP.CompletionReasoning.StructuralTransformation
Failed example:
    revDict = dict([(v,k) for k,v in conceptMap.items()])
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.DLP.CompletionReasoning.StructuralTransformation[19]>", line 1, in <module>
        revDict = dict([(v,k) for k,v in conceptMap.items()])
    NameError: name 'conceptMap' is not defined
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/DLP/CompletionReasoning.py", line 186, in FuXi.DLP.CompletionReasoning.StructuralTransformation
Failed example:
    newGraph.bind('ex',EX,True)
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.DLP.CompletionReasoning.StructuralTransformation[20]>", line 1, in <module>
        newGraph.bind('ex',EX,True)
    NameError: name 'newGraph' is not defined
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/DLP/CompletionReasoning.py", line 187, in FuXi.DLP.CompletionReasoning.StructuralTransformation
Failed example:
    Individual.factoryGraph = newGraph
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.DLP.CompletionReasoning.StructuralTransformation[21]>", line 1, in <module>
        Individual.factoryGraph = newGraph
    NameError: name 'newGraph' is not defined
**********************************************************************
File ".../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/DLP/CompletionReasoning.py", line 188, in FuXi.DLP.CompletionReasoning.StructuralTransformation
Failed example:
    for c in AllClasses(newGraph):
        if c.identifier in revDict: print "## New concept for %s ##"%revDict[c.identifier]
        print c.__repr__(True)
        print "################################"
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.DLP.CompletionReasoning.StructuralTransformation[22]>", line 1, in <module>
        for c in AllClasses(newGraph):
    NameError: name 'newGraph' is not defined
**********************************************************************
1 items had failures:
   5 of  23 in FuXi.DLP.CompletionReasoning.StructuralTransformation
***Test Failed*** 5 failures.
Summary of FuXi External Unit Tests (other than testOWL)  ====================================
* Ran 14 tests with 5 failures and 1 errors.
* Failed tests were:
<additionalDLPTests.AdditionalDescriptionLogicTests testMethod=testBasePredicateEquivalence>
<additionalDLPTests.AdditionalDescriptionLogicTests testMethod=testExistentialInRightOfGCI>
<additionalDLPTests.AdditionalDescriptionLogicTests testMethod=testGCIConDisjunction>
<additionalDLPTests.AdditionalDescriptionLogicTests testMethod=testOtherForm2>
<additionalDLPTests.AdditionalDescriptionLogicTests testMethod=testValueRestrictionInLeftOfGCI>
* Tests in error were:
<testSkolemization.UnionSkolemizedTest testMethod=testUnionSkolemization>
Summary of Embedded FuXi Tests  ====================================
* 11 mods with doctest failures:
['SidewaysInformationPassing.py', 'Util.py', 'RuleStore.py', 'Network.py', 'Magic.py', 'BackwardChainingStore.py', 'PositiveConditions.py', 'HornRules.py', 'InfixOWL.py', 'LPNormalForms.py', 'CompletionReasoning.py']
* 1 mods with doctest errors: 
[<module 'FuXi.Rete.BetaNode' from '.../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/BetaNode.pyc'>]
* Total doctests run 428: 
* Total attempted test functions: 14
* 1 mods with test function failures: 
[<module 'FuXi.Rete.Magic' from '.../python2.5/site-packages/FuXi-1.3.production-py2.5.egg/FuXi/Rete/Magic.pyc'>]

Note summary statistics are not available for the testOWL runs.

@ghost
Copy link

ghost commented Oct 29, 2012

Slightly different results from the RDFLib3-compat codebase:

./.tox/pypy/bin/pypy test/suite.py 

Running testOWL with gms ====================================
testOwl (testOWL.OwlTestSuite) ... OWL/allValuesFrom/premises001
OWL/allValuesFrom/conclusions001
<OWL/allValuesFrom/conclusions001.rdf> :- <OWL/allValuesFrom/premises001.rdf>
## Source Graph ##
@prefix first: <http://www.w3.org/2002/03owlt/allValuesFrom/premises001#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

first:i a first:r,
        owl:Thing;
    first:p first:o .

first:c a owl:Class .

first:o a owl:Thing .

first:p a owl:ObjectProperty .

first:r a owl:Class;
    rdfs:subClassOf [ a owl:Restriction;
            owl:allValuesFrom first:c;
            owl:onProperty first:p ] .


Class: first:r 
    ## Primitive Type  ##
    SubClassOf: ( first:p ONLY first:c )
Class: first:c 
OWL/allValuesFrom/premises001 http://www.w3.org/2002/07/owl#allValuesFrom 
A simple example.
Original program
[Forall ?SC ?A ?C ( rdfs:subClassOf(?A ?SC) :- And( rdfs:subClassOf(?C ?SC) rdfs:subClassOf(?A ?C) ) ),
 Forall ?A ?C ( And( rdfs:subClassOf(?C ?A) rdfs:subClassOf(?A ?C) ) :- owl:equivalentClass(?C ?A) ),
 Forall ?SC ?C ( owl:equivalentClass(?C ?SC) :- And( rdfs:subClassOf(?C ?SC) rdfs:subClassOf(?SC ?C) ) ),
 Forall ?Y ?C ?B ?M ( owl:differentFrom(?M ?Y) :- And( owl:disjointWith(?C ?B) ?C(?M) ?B(?Y) ) ),
 Forall ?Q ?P ( owl:FunctionalProperty(?Q) :- And( owl:inverseOf(?P ?Q) owl:InverseFunctionalProperty(?P) ) ),
 Forall ?Q ?P ( owl:InverseFunctionalProperty(?Q) :- And( owl:inverseOf(?P ?Q) owl:FunctionalProperty(?P) ) ),
 Forall ?X ?C ?L ?P ( owl:InverseFunctionalProperty(?P) :- And( owl:oneOf(?C ?L) rdf:first(?L ?X) rdf:rest(?L rdf:nil) rdfs:domain(?P ?C) ) ),
 Forall ?X ?C ?L ?P ( owl:FunctionalProperty(?P) :- And( owl:oneOf(?C ?L) rdf:first(?L ?X) rdf:rest(?L rdf:nil) rdfs:range(?P ?C) ) ),
 Forall ?S ?O ( owl:differentFrom(?O ?S) :- owl:differentFrom(?S ?O) ),
 Forall ?S ?O ( owl:complementOf(?O ?S) :- owl:complementOf(?S ?O) ),
 Forall ?S ?O ( owl:disjointWith(?O ?S) :- owl:disjointWith(?S ?O) ),
 Forall ?X ?N42ce4997b0834959861169c806d179f5 ( first:c(?N42ce4997b0834959861169c806d179f5) :- And( first:r(?X) first:p(?X ?N42ce4997b0834959861169c806d179f5) ) )]
.../FuXi/Rete/Magic.py:711: UserWarning: predicate symbol of rdfs:subClassOf(?A ?SC) is in both IDB and EDB. Marking as derived
  "predicate symbol of %s is in both IDB and EDB. Marking as %s" % (term, mark))
    Forall ?X ?N42ce4997b0834959861169c806d179f5 ( ns1:c_b(?N42ce4997b0834959861169c806d179f5) :- And( ns1:c_magic(?N42ce4997b0834959861169c806d179f5) first:p(?X ?N42ce4997b0834959861169c806d179f5) first:r(?X) ) )
rate of reduction in the size of the program:  91.6666666667
Magic seed fact  ns1:c_magic(ns1:o)
Time to calculate closure on working memory:  14.4391059875 milli seconds
<Network: 1 rules, 6 nodes, 5 tokens in working memory, 1 inferred tokens>
<TerminalNode (ns1:c_b(?N42ce4997b0834959861169c806d179f5) :- And( ns1:c_magic(?N42ce4997b0834959861169c806d179f5) first:p(?X ?N42ce4997b0834959861169c806d179f5) first:r(?X) )) : CommonVariables: [?X] (1 in left, 1 in right memories)>
    set([Forall ?X ?N42ce4997b0834959861169c806d179f5 ( ns1:c_b(?N42ce4997b0834959861169c806d179f5) :- And( ns1:c_magic(?N42ce4997b0834959861169c806d179f5) first:p(?X ?N42ce4997b0834959861169c806d179f5) first:r(?X) ) )])
        1 instantiations
==============
=== Passed! ===
OWL/TransitiveProperty/premises001
OWL/TransitiveProperty/conclusions001
<OWL/TransitiveProperty/conclusions001.rdf> :- <OWL/TransitiveProperty/premises001.rdf>
## Source Graph ##
@prefix first: <http://www.w3.org/2002/03owlt/TransitiveProperty/premises001#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .

first:Ghent first:path first:Antwerp .

first:path a owl:TransitiveProperty .

first:Antwerp first:path first:Amsterdam .


OWL/TransitiveProperty/premises001 http://www.w3.org/2002/07/owl#TransitiveProperty 
A simple illustration of transitivity.

Original program
[Forall ?SC ?A ?C ( rdfs:subClassOf(?A ?SC) :- And( rdfs:subClassOf(?C ?SC) rdfs:subClassOf(?A ?C) ) ),
 Forall ?A ?C ( And( rdfs:subClassOf(?C ?A) rdfs:subClassOf(?A ?C) ) :- owl:equivalentClass(?C ?A) ),
 Forall ?SC ?C ( owl:equivalentClass(?C ?SC) :- And( rdfs:subClassOf(?C ?SC) rdfs:subClassOf(?SC ?C) ) ),
 Forall ?Y ?C ?B ?M ( owl:differentFrom(?M ?Y) :- And( owl:disjointWith(?C ?B) ?C(?M) ?B(?Y) ) ),
 Forall ?Q ?P ( owl:FunctionalProperty(?Q) :- And( owl:inverseOf(?P ?Q) owl:InverseFunctionalProperty(?P) ) ),
 Forall ?Q ?P ( owl:InverseFunctionalProperty(?Q) :- And( owl:inverseOf(?P ?Q) owl:FunctionalProperty(?P) ) ),
 Forall ?X ?C ?L ?P ( owl:InverseFunctionalProperty(?P) :- And( owl:oneOf(?C ?L) rdf:first(?L ?X) rdf:rest(?L rdf:nil) rdfs:domain(?P ?C) ) ),
 Forall ?X ?C ?L ?P ( owl:FunctionalProperty(?P) :- And( owl:oneOf(?C ?L) rdf:first(?L ?X) rdf:rest(?L rdf:nil) rdfs:range(?P ?C) ) ),
 Forall ?S ?O ( owl:differentFrom(?O ?S) :- owl:differentFrom(?S ?O) ),
 Forall ?S ?O ( owl:complementOf(?O ?S) :- owl:complementOf(?S ?O) ),
 Forall ?S ?O ( owl:disjointWith(?O ?S) :- owl:disjointWith(?S ?O) ),
 Forall ?X ?Nb16b4c0cb95e4123a6a59288987253fc ?N5f9bb433e11e47778877afb6b1b65cbe ( first:path(?X ?Nb16b4c0cb95e4123a6a59288987253fc) :- And( first:path(?X ?N5f9bb433e11e47778877afb6b1b65cbe) first:path(?N5f9bb433e11e47778877afb6b1b65cbe ?Nb16b4c0cb95e4123a6a59288987253fc) ) )]
.../FuXi/Rete/Magic.py:711: UserWarning: predicate symbol of first:path(?X ?Nb16b4c0cb95e4123a6a59288987253fc) is in both IDB and EDB. Marking as derived
  "predicate symbol of %s is in both IDB and EDB. Marking as %s" % (term, mark))
    Forall ?X ?Nb16b4c0cb95e4123a6a59288987253fc ?N5f9bb433e11e47778877afb6b1b65cbe ( ns1:path_ff(?X ?Nb16b4c0cb95e4123a6a59288987253fc) :- And( first:path(?X ?N5f9bb433e11e47778877afb6b1b65cbe) first:path(?N5f9bb433e11e47778877afb6b1b65cbe ?Nb16b4c0cb95e4123a6a59288987253fc) ) )
    Forall ?X ?Nb16b4c0cb95e4123a6a59288987253fc ?N5f9bb433e11e47778877afb6b1b65cbe ( ns1:path_bb(?X ?Nb16b4c0cb95e4123a6a59288987253fc) :- And( ns1:path_magic(?X ?Nb16b4c0cb95e4123a6a59288987253fc) first:path(?X ?N5f9bb433e11e47778877afb6b1b65cbe) first:path(?N5f9bb433e11e47778877afb6b1b65cbe ?Nb16b4c0cb95e4123a6a59288987253fc) ) )
rate of reduction in the size of the program:  83.3333333333
Magic seed fact  ns1:path_magic(ns1:Ghent ns1:Amsterdam)
Time to calculate closure on working memory:  13.1130218506 milli seconds
<Network: 2 rules, 8 nodes, 19 tokens in working memory, 1 inferred tokens>
<TerminalNode (ns1:path_ff(?X ?Nb16b4c0cb95e4123a6a59288987253fc) :- And( first:path(?X ?N5f9bb433e11e47778877afb6b1b65cbe) first:path(?N5f9bb433e11e47778877afb6b1b65cbe ?Nb16b4c0cb95e4123a6a59288987253fc) )) : CommonVariables: [?N5f9bb433e11e47778877afb6b1b65cbe] (3 in left, 3 in right memories)>
    set([Forall ?X ?Nb16b4c0cb95e4123a6a59288987253fc ?N5f9bb433e11e47778877afb6b1b65cbe ( ns1:path_ff(?X ?Nb16b4c0cb95e4123a6a59288987253fc) :- And( first:path(?X ?N5f9bb433e11e47778877afb6b1b65cbe) first:path(?N5f9bb433e11e47778877afb6b1b65cbe ?Nb16b4c0cb95e4123a6a59288987253fc) ) )])
        1 instantiations
==============
=== Passed! ===
OWL/complementOf/premises001
OWL/complementOf/conclusions001
<OWL/complementOf/conclusions001.rdf> :- <OWL/complementOf/premises001.rdf>
## Source Graph ##
@prefix first: <http://www.w3.org/2002/03owlt/complementOf/premises001#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .

first:A owl:complementOf first:B .


OWL/complementOf/premises001 http://www.w3.org/2002/07/owl#complementOf 
<code xmlns="http://www.w3.org/1999/xhtml">complementOf</code> is a <code xmlns="http://www.w3.org/1999/xhtml">SymmetricProperty</code>.

Original program
[Forall ?SC ?A ?C ( rdfs:subClassOf(?A ?SC) :- And( rdfs:subClassOf(?C ?SC) rdfs:subClassOf(?A ?C) ) ),
 Forall ?A ?C ( And( rdfs:subClassOf(?C ?A) rdfs:subClassOf(?A ?C) ) :- owl:equivalentClass(?C ?A) ),
 Forall ?SC ?C ( owl:equivalentClass(?C ?SC) :- And( rdfs:subClassOf(?C ?SC) rdfs:subClassOf(?SC ?C) ) ),
 Forall ?Y ?C ?B ?M ( owl:differentFrom(?M ?Y) :- And( owl:disjointWith(?C ?B) ?C(?M) ?B(?Y) ) ),
 Forall ?Q ?P ( owl:FunctionalProperty(?Q) :- And( owl:inverseOf(?P ?Q) owl:InverseFunctionalProperty(?P) ) ),
 Forall ?Q ?P ( owl:InverseFunctionalProperty(?Q) :- And( owl:inverseOf(?P ?Q) owl:FunctionalProperty(?P) ) ),
 Forall ?X ?C ?L ?P ( owl:InverseFunctionalProperty(?P) :- And( owl:oneOf(?C ?L) rdf:first(?L ?X) rdf:rest(?L rdf:nil) rdfs:domain(?P ?C) ) ),
 Forall ?X ?C ?L ?P ( owl:FunctionalProperty(?P) :- And( owl:oneOf(?C ?L) rdf:first(?L ?X) rdf:rest(?L rdf:nil) rdfs:range(?P ?C) ) ),
 Forall ?S ?O ( owl:differentFrom(?O ?S) :- owl:differentFrom(?S ?O) ),
 Forall ?S ?O ( owl:complementOf(?O ?S) :- owl:complementOf(?S ?O) ),
 Forall ?S ?O ( owl:disjointWith(?O ?S) :- owl:disjointWith(?S ?O) ),
 Forall ?X ( first:A(?X) :- not first:B(?X) )]
.../FuXi/Rete/Magic.py:711: UserWarning: predicate symbol of owl:complementOf(?O ?S) is in both IDB and EDB. Marking as derived
  "predicate symbol of %s is in both IDB and EDB. Marking as %s" % (term, mark))
    Forall ?S ?O ( owl:complementOf_ff(?O ?S) :- owl:complementOf(?S ?O) )
    Forall ?S ?O ( owl:complementOf_bb(?O ?S) :- And( owl:complementOf_magic(?O ?S) owl:complementOf(?S ?O) ) )
rate of reduction in the size of the program:  83.3333333333
Magic seed fact  owl:complementOf_magic(ns1:B ns1:A)
Time to calculate closure on working memory:  8.74519348145 milli seconds
<Network: 2 rules, 5 nodes, 6 tokens in working memory, 1 inferred tokens>
<TerminalNode (owl:complementOf_ff(?O ?S) :- owl:complementOf(?S ?O)) (pass-thru): CommonVariables: [?S, ?O] (0 in left, 2 in right memories)>
    set([Forall ?S ?O ( owl:complementOf_ff(?O ?S) :- owl:complementOf(?S ?O) )])
        1 instantiations
==============
=== Passed! ===
OWL/disjointWith/premises002
OWL/disjointWith/conclusions002
<OWL/disjointWith/conclusions002.rdf> :- <OWL/disjointWith/premises002.rdf>
## Source Graph ##
@prefix first: <http://www.w3.org/2002/03owlt/disjointWith/premises002#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .

first:a a first:A .

first:b a first:B .

first:A owl:disjointWith first:B .


OWL/disjointWith/premises002 http://www.w3.org/2002/07/owl#disjointWith 
Disjoint classes have different members; OWL Full.

Original program
[Forall ?SC ?A ?C ( rdfs:subClassOf(?A ?SC) :- And( rdfs:subClassOf(?C ?SC) rdfs:subClassOf(?A ?C) ) ),
 Forall ?A ?C ( And( rdfs:subClassOf(?C ?A) rdfs:subClassOf(?A ?C) ) :- owl:equivalentClass(?C ?A) ),
 Forall ?SC ?C ( owl:equivalentClass(?C ?SC) :- And( rdfs:subClassOf(?C ?SC) rdfs:subClassOf(?SC ?C) ) ),
 Forall ?Y ?C ?B ?M ( owl:differentFrom(?M ?Y) :- And( owl:disjointWith(?C ?B) ?C(?M) ?B(?Y) ) ),
 Forall ?Q ?P ( owl:FunctionalProperty(?Q) :- And( owl:inverseOf(?P ?Q) owl:InverseFunctionalProperty(?P) ) ),
 Forall ?Q ?P ( owl:InverseFunctionalProperty(?Q) :- And( owl:inverseOf(?P ?Q) owl:FunctionalProperty(?P) ) ),
 Forall ?X ?C ?L ?P ( owl:InverseFunctionalProperty(?P) :- And( owl:oneOf(?C ?L) rdf:first(?L ?X) rdf:rest(?L rdf:nil) rdfs:domain(?P ?C) ) ),
 Forall ?X ?C ?L ?P ( owl:FunctionalProperty(?P) :- And( owl:oneOf(?C ?L) rdf:first(?L ?X) rdf:rest(?L rdf:nil) rdfs:range(?P ?C) ) ),
 Forall ?S ?O ( owl:differentFrom(?O ?S) :- owl:differentFrom(?S ?O) ),
 Forall ?S ?O ( owl:complementOf(?O ?S) :- owl:complementOf(?S ?O) ),
 Forall ?S ?O ( owl:disjointWith(?O ?S) :- owl:disjointWith(?S ?O) )]
.../FuXi/Rete/Magic.py:711: UserWarning: predicate symbol of owl:disjointWith(?O ?S) is in both IDB and EDB. Marking as derived
  "predicate symbol of %s is in both IDB and EDB. Marking as %s" % (term, mark))
.../FuXi/Rete/Magic.py:204: RuntimeWarning: Second order rule no supported by GMS: Forall ?Y ?C ?B ?M ( owl:differentFrom_ff(?M ?Y) :- And( ?C(?M) owl:disjointWith(?C ?B) ?B(?Y) ) )
  RuntimeWarning)
.../FuXi/Rete/Magic.py:204: RuntimeWarning: Second order rule no supported by GMS: Forall ?Y ?C ?B ?M ( owl:differentFrom_bb(?M ?Y) :- And( ?C(?M) owl:disjointWith(?C ?B) ?B(?Y) ) )
  RuntimeWarning)
    Forall ?Y ?C ?B ?M ( owl:differentFrom_ff(?M ?Y) :- And( ?C(?M) owl:disjointWith(?C ?B) ?B(?Y) ) )
    Forall ?S ?O ( owl:differentFrom_ff(?O ?S) :- owl:differentFrom(?S ?O) )
    Forall ?Y ?C ?B ?M ( owl:differentFrom_bb(?M ?Y) :- And( owl:differentFrom_magic(?M ?Y) ?C(?M) owl:disjointWith(?C ?B) ?B(?Y) ) )
    Forall ?S ?O ( owl:disjointWith_ff(?O ?S) :- owl:disjointWith(?S ?O) )
    Forall ?S ?O ( owl:differentFrom_bb(?O ?S) :- And( owl:differentFrom_magic(?O ?S) owl:differentFrom(?S ?O) ) )
rate of reduction in the size of the program:  54.5454545455
Magic seed fact  owl:differentFrom_magic(ns1:a ns1:b)
Time to calculate closure on working memory:  32.1590900421 milli seconds
<Network: 5 rules, 18 nodes, 28 tokens in working memory, 3 inferred tokens>
<TerminalNode (owl:differentFrom_ff(?O ?S) :- owl:differentFrom(?S ?O)) (pass-thru): CommonVariables: [?S, ?O] (0 in left, 2 in right memories)>
    set([Forall ?S ?O ( owl:differentFrom_ff(?O ?S) :- owl:differentFrom(?S ?O) )])
        1 instantiations
<TerminalNode (owl:disjointWith_ff(?O ?S) :- owl:disjointWith(?S ?O)) (pass-thru): CommonVariables: [?S, ?O] (0 in left, 2 in right memories)>
    set([Forall ?S ?O ( owl:disjointWith_ff(?O ?S) :- owl:disjointWith(?S ?O) )])
        1 instantiations
<TerminalNode (owl:differentFrom_ff(?M ?Y) :- And( ?C(?M) owl:disjointWith(?C ?B) ?B(?Y) )) : CommonVariables: [?B] (2 in left, 2 in right memories)>
    set([Forall ?Y ?C ?B ?M ( owl:differentFrom_ff(?M ?Y) :- And( ?C(?M) owl:disjointWith(?C ?B) ?B(?Y) ) )])
        1 instantiations
==============
=== Passed! ===
OWL/inverseOf/premises001
OWL/inverseOf/conclusions001
<OWL/inverseOf/conclusions001.rdf> :- <OWL/inverseOf/premises001.rdf>
## Source Graph ##
@prefix eg: <http://example.net/vocab#> .
@prefix my: <http://example.net/myVocab#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix your: <http://example.net/yourVocab#> .

my:hasBrother owl:inverseOf your:isBrotherOf .

eg:joe my:hasBrother eg:bob .


OWL/inverseOf/premises001 http://www.w3.org/2002/07/owl#inverseOf 
If the pair <code xmlns="http://www.w3.org/1999/xhtml">(x,y)</code> is an instance of <code xmlns="http://www.w3.org/1999/xhtml">P</code>, than the pair <code xmlns="http://www.w3.org/1999/xhtml">(y,x)</code> is
  an instance of the named property.
Original program
[Forall ?SC ?A ?C ( rdfs:subClassOf(?A ?SC) :- And( rdfs:subClassOf(?C ?SC) rdfs:subClassOf(?A ?C) ) ),
 Forall ?A ?C ( And( rdfs:subClassOf(?C ?A) rdfs:subClassOf(?A ?C) ) :- owl:equivalentClass(?C ?A) ),
 Forall ?SC ?C ( owl:equivalentClass(?C ?SC) :- And( rdfs:subClassOf(?C ?SC) rdfs:subClassOf(?SC ?C) ) ),
 Forall ?Y ?C ?B ?M ( owl:differentFrom(?M ?Y) :- And( owl:disjointWith(?C ?B) ?C(?M) ?B(?Y) ) ),
 Forall ?Q ?P ( owl:FunctionalProperty(?Q) :- And( owl:inverseOf(?P ?Q) owl:InverseFunctionalProperty(?P) ) ),
 Forall ?Q ?P ( owl:InverseFunctionalProperty(?Q) :- And( owl:inverseOf(?P ?Q) owl:FunctionalProperty(?P) ) ),
 Forall ?X ?C ?L ?P ( owl:InverseFunctionalProperty(?P) :- And( owl:oneOf(?C ?L) rdf:first(?L ?X) rdf:rest(?L rdf:nil) rdfs:domain(?P ?C) ) ),
 Forall ?X ?C ?L ?P ( owl:FunctionalProperty(?P) :- And( owl:oneOf(?C ?L) rdf:first(?L ?X) rdf:rest(?L rdf:nil) rdfs:range(?P ?C) ) ),
 Forall ?S ?O ( owl:differentFrom(?O ?S) :- owl:differentFrom(?S ?O) ),
 Forall ?S ?O ( owl:complementOf(?O ?S) :- owl:complementOf(?S ?O) ),
 Forall ?S ?O ( owl:disjointWith(?O ?S) :- owl:disjointWith(?S ?O) ),
 Forall ?X ?N84bb5613996242a89c4df77453620129 ( your:isBrotherOf(?X ?N84bb5613996242a89c4df77453620129) :- my:hasBrother(?N84bb5613996242a89c4df77453620129 ?X) ),
 Forall ?X ?N783541764cea4826815cc34b6d65a0b2 ( my:hasBrother(?N783541764cea4826815cc34b6d65a0b2 ?X) :- your:isBrotherOf(?X ?N783541764cea4826815cc34b6d65a0b2) )]
.../FuXi/Rete/Magic.py:711: UserWarning: predicate symbol of my:hasBrother(?N783541764cea4826815cc34b6d65a0b2 ?X) is in both IDB and EDB. Marking as derived
  "predicate symbol of %s is in both IDB and EDB. Marking as %s" % (term, mark))
    Forall ?X ?N84bb5613996242a89c4df77453620129 ( ns1:isBrotherOf_ff(?X ?N84bb5613996242a89c4df77453620129) :- my:hasBrother(?N84bb5613996242a89c4df77453620129 ?X) )
    Forall ?X ?N84bb5613996242a89c4df77453620129 ( ns1:isBrotherOf_bb(?X ?N84bb5613996242a89c4df77453620129) :- And( ns1:isBrotherOf_magic(?X ?N84bb5613996242a89c4df77453620129) my:hasBrother(?N84bb5613996242a89c4df77453620129 ?X) ) )
    Forall ?X ?N783541764cea4826815cc34b6d65a0b2 ( ns1:hasBrother_ff(?N783541764cea4826815cc34b6d65a0b2 ?X) :- your:isBrotherOf(?X ?N783541764cea4826815cc34b6d65a0b2) )
rate of reduction in the size of the program:  76.9230769231
Magic seed fact  ns1:isBrotherOf_magic(ns2:bob ns2:joe)
Time to calculate closure on working memory:  16.6850090027 milli seconds
<Network: 3 rules, 7 nodes, 5 tokens in working memory, 1 inferred tokens>
<TerminalNode (ns1:isBrotherOf_ff(?X ?N84bb5613996242a89c4df77453620129) :- my:hasBrother(?N84bb5613996242a89c4df77453620129 ?X)) (pass-thru): CommonVariables: [?X, ?N84bb5613996242a89c4df77453620129] (0 in left, 1 in right memories)>
    set([Forall ?X ?N84bb5613996242a89c4df77453620129 ( ns1:isBrotherOf_ff(?X ?N84bb5613996242a89c4df77453620129) :- my:hasBrother(?N84bb5613996242a89c4df77453620129 ?X) )])
        1 instantiations
==============
=== Passed! ===
OWL/unionOf/premises001
OWL/unionOf/conclusions001
<OWL/unionOf/conclusions001.rdf> :- <OWL/unionOf/premises001.rdf>
## Source Graph ##
@prefix first: <http://www.w3.org/2002/03owlt/unionOf/premises001#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

first:A owl:unionOf ( first:Human first:Animal ) .

first:John a first:Human .


OWL/unionOf/premises001 http://www.w3.org/2002/07/owl#unionOf 
A union is a superclass of its parts.

Original program
[Forall ?SC ?A ?C ( rdfs:subClassOf(?A ?SC) :- And( rdfs:subClassOf(?C ?SC) rdfs:subClassOf(?A ?C) ) ),
 Forall ?A ?C ( And( rdfs:subClassOf(?C ?A) rdfs:subClassOf(?A ?C) ) :- owl:equivalentClass(?C ?A) ),
 Forall ?SC ?C ( owl:equivalentClass(?C ?SC) :- And( rdfs:subClassOf(?C ?SC) rdfs:subClassOf(?SC ?C) ) ),
 Forall ?Y ?C ?B ?M ( owl:differentFrom(?M ?Y) :- And( owl:disjointWith(?C ?B) ?C(?M) ?B(?Y) ) ),
 Forall ?Q ?P ( owl:FunctionalProperty(?Q) :- And( owl:inverseOf(?P ?Q) owl:InverseFunctionalProperty(?P) ) ),
 Forall ?Q ?P ( owl:InverseFunctionalProperty(?Q) :- And( owl:inverseOf(?P ?Q) owl:FunctionalProperty(?P) ) ),
 Forall ?X ?C ?L ?P ( owl:InverseFunctionalProperty(?P) :- And( owl:oneOf(?C ?L) rdf:first(?L ?X) rdf:rest(?L rdf:nil) rdfs:domain(?P ?C) ) ),
 Forall ?X ?C ?L ?P ( owl:FunctionalProperty(?P) :- And( owl:oneOf(?C ?L) rdf:first(?L ?X) rdf:rest(?L rdf:nil) rdfs:range(?P ?C) ) ),
 Forall ?S ?O ( owl:differentFrom(?O ?S) :- owl:differentFrom(?S ?O) ),
 Forall ?S ?O ( owl:complementOf(?O ?S) :- owl:complementOf(?S ?O) ),
 Forall ?S ?O ( owl:disjointWith(?O ?S) :- owl:disjointWith(?S ?O) ),
 Forall ?X ( first:A(?X) :- first:Human(?X) ),
 Forall ?X ( first:A(?X) :- first:Animal(?X) )]
    Forall ?X ( ns1:A_b(?X) :- And( ns1:A_magic(?X) first:Animal(?X) ) )
    Forall ?X ( ns1:A_b(?X) :- And( ns1:A_magic(?X) first:Human(?X) ) )
rate of reduction in the size of the program:  84.6153846154
Magic seed fact  ns1:A_magic(ns1:John)
Time to calculate closure on working memory:  8.12292098999 milli seconds
<Network: 2 rules, 6 nodes, 4 tokens in working memory, 1 inferred tokens>
<TerminalNode (ns1:A_b(?X) :- And( ns1:A_magic(?X) first:Human(?X) )) : CommonVariables: [?X] (1 in left, 1 in right memories)>
    set([Forall ?X ( ns1:A_b(?X) :- And( ns1:A_magic(?X) first:Human(?X) ) )])
        1 instantiations
==============
=== Passed! ===
OWL/distinctMembers/premises001
OWL/distinctMembers/conclusions001
<OWL/distinctMembers/conclusions001.rdf> :- <OWL/distinctMembers/premises001.rdf>
## Source Graph ##
@prefix first: <http://www.w3.org/2002/03owlt/distinctMembers/premises001#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

first:Barney a first:Person .

first:Betty a first:Person .

first:Fred a first:Person .

first:Wilma a first:Person .

[] a owl:AllDifferent;
    owl:distinctMembers ( first:Fred first:Wilma first:Barney first:Betty ) .


OWL/distinctMembers/premises001 http://www.w3.org/2002/07/owl#distinctMembers 
using <code xmlns="http://www.w3.org/1999/xhtml">distinctMembers</code> to derive <code xmlns="http://www.w3.org/1999/xhtml">differentFrom</code>
ERROR

======================================================================
ERROR: testOwl (testOWL.OwlTestSuite)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/gjh/.virtualenvs/rdflib/src/fuxi/test/testOWL.py", line 330, in testOwl
    constructNetwork=False))
  File ".../FuXi/Rete/Network.py", line 422, in setupDescriptionLogicProgramming
    additionalRules = set(AdditionalRules(owlN3Graph))
  File ".../FuXi/DLP/ConditionalAxioms.py", line 98, in AdditionalRules
    for rule in HornFromN3(StringIO(src)):
TypeError: string argument expected, got 'str'

----------------------------------------------------------------------
Ran 1 test in 5.732s

FAILED (errors=1)

Running FuXi External Unit Tests (other than testOWL) ====================================
ex:NumDisV2D(?X)
    :- ex:contains(?X ?N0c4ca1d082a54e57ae3af653ae94b8e7)
       ex:MajorStenosis(?N0c4ca1d082a54e57ae3af653ae94b8e7), 
       ex:locatedIn(?N0c4ca1d082a54e57ae3af653ae94b8e7 ex:RCA), 
       ex:Cath(?X), 
       ex:contains(?X ?N680d5b4b8db84a2c996d9583bc2b7a7e), 
       ex:MajorStenosis(?N680d5b4b8db84a2c996d9583bc2b7a7e), 
       ex:locatedIn(?N680d5b4b8db84a2c996d9583bc2b7a7e ex:LAD), 
setting up DLP...
[Forall ?Q ?P ( owl:FunctionalProperty(?Q) :- And( owl:inverseOf(?P ?Q) owl:InverseFunctionalProperty(?P) ) ),
 Forall ?S ?O ( owl:differentFrom(?O ?S) :- owl:differentFrom(?S ?O) ),
 Forall ?Q ?P ( owl:InverseFunctionalProperty(?Q) :- And( owl:inverseOf(?P ?Q) owl:FunctionalProperty(?P) ) ),
 Forall ?Naae0c22b977043d0ba12863e46be9e7a ?X ( exterms:Person(?X) :- exterms:has_brother(?X ?Naae0c22b977043d0ba12863e46be9e7a) ),
 Forall ?Y ?X ( exterms:has_brother(?X ?Y) :- exterms:brother(?X ?Y) ),
 Forall ?SC ?A ?C ( rdfs:subClassOf(?A ?SC) :- And( rdfs:subClassOf(?C ?SC) rdfs:subClassOf(?A ?C) ) ),
 Forall ?X ( exterms:Agent(?X) :- exterms:Person(?X) ),
 Forall ?X ?C ?L ?P ( owl:InverseFunctionalProperty(?P) :- And( owl:oneOf(?C ?L) rdf:first(?L ?X) rdf:rest(?L rdf:nil) rdfs:domain(?P ?C) ) ),
 Forall ?Y ?C ?B ?M ( owl:differentFrom(?M ?Y) :- And( owl:disjointWith(?C ?B) ?C(?M) ?B(?Y) ) ),
 Forall ?Y ?X ( exterms:brother(?X ?Y) :- exterms:has_brother(?X ?Y) ),
 Forall ?X ?Na0218af1d6104432b76df05af918cf25 ( exterms:Person(?Na0218af1d6104432b76df05af918cf25) :- exterms:brother(?X ?Na0218af1d6104432b76df05af918cf25) ),
 Forall ?N2d31fc7d1add45ab9fefea6d30097c04 ?X ( exterms:Person(?N2d31fc7d1add45ab9fefea6d30097c04) :- exterms:has_brother(?X ?N2d31fc7d1add45ab9fefea6d30097c04) ),
 Forall ?Y ?X ( exterms:has_sibling(?X ?Y) :- exterms:has_brother(?X ?Y) ),
 Forall ?X ?C ?L ?P ( owl:FunctionalProperty(?P) :- And( owl:oneOf(?C ?L) rdf:first(?L ?X) rdf:rest(?L rdf:nil) rdfs:range(?P ?C) ) ),
 Forall ?S ?O ( owl:disjointWith(?O ?S) :- owl:disjointWith(?S ?O) ),
 Forall ?SC ?C ( owl:equivalentClass(?C ?SC) :- And( rdfs:subClassOf(?C ?SC) rdfs:subClassOf(?SC ?C) ) ),
 Forall ?A ?C ( And( rdfs:subClassOf(?C ?A) rdfs:subClassOf(?A ?C) ) :- owl:equivalentClass(?C ?A) ),
 Forall ?X ?N9c2c7bc8c03d48e6aaac2011abd185f3 ( exterms:Person(?X) :- exterms:brother(?X ?N9c2c7bc8c03d48e6aaac2011abd185f3) ),
 Forall ?S ?O ( owl:complementOf(?O ?S) :- owl:complementOf(?S ?O) )]
<Network: 18 rules, 53 nodes, 0 tokens in working memory, 0 inferred tokens>
feeding TBox... 
feeding ABox...
@prefix ex: <http://example.org/> .
@prefix exterms: <http://example.org/terms/> .

ex:jack a exterms:Agent,
        exterms:Person;
    exterms:has_brother ex:john;
    exterms:has_sibling ex:john .

ex:john a exterms:Agent,
        exterms:Person;
    exterms:brother ex:jack;
    exterms:has_sibling ex:jack .


Checking...
Time to calculate closure on working memory: 81.680059433 m seconds
@prefix : <file:///home/gjh/.virtualenvs/rdflib/src/fuxi/test/#> .
@prefix m: <http://example.com/#> .

:det1 m:inference [ a m:Inference;
            m:inference_name "Inference1" ] .

:det2 m:inference [ a m:Inference;
            m:inference_name "Inference2" ] .


@prefix ns1: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

<http://example.com/#chimezie> ns1:mbox_sha1sum "8f90d9335f967f58b40d5b6a49f8d9afca64b5ae",
        rdf:Literal .


FAIL:  testBasePredicateEquivalence (additionalDLPTests.AdditionalDescriptionLogicTests) (unit test)
Traceback (most recent call last):
  File "/home/gjh/.virtualenvs/rdflib/src/fuxi/test/additionalDLPTests.py", line 60, in testBasePredicateEquivalence
    "[Forall ?X ( ex:Bar(?X) :- ex:Foo(?X) ), Forall ?X ( ex:Foo(?X) :- ex:Bar(?X) )]")
AssertionError: 'set([Forall ?X ( ex:Bar(?X) :- ex:Foo(?X) ), Forall ?X ( ex:Foo(?X) :- ex:Bar(?X) )])' != '[Forall ?X ( ex:Bar(?X) :- ex:Foo(?X) ), Forall ?X ( ex:Foo(?X) :- ex:Bar(?X) )]'

FAIL:  testGCIConDisjunction (additionalDLPTests.AdditionalDescriptionLogicTests) (unit test)
Traceback (most recent call last):
  File "/home/gjh/.virtualenvs/rdflib/src/fuxi/test/additionalDLPTests.py", line 34, in testGCIConDisjunction
    "[Forall ?X ( ex:Bar(?X) :- And( ex:Foo(?X) ex:Alpha(?X) ) ), Forall ?X ( ex:Bar(?X) :- And( ex:Foo(?X) ex:Omega(?X) ) )]")
AssertionError: 'set([Forall ?X ( ex:Bar(?X) :- And( ex:Foo(?X) ex:Alpha(?X) ) ), Forall ?X ( ex:Bar(?X) :- And( ex:Foo(?X) ex:Omega(?X) ) )])' != '[Forall ?X ( ex:Bar(?X) :- And( ex:Foo(?X) ex:Alpha(?X) ) ), Forall ?X ( ex:Bar(?X) :- And( ex:Foo(?X) ex:Omega(?X) ) )]'

FAIL:  testOtherForm2 (additionalDLPTests.AdditionalDescriptionLogicTests) (unit test)
Traceback (most recent call last):
  File "/home/gjh/.virtualenvs/rdflib/src/fuxi/test/additionalDLPTests.py", line 158, in testOtherForm2
    "Some Class SubClassOf: Class: ex:ITALeft  . EquivalentTo: ( ( ex:hasCoronaryBypassConduit VALUE ex:CoronaryBypassConduit_internal_thoracic_artery_left_insitu ) OR ( ex:hasCoronaryBypassConduit VALUE ex:CoronaryBypassConduit_internal_thoracic_artery_left_free ) )")
AssertionError: 'Some Class SubClassOf: Class: ex:ITALeft  . EquivalentTo: ( ( ex:hasCoronaryBypassConduit VALUE <http://example.com/CoronaryBypassConduit_internal_thoracic_artery_left_insitu> ) OR ( ex:hasCoronaryBypassConduit VALUE <http://example.com/CoronaryBypassConduit_internal_thoracic_artery_left_free> ) )' != 'Some Class SubClassOf: Class: ex:ITALeft  . EquivalentTo: ( ( ex:hasCoronaryBypassConduit VALUE ex:CoronaryBypassConduit_internal_thoracic_artery_left_insitu ) OR ( ex:hasCoronaryBypassConduit VALUE ex:CoronaryBypassConduit_internal_thoracic_artery_left_free ) )'

FAIL:  testValueRestrictionInLeftOfGCI (additionalDLPTests.AdditionalDescriptionLogicTests) (unit test)
Traceback (most recent call last):
  File "/home/gjh/.virtualenvs/rdflib/src/fuxi/test/additionalDLPTests.py", line 90, in testValueRestrictionInLeftOfGCI
    "ex:Bar THAT ( ex:someProp VALUE ex:fish )")
AssertionError: 'ex:Bar THAT ( ex:someProp VALUE <http://example.com/fish> )' != 'ex:Bar THAT ( ex:someProp VALUE ex:fish )'

ERROR:  testUnionSkolemization (testSkolemization.UnionSkolemizedTest) (unit test)
Traceback (most recent call last):
  File "/home/gjh/.virtualenvs/rdflib/src/fuxi/test/testSkolemization.py", line 33, in testUnionSkolemization
    self.failIf(p.formula.body.arg[-1].find(SKOLEMIZED_CLASS_NS) >- 1,
AttributeError: 'And' object has no attribute 'arg'

testConsistentBinding (FuXi.Rete.BetaNode.PartialInstantiationTests) ... No handlers could be found for logger "rdflib.term"
ok

----------------------------------------------------------------------
Ran 1 test in 0.069s

OK
**********************************************************************
File ".../FuXi/Rete/RuleStore.py", line 286, in FuXi.Rete.RuleStore.N3RuleStore
Failed example:
    g = g.parse(data=src, format='n3')
Exception raised:
    Traceback (most recent call last):
      File "/home/gjh/Applications/pypy-1.9/lib-python/2.7/doctest.py", line 1254, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Rete.RuleStore.N3RuleStore[3]>", line 1, in <module>
        g = g.parse(data=src, format='n3')
      File ".../rdflib/graph.py", line 913, in parse
        parser.parse(source, self, **args)
      File ".../rdflib/plugins/parsers/notation3.py", line 2393, in parse
        TurtleParser.parse(self,source,conj_graph,encoding)
      File ".../rdflib/plugins/parsers/notation3.py", line 2373, in parse
        p.loadStream(source.getByteStream())
      File ".../rdflib/plugins/parsers/notation3.py", line 937, in loadStream
        return self.loadBuf(stream.read())    # Not ideal
      File ".../rdflib/plugins/parsers/notation3.py", line 943, in loadBuf
        self.feed(buf)
      File ".../rdflib/plugins/parsers/notation3.py", line 969, in feed
        i = self.directiveOrStatement(s, j)
      File ".../rdflib/plugins/parsers/notation3.py", line 985, in directiveOrStatement
        j = self.statement(argstr, i)
      File ".../rdflib/plugins/parsers/notation3.py", line 1134, in statement
        i = self.object(argstr, i, r)   # Allow literal for subject - extends RDF
      File ".../rdflib/plugins/parsers/notation3.py", line 1762, in object
        j = self.subject(argstr, i, res)
      File ".../rdflib/plugins/parsers/notation3.py", line 1146, in subject
        return self.item(argstr, i, res)
      File ".../rdflib/plugins/parsers/notation3.py", line 1228, in item
        return self.path(argstr, i, res)
      File ".../rdflib/plugins/parsers/notation3.py", line 1240, in path
        j = self.nodeOrLiteral(argstr, i, res)
      File ".../rdflib/plugins/parsers/notation3.py", line 1788, in nodeOrLiteral
        j = self.node(argstr, i, res)
      File ".../rdflib/plugins/parsers/notation3.py", line 1389, in node
        j = self.directiveOrStatement(argstr, i)
      File ".../rdflib/plugins/parsers/notation3.py", line 985, in directiveOrStatement
        j = self.statement(argstr, i)
      File ".../rdflib/plugins/parsers/notation3.py", line 1138, in statement
        j = self.property_list(argstr, i, r[0])
      File ".../rdflib/plugins/parsers/notation3.py", line 1488, in property_list
        self.makeStatement((self._context, sym, subj, obj))
      File ".../rdflib/plugins/parsers/notation3.py", line 1129, in makeStatement
        self._store.makeStatement(quadruple, why=self._reason2)
      File ".../rdflib/plugins/parsers/notation3.py", line 2165, in makeStatement
        f.quotedgraph.add((s, p, o))
      File ".../rdflib/graph.py", line 1165, in add
        self.store.add(triple, self, quoted=True)
      File ".../FuXi/Rete/RuleStore.py", line 387, in add
        newFilter = N3Builtin(predicate, self.filters[predicate](subject, obj), subject, obj)
      File ".../FuXi/Rete/BuiltinPredicates.py", line 93, in MathEqualTo
        "with Numeric Literals (%s)" % term
    AssertionError: math:equalTo can only be used with Numeric Literals (3)
**********************************************************************
File ".../FuXi/Rete/RuleStore.py", line 290, in FuXi.Rete.RuleStore.N3RuleStore
Failed example:
    len(s.rules)
Expected:
    1
Got:
    0
**********************************************************************
File ".../FuXi/Rete/RuleStore.py", line 292, in FuXi.Rete.RuleStore.N3RuleStore
Failed example:
    print(len(s.rules[0][RULE_LHS]))
Exception raised:
    Traceback (most recent call last):
      File "/home/gjh/Applications/pypy-1.9/lib-python/2.7/doctest.py", line 1254, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Rete.RuleStore.N3RuleStore[7]>", line 1, in <module>
        print(len(s.rules[0][RULE_LHS]))
    IndexError: list index out of range
**********************************************************************
File ".../FuXi/Rete/RuleStore.py", line 294, in FuXi.Rete.RuleStore.N3RuleStore
Failed example:
    print(len(s.rules[0][RULE_RHS]))
Exception raised:
    Traceback (most recent call last):
      File "/home/gjh/Applications/pypy-1.9/lib-python/2.7/doctest.py", line 1254, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Rete.RuleStore.N3RuleStore[8]>", line 1, in <module>
        print(len(s.rules[0][RULE_RHS]))
    IndexError: list index out of range
**********************************************************************
File ".../FuXi/Rete/RuleStore.py", line 296, in FuXi.Rete.RuleStore.N3RuleStore
Failed example:
    print(s.rules[0][RULE_LHS][1])
Exception raised:
    Traceback (most recent call last):
      File "/home/gjh/Applications/pypy-1.9/lib-python/2.7/doctest.py", line 1254, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Rete.RuleStore.N3RuleStore[9]>", line 1, in <module>
        print(s.rules[0][RULE_LHS][1])
    IndexError: list index out of range
**********************************************************************
File ".../FuXi/Rete/RuleStore.py", line 298, in FuXi.Rete.RuleStore.N3RuleStore
Failed example:
    print(s.rules[0][RULE_LHS][-1])
Exception raised:
    Traceback (most recent call last):
      File "/home/gjh/Applications/pypy-1.9/lib-python/2.7/doctest.py", line 1254, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Rete.RuleStore.N3RuleStore[10]>", line 1, in <module>
        print(s.rules[0][RULE_LHS][-1])
    IndexError: list index out of range
**********************************************************************
File ".../FuXi/Rete/RuleStore.py", line 344, in FuXi.Rete.RuleStore.N3RuleStore
Failed example:
    g = g.parse(data=src, format='n3')
Exception raised:
    Traceback (most recent call last):
      File "/home/gjh/Applications/pypy-1.9/lib-python/2.7/doctest.py", line 1254, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Rete.RuleStore.N3RuleStore[27]>", line 1, in <module>
        g = g.parse(data=src, format='n3')
      File ".../rdflib/graph.py", line 913, in parse
        parser.parse(source, self, **args)
      File ".../rdflib/plugins/parsers/notation3.py", line 2393, in parse
        TurtleParser.parse(self,source,conj_graph,encoding)
      File ".../rdflib/plugins/parsers/notation3.py", line 2373, in parse
        p.loadStream(source.getByteStream())
      File ".../rdflib/plugins/parsers/notation3.py", line 937, in loadStream
        return self.loadBuf(stream.read())    # Not ideal
      File ".../rdflib/plugins/parsers/notation3.py", line 943, in loadBuf
        self.feed(buf)
      File ".../rdflib/plugins/parsers/notation3.py", line 969, in feed
        i = self.directiveOrStatement(s, j)
      File ".../rdflib/plugins/parsers/notation3.py", line 985, in directiveOrStatement
        j = self.statement(argstr, i)
      File ".../rdflib/plugins/parsers/notation3.py", line 1138, in statement
        j = self.property_list(argstr, i, r[0])
      File ".../rdflib/plugins/parsers/notation3.py", line 1481, in property_list
        i = self.objectList(argstr, j, objs)
      File ".../rdflib/plugins/parsers/notation3.py", line 1532, in objectList
        i = self.object(argstr, i, res)
      File ".../rdflib/plugins/parsers/notation3.py", line 1762, in object
        j = self.subject(argstr, i, res)
      File ".../rdflib/plugins/parsers/notation3.py", line 1146, in subject
        return self.item(argstr, i, res)
      File ".../rdflib/plugins/parsers/notation3.py", line 1228, in item
        return self.path(argstr, i, res)
      File ".../rdflib/plugins/parsers/notation3.py", line 1240, in path
        j = self.nodeOrLiteral(argstr, i, res)
      File ".../rdflib/plugins/parsers/notation3.py", line 1788, in nodeOrLiteral
        j = self.node(argstr, i, res)
      File ".../rdflib/plugins/parsers/notation3.py", line 1389, in node
        j = self.directiveOrStatement(argstr, i)
      File ".../rdflib/plugins/parsers/notation3.py", line 985, in directiveOrStatement
        j = self.statement(argstr, i)
      File ".../rdflib/plugins/parsers/notation3.py", line 1138, in statement
        j = self.property_list(argstr, i, r[0])
      File ".../rdflib/plugins/parsers/notation3.py", line 1488, in property_list
        self.makeStatement((self._context, sym, subj, obj))
      File ".../rdflib/plugins/parsers/notation3.py", line 1129, in makeStatement
        self._store.makeStatement(quadruple, why=self._reason2)
      File ".../rdflib/plugins/parsers/notation3.py", line 2165, in makeStatement
        f.quotedgraph.add((s, p, o))
      File ".../rdflib/graph.py", line 1165, in add
        self.store.add(triple, self, quoted=True)
      File ".../FuXi/Rete/RuleStore.py", line 387, in add
        newFilter = N3Builtin(predicate, self.filters[predicate](subject, obj), subject, obj)
      File ".../FuXi/Rete/BuiltinPredicates.py", line 133, in MathLessThan
        "Numeric Literals. (%s)" % term
    AssertionError: math:lessThan can only be used with Numeric Literals. (3)
**********************************************************************
File ".../FuXi/Rete/RuleStore.py", line 345, in FuXi.Rete.RuleStore.N3RuleStore
Failed example:
    try:
      s._finalize()
    except Exception as e:
      print(e)
Expected:
    Rule RHS must only include RDF triples (<http://www.w3.org/2000/10/swap/math#lessThan>(3, 2))
Got nothing
**********************************************************************
1 items had failures:
   8 of  39 in FuXi.Rete.RuleStore.N3RuleStore
***Test Failed*** 8 failures.

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
ERROR--exception running unittest Magic.py
Traceback (most recent call last):
  File "test/suite.py", line 182, in runEmbeddedTests
  File ".../FuXi/Rete/Magic.py", line 889, in test
    unittest.main()
  File "/home/gjh/Applications/pypy-1.9/lib-python/2.7/unittest/main.py", line 95, in __init__
    self.runTests()
  File "/home/gjh/Applications/pypy-1.9/lib-python/2.7/unittest/main.py", line 231, in runTests
    sys.exit(not self.result.wasSuccessful())
SystemExit: False
**********************************************************************
File ".../FuXi/Horn/HornRules.py", line 213, in FuXi.Horn.HornRules.Rule.isSafe
Failed example:
    r1.isSafe()
Exception raised:
    Traceback (most recent call last):
      File "/home/gjh/Applications/pypy-1.9/lib-python/2.7/doctest.py", line 1254, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Horn.HornRules.Rule.isSafe[4]>", line 1, in <module>
        r1.isSafe()
      File ".../FuXi/Horn/HornRules.py", line 229, in isSafe
        GetArgs(self.formula.head)):
      File ".../FuXi/Rete/SidewaysInformationPassing.py", line 212, in GetArgs
        raise Exception("Unprocessable term: %s" % term)
    Exception: Unprocessable term: ?SC(?M)
**********************************************************************
File ".../FuXi/Horn/HornRules.py", line 215, in FuXi.Horn.HornRules.Rule.isSafe
Failed example:
    r2.isSafe()
Exception raised:
    Traceback (most recent call last):
      File "/home/gjh/Applications/pypy-1.9/lib-python/2.7/doctest.py", line 1254, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Horn.HornRules.Rule.isSafe[5]>", line 1, in <module>
        r2.isSafe()
      File ".../FuXi/Horn/HornRules.py", line 229, in isSafe
        GetArgs(self.formula.head)):
      File ".../FuXi/Rete/SidewaysInformationPassing.py", line 212, in GetArgs
        raise Exception("Unprocessable term: %s" % term)
    Exception: Unprocessable term: ?SC(?M)
**********************************************************************
File ".../FuXi/Horn/HornRules.py", line 221, in FuXi.Horn.HornRules.Rule.isSafe
Failed example:
    r1.isSafe()
Exception raised:
    Traceback (most recent call last):
      File "/home/gjh/Applications/pypy-1.9/lib-python/2.7/doctest.py", line 1254, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.Horn.HornRules.Rule.isSafe[9]>", line 1, in <module>
        r1.isSafe()
      File ".../FuXi/Horn/HornRules.py", line 229, in isSafe
        GetArgs(self.formula.head)):
      File ".../FuXi/Rete/SidewaysInformationPassing.py", line 212, in GetArgs
        raise Exception("Unprocessable term: %s" % term)
    Exception: Unprocessable term: Exists _:Nf6058101ee4345bf8c2ab67f9c723e8c ( rdfs:subClassOf(Nf6058101ee4345bf8c2ab67f9c723e8c ?C) )
**********************************************************************
1 items had failures:
   3 of  10 in FuXi.Horn.HornRules.Rule.isSafe
***Test Failed*** 3 failures.
**********************************************************************
File ".../FuXi/DLP/LPNormalForms.py", line 66, in FuXi.DLP.LPNormalForms.ApplyDemorgans
Failed example:
    clause
Expected:
    ex:somePredicate4(?X) :- And( ex:somePredicate(?X ?Y) And( not ex:somePredicate2(?X ex:individual1) not ex:somePredicate3(?Y) ) )
Got:
    ex:somePredicate4(?X) :- And( ex:somePredicate(?X ?Y) not Or( ex:somePredicate2(?X ex:individual1) ex:somePredicate3(?Y) ) )
**********************************************************************
File ".../FuXi/DLP/LPNormalForms.py", line 69, in FuXi.DLP.LPNormalForms.ApplyDemorgans
Failed example:
    clause
Expected:
    ex:somePredicate4(?X) :- And( ex:somePredicate(?X ?Y) not ex:somePredicate2(?X ex:individual1) not ex:somePredicate3(?Y) )
Got:
    ex:somePredicate4(?X) :- And( ex:somePredicate(?X ?Y) not Or( ex:somePredicate2(?X ex:individual1) ex:somePredicate3(?Y) ) )
**********************************************************************
1 items had failures:
   2 of  13 in FuXi.DLP.LPNormalForms.ApplyDemorgans
***Test Failed*** 2 failures.
**********************************************************************
File ".../FuXi/DLP/CompletionReasoning.py", line 279, in FuXi.DLP.CompletionReasoning.StructuralTransformation
Failed example:
    newGraph, conceptMap = StructuralTransformation(graph, Graph())
Exception raised:
    Traceback (most recent call last):
      File "/home/gjh/Applications/pypy-1.9/lib-python/2.7/doctest.py", line 1254, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.DLP.CompletionReasoning.StructuralTransformation[18]>", line 1, in <module>
        newGraph, conceptMap = StructuralTransformation(graph, Graph())
      File ".../FuXi/DLP/CompletionReasoning.py", line 299, in StructuralTransformation
        ProcessConcept(cls, owlGraph, FreshConcept, newOwlGraph)
      File ".../FuXi/DLP/CompletionReasoning.py", line 322, in ProcessConcept
        location = WhichSubsumptionOperand(iD, owlGraph)
      File ".../FuXi/DLP/CompletionReasoning.py", line 236, in WhichSubsumptionOperand
        idb=HornFromN3(StringIO(SUBSUMPTION_SEMANTICS)),
    TypeError: string argument expected, got 'str'
**********************************************************************
File ".../FuXi/DLP/CompletionReasoning.py", line 280, in FuXi.DLP.CompletionReasoning.StructuralTransformation
Failed example:
    revDict = dict([(v, k) for k, v in conceptMap.items()])
Exception raised:
    Traceback (most recent call last):
      File "/home/gjh/Applications/pypy-1.9/lib-python/2.7/doctest.py", line 1254, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.DLP.CompletionReasoning.StructuralTransformation[19]>", line 1, in <module>
        revDict = dict([(v, k) for k, v in conceptMap.items()])
    NameError: global name 'conceptMap' is not defined
**********************************************************************
File ".../FuXi/DLP/CompletionReasoning.py", line 281, in FuXi.DLP.CompletionReasoning.StructuralTransformation
Failed example:
    newGraph.bind('ex', EX, True)
Exception raised:
    Traceback (most recent call last):
      File "/home/gjh/Applications/pypy-1.9/lib-python/2.7/doctest.py", line 1254, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.DLP.CompletionReasoning.StructuralTransformation[20]>", line 1, in <module>
        newGraph.bind('ex', EX, True)
    NameError: global name 'newGraph' is not defined
**********************************************************************
File ".../FuXi/DLP/CompletionReasoning.py", line 282, in FuXi.DLP.CompletionReasoning.StructuralTransformation
Failed example:
    Individual.factoryGraph = newGraph
Exception raised:
    Traceback (most recent call last):
      File "/home/gjh/Applications/pypy-1.9/lib-python/2.7/doctest.py", line 1254, in __run
        compileflags, 1) in test.globs
      File "<doctest FuXi.DLP.CompletionReasoning.StructuralTransformation[21]>", line 1, in <module>
        Individual.factoryGraph = newGraph
    NameError: global name 'newGraph' is not defined
**********************************************************************
1 items had failures:
   4 of  22 in FuXi.DLP.CompletionReasoning.StructuralTransformation
***Test Failed*** 4 failures.
Summary of FuXi External Unit Tests (other than testOWL)  ====================================
* Ran 14 tests with 4 failures and 1 errors.
* Failed tests were:
<additionalDLPTests.AdditionalDescriptionLogicTests testMethod=testBasePredicateEquivalence>
<additionalDLPTests.AdditionalDescriptionLogicTests testMethod=testGCIConDisjunction>
<additionalDLPTests.AdditionalDescriptionLogicTests testMethod=testOtherForm2>
<additionalDLPTests.AdditionalDescriptionLogicTests testMethod=testValueRestrictionInLeftOfGCI>
* Tests in error were:
<testSkolemization.UnionSkolemizedTest testMethod=testUnionSkolemization>
Summary of Embedded FuXi Tests  ====================================
* 4 mods with doctest failures:
['RuleStore.py', 'HornRules.py', 'LPNormalForms.py', 'CompletionReasoning.py']
* 0 mods with doctest errors: 
[]
* Total doctests run 476: 
* Total attempted test functions: 13
* 1 mods with test function failures: 
[<module 'FuXi.Rete.Magic' from '.../FuXi/Rete/Magic.pyc'>]

Note summary statistics are not available for the testOWL runs.

@sheon
Copy link

sheon commented Jul 2, 2015

I have recently started to use FuXi and I had problems installing it following the instruction in FuXi website. Finally I installed it using the FuXi_master in GitHub. Now I want to run the test code but the testOWL.py returns no module named Collection. could anyone help me to either fix it or find a clean version of the FuXi. I am really in urgent need of a python based reasoner for my work.

@ghost
Copy link

ghost commented Jul 23, 2015

Yes, Collection is required, e.g.
https://github.com/RDFLib/FuXi/blob/master/lib/Rete/Magic.py#L70.

But it is provided by RDFLib:

from rdflib.collection import Collection

https://rdflib.readthedocs.org/en/latest/apidocs/rdflib.html#module-rdflib.collection

Try with the latest version of RDFLib.

@ghost
Copy link

ghost commented Jul 23, 2015

Tests are all passing for Python 2.6, 2.7, 3.3, 3.4 & PyPy

@ghost ghost closed this as completed Jul 23, 2015
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants