oldray / fuxi Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/fuxi
Automatically exported from code.google.com/p/fuxi
Currently, the use of owl:complementOf in an OWL theory and a conversion to a
ruleset via the DLP
method is the only way to introduce negated antecedent into a ruleset. Support
for RIF BLD XML
syntax should address this eventually
Original issue reported on code.google.com by [email protected]
on 24 Sep 2009 at 2:52
What steps will reproduce the problem?
1. testOwl --strategy gms
What is the expected output? What do you see instead?
======================================================================
ERROR: testOwl (__main__.OwlTestSuite)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/Shared/workspaces/workspace/fuxi/test/testOWL.py", line 361, in testOwl
conclusionFile)
File "/Users/Shared/workspaces/workspace/fuxi/test/testOWL.py", line 248, in MagicOWLProof
timing=self.calculateEntailments(factGraph)
File "/Users/Shared/workspaces/workspace/fuxi/test/testOWL.py", line 152, in calculateEntailments
self.network.feedFactsToAdd(generateTokenSet(factGraph))
File "/Users/Shared/workspaces/workspace/fuxi/build/lib/FuXi/Rete/Network.py", line 604, in feedFactsToAdd
self.addWME(token)
File "/Users/Shared/workspaces/workspace/fuxi/build/lib/FuXi/Rete/Network.py", line 594, in addWME
alphaNode.activate(wme.unboundCopy())
File "/Users/Shared/workspaces/workspace/fuxi/build/lib/FuXi/Rete/AlphaNode.py", line 322, in activate
memory.successor.propagate(memory.position,aReteToken.debug,wme=aReteToken)
File "/Users/Shared/workspaces/workspace/fuxi/build/lib/FuXi/Rete/BetaNode.py", line 660, in propagate
self._activate(PartialInstanciation([wme],consistentBindings=wme.bindingDict.copy()),debug)
File "/Users/Shared/workspaces/workspace/fuxi/build/lib/FuXi/Rete/BetaNode.py", line 607, in _activate
self.network.fireConsequent(partInstOrList,self,debug)
File "/Users/Shared/workspaces/workspace/fuxi/build/lib/FuXi/Rete/Network.py", line 553, in fireConsequent
self.addWME(inferredToken)
File "/Users/Shared/workspaces/workspace/fuxi/build/lib/FuXi/Rete/Network.py", line 594, in addWME
alphaNode.activate(wme.unboundCopy())
File "/Users/Shared/workspaces/workspace/fuxi/build/lib/FuXi/Rete/AlphaNode.py", line 322, in activate
memory.successor.propagate(memory.position,aReteToken.debug,wme=aReteToken)
File "/Users/Shared/workspaces/workspace/fuxi/build/lib/FuXi/Rete/BetaNode.py", line 652, in propagate
print self.clauseRepresentation()
File "/Users/Shared/workspaces/workspace/fuxi/build/lib/FuXi/Rete/BetaNode.py", line 557, in clauseRepresentation
return repr(first(self.rules).formula)
AttributeError: 'NoneType' object has no attribute 'formula'
----------------------------------------------------------------------
Ran 1 test in 0.798s
FAILED (errors=1)
Original issue reported on code.google.com by [email protected]
on 21 Dec 2010 at 7:47
Currently, most of the inference heuristics do not support second order
predicates (predicates symbols that are variables in RIF frames / positional
terms: ?C(:Foo :Bar ) ). These, however in theory can be supported via
specialization. Consider the following from the third owl:oneOf OWL
[http://www.w3.org/TR/owl-test/byFunction#function-oneOf test case]:
Source graph:
{{{
@prefix first: <http://www.w3.org/2002/03owlt/oneOf/premises003#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
first:T2 owl:oneOf ( first:large first:medium first:small ).
first:myT a first:T1.
first:T1 owl:oneOf ( first:small first:medium first:large ).
}}}
The following rule should apply to the query for first:T2(first:MyT):
{{{
Forall ?X ?C ?L ( ?C(?X) :- And( owl:oneOf(?C ?L) list:in(?X ?L) ) )
}}}
In particular, for every statement in the OWL/RDF graph where the predicate is
owl:oneOf, a specific rule can be generated for the subject (first:T2 in this
case):
{{{
Forall ?X ?C ?L ( first:T2(?X) :- And( owl:oneOf(first:T2 ?L) list:in(?X ?L) )
)
}}}
Original issue reported on code.google.com by [email protected]
on 28 Aug 2010 at 1:48
Traceback (most recent call last):
File ".../layercake-python/rdflib/sparql/Algebra.py", line 1273, in testSimpleGraphPattern
from rdflib.sparql.bison.Processor import Parse
ImportError: cannot import name Parse
Original issue reported on code.google.com by [email protected]
on 7 Nov 2010 at 8:02
vasiliy@midgard:~/devel/ld/fuxi/fuxi/test$ PYTHONPATH=../ python
additionalDLPTests.py
Traceback (most recent call last):
File "additionalDLPTests.py", line 6, in <module>
from FuXi.Rete.RuleStore import N3RuleStore,SetupRuleStore
File "/usr/lib/python2.5/site-packages/PIL/__init__.py", line 1, in <module>
#
File "FuXi/Rete/Network.py", line 27, in <module>
File "/home/vasiliy/devel/ld/fuxi/fuxi/FuXi/DLP/ConditionalAxioms.py", line 67
SyntaxError: Non-ASCII character '\xc2' in file
/home/vasiliy/devel/ld/fuxi/fuxi/FuXi/DLP/ConditionalAxioms.py on line 67, but
no encoding declared; see http://www.python.org/peps/pep-0263.html for details
Attached is a patch that fixes this for me.
Original issue reported on code.google.com by vfaronov
on 24 Jul 2010 at 6:58
Attachments:
Adding support to FuXi for RIF XML syntax
Original issue reported on code.google.com by [email protected]
on 24 Sep 2009 at 1:21
What steps will reproduce the problem?
1. Fix for empty dictionary co ntains garbage characters so for example
testExistentialInHead.py won't ru: Lexical error at line 67, column 55.
Encountered: "\u00ac" (172), after : "" ConditionalAxioms.py /fuxi/lib/DLP line
66
Original issue reported on code.google.com by [email protected]
on 26 Jul 2010 at 9:40
Currently the answers from queries dispatched by the backward chainer are not
being iterated over
lazily.
Original issue reported on code.google.com by [email protected]
on 24 Sep 2009 at 1:23
The current BFP reasoner does not combine atomic inclusion axioms that share
the same head as the SLD reasoner does. As a result, for the same test case
below, whereas the SLD reasoner dispatches 1 query, the BFP reasoner dispatches
2:
$ python testOWL.py --strategy=sld --debug --singleTest=OWL/unionOf/premises001
..snip..
## Full SPARQL Algebra expression ##
BGP((?SUBJECT,rdf:type,first:A))
###################################
Solving ns1:A(?SUBJECT) {}
Combining atomic inclusion axioms:
[Forall ?X ( ns1:A_f(?X) :- first:Human(?X) ),
Forall ?X ( ns1:A_f(?X) :- first:Animal(?X) )]
SELECT ?SUBJECT {
?SUBJECT a ?KIND
FILTER(
?KIND = first:Human ||
?KIND = first:Animal)
}
{'OWL/unionOf/Manifest001.rdf': '59.7569942474 milli seconds'}
$ python testOWL.py --strategy=bfp --debug --singleTest=OWL/unionOf/premises001
..snip..
<Network: 5 rules, 6 nodes, 6 tokens in working memory, 1 inferred tokens>
<TerminalNode with 1 actions (ns1:A_f(?X) :- And( ns1:OpenQuery(ns2:A)
bfp:evaluate(rule:1 1) )) : CommonVariables: [] (1 in left, 1 in right
memories)>
ns1:A_f(?X) :- And( ns1:OpenQuery(ns2:A) bfp:evaluate(rule:1 1) )
1 instanciations
@prefix ns1: <http://www.w3.org/2002/03owlt/unionOf/premises001#>.
ns1:John a ns1:A.
SELECT ?X { ?X a ns1Animal }
SELECT ?X { ?X a ns1:Human }
{'OWL/unionOf/Manifest001.rdf': '327.481985092 milli seconds'}
Original issue reported on code.google.com by [email protected]
on 20 Dec 2010 at 9:38
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Fu
Xi-1.0.dev-py2.6.egg/FuXi/Rete/AlphaNode.py:6: DeprecationWarning: the sets
module is deprecated
from sets import Set
Time to build production rule (RDFLib): 9.89437103271e-05 seconds
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Fu
Xi-1.0.dev-py2.6.egg/FuXi/Rete/SidewaysInformationPassing.py:7:
DeprecationWarning: the md5 module is deprecated; use hashlib instead
import unittest, os, sys, itertools, md5
E
======================================================================
ERROR: testUnionSkolemization (__main__.UnionSkolemizedTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "testSkolemization.py", line 31, in testUnionSkolemization
p=network.setupDescriptionLogicProgramming(self.tBoxGraph)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/FuXi-1.0.dev-py2.6.egg/FuXi/Rete/Network.py", line 352, in setupDescriptionLogicProgramming
for rule in AdditionalRules(owlN3Graph):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/FuXi-1.0.dev-py2.6.egg/FuXi/DLP/ConditionalAxioms.py", line 66, in AdditionalRules
if tBox.query(FUNCTIONAL_PROPERTIES).askAnswer[0]:
File "build/bdist.macosx-10.3-fat/egg/rdflib/Graph.py", line 738, in query
extensionFunctions))
File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/bison/Processor.py", line 50, in query
extensionFunctions=extensionFunctions)
File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/Algebra.py", line 312, in TopEvaluate
None)
File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/Algebra.py", line 165, in ReduceToAlgebra
prolog))
File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/bison/SPARQLEvaluate.py", line 273, in createSPARQLPConstraint
for expr in reducedFilter]))
File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/bison/SPARQLEvaluate.py", line 186, in mapToOperator
mapToOperator(expr.right,prolog,combinationArg,constraint=constraint),
File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/bison/SPARQLEvaluate.py", line 218, in mapToOperator
return "'%s'"%convertTerm(expr,prolog)
File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/bison/SPARQLEvaluate.py", line 71, in convertTerm
return URIRef(queryProlog.prefixBindings[term.prefix] + term.localname)
KeyError: u'owl'
----------------------------------------------------------------------
Ran 1 test in 0.170s
Please use labels and text to provide additional information.
Original issue reported on code.google.com by [email protected]
on 1 Jul 2010 at 12:22
Purpose of code changes on this branch:
When reviewing my code changes, please focus on:
is it well written, do examples work etc.
After the review, I'll merge this branch into:
/trunk
Original issue reported on code.google.com by [email protected]
on 17 May 2010 at 5:48
it would be nice (and straightforward) to be able to do:
$ FuXi --input-format=n3 --output=rif --rules=transitive-test.n3 Time to build
production rule Forall ?Y ?X ?Z ( ex:hasAncestor(?X ?Z) :- And(
ex:hasAncestor(?X ?Y) ex:hasAncestor(?X ?Z) ) )
$ FuXi --input-format=n3 --output=spin --rules=transitive-test.n3 Time to build
production
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix ex: <http://example.com/terms#> .
@prefix sp: <http://spinrdf.org/sp>
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
[ a sp:Construct ;
sp:templates ([ sp:object sp:_Z ;
sp:predicate ex:hasAncestor ;
sp:subject spin:_X
]) ;
sp:where ([ sp:object spin:_Y ;
sp:predicate ex:hasAncestor ;
sp:subject sp:_X
]
[ sp:object sp:_Z ;
sp:predicate ex:hasAncestor ;
sp:subject sp:_Y
])
]
Where transitive-test.n3 is:
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix ex: <http://example.com/terms#> .
{ ?X ex:hasAncestor ?Y . ?X ex:hasAncestor ?Z } => { ?X ex:hasAncestor ?Z } .
This way n3 rules can be 'vizualized' within TopBraid composer, The OWL2 RL in
RIF templateRules algorithm (which FuXi supports) can be leveraged to generate
efficient, custom SPIN rules from an OWL 2 RL ontology
Original issue reported on code.google.com by [email protected]
on 29 Jul 2010 at 11:21
The BFP query mediation can sometimes result in duplicating mediated queries.
A simple memoization mechanism is needed to eliminate this redundancy so
queries that are equivalent up to renaming of variables are only evaluated once
against the base RDF dataset
Original issue reported on code.google.com by [email protected]
on 20 Dec 2010 at 9:42
if newInferredFacts is the empty graph, the test will fail and
self.inferredFacts will be initialised to a fresh instance
diff -r ade3a47cc712 lib/Rete/Network.py
--- a/lib/Rete/Network.py Mon Jun 07 20:53:49 2010 -0400
+++ b/lib/Rete/Network.py Thu Jul 22 17:38:55 2010 +0100
@@ -442,7 +442,7 @@
node.memories[RIGHT_MEMORY].reset()
self.justifications = {}
self.proofTracers = {}
- self.inferredFacts = newinferredFacts and newinferredFacts or Graph()
+ self.inferredFacts = newinferredFacts is not None and newinferredFacts
or Graph()
self.workingMemory = set()
self._resetinstanciationStats()
Original issue reported on code.google.com by [email protected]
on 22 Jul 2010 at 4:41
FuXi used to produce PML OWL/RDF documents using this function
(FuXi.Rete.Proof.GenerateProof) module:
http://code.google.com/p/fuxi/source/browse/lib/Rete/Proof.py#151
This has not been tested since the addition of the BFP query answering method
was added.
Alternatively, callbacks can be registered as actions
(http://code.google.com/p/fuxi/wiki/ReteActions) that keep track of which rule
fired which ground fact.
Original issue reported on code.google.com by [email protected]
on 27 Apr 2011 at 2:48
Installation documentation on the wiki is dated and incomplete, including stale
links and references to the FuXi version in the old svn repository.
Note: edits are underway.
Original issue reported on code.google.com by [email protected]
on 5 Nov 2010 at 1:33
What steps will reproduce the problem?
1. 2 rdflib graphs: first empty (g1), the second (g2) has Restriction (r)
on a DatatypeProperty
2. r.serialize(g1)
3. in g1 the datatypeProperty is also ObjectProperty (the creation of the
copy of the property does not set the type of property)
What is the expected output? What do you see instead?
g1 has a copy of the property that is ONLY datatypeProperty
What version of the product are you using? On what operating system?
latest
Please provide any additional information below.
correct the serialize method in the Restriction class to copy type of
property (default is objectProperty)
Original issue reported on code.google.com by [email protected]
on 19 Feb 2010 at 7:12
$ FuXi --safety=loose --strictness=defaultDerived \
--idb=owl:sameAs --method=both \
--why="ASK { ex:subject1 owl:sameAs ex:subject2 }" \
--debug \
--ns=ex=http://www.w3.org/2002/03owlt/InverseFunctionalProperty/premises001# \
--pDSemantics
--builtinTemplates=http://fuxi.googlecode.com/hg/RuleBuiltinSPARQLTemplates.n3 \
--dlp http://www.w3.org/2002/03owlt/InverseFunctionalProperty/premises001.rdf
SELECT ?P { ?P owl:inverseOf owl:sameAs_query_bb } 1 apriori binding(s)-> []
Query triggered for rdfs:range_query(?P ?C) :- bfp:evaluate(rule:3 0)
Traceback (most recent call last):
File "/Library/Python/2.5/site-packages/FuXi-1.1.production-py2.5.egg/FuXi/LP/BackwardFixpointProcedure.py", line 207, in __call__
queryStr,rt = edbQuery.evaluate(self.bfp.debug)
raise maxException
pyparsing.ParseException: Expected "}" (at char 17), (line:1, col:18)
Original issue reported on code.google.com by [email protected]
on 21 Sep 2010 at 1:54
What steps will reproduce the problem?
1. comment out rdflib OWL import
2. execute testOWL.py
What is the expected output? What do you see instead?
testOWL.py:2: DeprecationWarning: the sets module is deprecated
from sets import Set
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Fu
Xi-1.0.dev-py2.6.egg/FuXi/Rete/SidewaysInformationPassing.py:7:
DeprecationWarning: the md5 module is deprecated; use hashlib instead
import unittest, os, sys, itertools, md5
testOwl (__main__.OwlTestSuite) ... Time to build production rule (RDFLib):
0.000104188919067 seconds
OWL/AllDifferent/premises001
OWL/AllDifferent/conclusions001
<OWL/AllDifferent/conclusions001.rdf> :- <OWL/AllDifferent/premises001.rdf>
OWL/AllDifferent/premises001 http://www.w3.org/2002/07/owl#AllDifferent
using <code xmlns="http://www.w3.org/1999/xhtml">AllDifferent</code> to derive
<code xmlns="http://www.w3.org/1999/xhtml">differentFrom</code>
Original program
OWL/AllDifferent/Manifest001.rdf OWL/AllDifferent/premises001
feature: http://www.w3.org/2002/07/owl#AllDifferent
using <code xmlns="http://www.w3.org/1999/xhtml">AllDifferent</code> to derive
<code xmlns="http://www.w3.org/1999/xhtml">differentFrom</code>
[]
ERROR
======================================================================
ERROR: testOwl (__main__.OwlTestSuite)
----------------------------------------------------------------------
Traceback (most recent call last):
File "testOWL.py", line 327, in testOwl
timings.append(self.MagicOWLProof(goals,program,factGraph,conclusionFile))
File "testOWL.py", line 164, in MagicOWLProof
for rule in AdditionalRules(factGraph):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/FuXi-1.0.dev-py2.6.egg/FuXi/DLP/ConditionalAxioms.py", line 66, in AdditionalRules
if tBox.query(FUNCTIONAL_PROPERTIES).askAnswer[0]:
File "build/bdist.macosx-10.3-fat/egg/rdflib/Graph.py", line 738, in query
extensionFunctions))
File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/bison/Processor.py", line 50, in query
extensionFunctions=extensionFunctions)
File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/Algebra.py", line 312, in TopEvaluate
None)
File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/Algebra.py", line 165, in ReduceToAlgebra
prolog))
File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/bison/SPARQLEvaluate.py", line 273, in createSPARQLPConstraint
for expr in reducedFilter]))
File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/bison/SPARQLEvaluate.py", line 186, in mapToOperator
mapToOperator(expr.right,prolog,combinationArg,constraint=constraint),
File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/bison/SPARQLEvaluate.py", line 218, in mapToOperator
return "'%s'"%convertTerm(expr,prolog)
File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/bison/SPARQLEvaluate.py", line 71, in convertTerm
return URIRef(queryProlog.prefixBindings[term.prefix] + term.localname)
KeyError: u'owl'
----------------------------------------------------------------------
Ran 1 test in 0.258s
Original issue reported on code.google.com by [email protected]
on 1 Jul 2010 at 12:06
Not sure exactly what circumstance causes the rules to be empty but the error
*seems* harmless enough, perhaps related to debugging output.
Can be reproduced with the curate tool,
curate -r examples/tagging.n3 aiddata-china
attached patch fixes it with no apparent unwanted side-effects
Original issue reported on code.google.com by [email protected]
on 21 Dec 2010 at 1:20
Attachments:
In order to fully deprecate the (currently faulty) SLD / topdown reasoner, the
new BFP reasoner needs to support all its capabilities.
Original issue reported on code.google.com by [email protected]
on 20 Dec 2010 at 9:38
Usually systems that provide some form of closed world assumption (or
non-monotonic) negation
have a way to ensure the program (the rules and facts) are stratified (i.e.,
there are no circular
references between antecedents and consequents of rules). This guarantees
unique, consistent
answers for queries involving default negation
Original issue reported on code.google.com by [email protected]
on 24 Sep 2009 at 1:24
What steps will reproduce the problem?
1. Fix for empty dictionary co ntains garbage characters so for example
testExistentialInHead.py won't ru: Lexical error at line 67, column 55.
Encountered: "\u00ac" (172), after : "" ConditionalAxioms.py /fuxi/lib/DLP line
66
Original issue reported on code.google.com by [email protected]
on 26 Jul 2010 at 9:41
Currently the backward and forward inference procedure only supports
user-specified filters, i.e.,
there are two inputs and the result is either true or false based on the
user-supplied computation.
We want to be able to add support for user-specified computations that result
in arbitrary RDF
terms.
Original issue reported on code.google.com by [email protected]
on 24 Sep 2009 at 4:56
FuXi cannot support psuedo-2nd order predicate SPARQL entailment queries such
as:
SELECT * { ex:Foo ?predicate ex:Bar }
or
SELECT * { ex:Foo a ?predicate }
Primarily, the BFP method needs a principled solution to implement
See:
http://answers.semanticweb.com/questions/1594/what-are-the-semantics-of-2nd-orde
r-predicates-in-rdf-rule-languages
Original issue reported on code.google.com by [email protected]
on 7 May 2011 at 4:17
What steps will reproduce the problem?
1. Prepare a set of instance data with an `:a owl:sameAs :b` relation, but no
`:b owl:sameAs :a` relation. An example is attached as sameas.n3.
2. Use FuXi's setupDescriptionLogicProgramming() to intialize a network on any
set of TBox data, for example on an empty graph.
3. Materialize inferences from the instance data.
What is the expected output? What do you see instead?
I expect all statements about :a to be "copied" to :b, and vice-versa. Instead,
I see that the statements about :b are not "copied" to :a.
What version of the product are you using? On what operating system?
cset 781be253fe4b
Please provide any additional information below.
The attached patch (sameas.diff) fixes this for me by introducing an explicit
rule into `non_DHL_OWL_Semantics` that makes owl:sameAs symmetric. I don't know
if this is the right way to handle it.
Original issue reported on code.google.com by vfaronov
on 1 Aug 2010 at 12:12
Attachments:
FuXi's SPARQL query mediation engine needs further testing using the recently
created SPARQL 1.1 entailment regime tests:
http://www.w3.org/2009/sparql/docs/tests/data-sparql11/entailment/
A harness similar to the one created for the OWL tests needs to be created
This will be done over the next couple of days
Original issue reported on code.google.com by [email protected]
on 7 Apr 2011 at 11:47
Switch FuXi to using the latest version of rdflib that includes changes to the
module structure, etc..
Original issue reported on code.google.com by [email protected]
on 24 Sep 2009 at 1:26
What steps will reproduce the problem?
1. Use layercake-python with FuXi trunk
python testOWL.py --strategy=sld
What is the expected output? What do you see instead?
{{{
File "/Library/Python/2.5/site-packages/FuXi-1.1.production-py2.5.egg/FuXi/Rete/TopDown.py", line 480, in collectAnswers
for ans,ns in _ans:
File "/Library/Python/2.5/site-packages/FuXi-1.1.production-py2.5.egg/FuXi/Rete/TopDown.py", line 583, in SipStrategy
for answers in memoizeMemory[queryLiteral]:
RuntimeError: Set changed size during iteration
----------------------------------------------------------------------
Ran 1 test in 2.047s
}}}
Please use labels and text to provide additional information.
Original issue reported on code.google.com by [email protected]
on 21 Sep 2010 at 12:53
Need documentation specific to the use of hybrid predicates and their effect on
the reasoning process
Original issue reported on code.google.com by [email protected]
on 7 Sep 2011 at 9:35
What steps will reproduce the problem?
testOwl.py --strategy=bfp
The test gets underway then hangs in what appears to be an infinite loop,
suckng up 100% of the CPU. However, it finally completes after a few minutes.
This is of course much more cpu intensive than with the other strategies:
===============================================
'OWL/intersectionOf/Manifest001.rdf': '333.187818527 milli seconds',
'OWL/inverseOf/Manifest001.rdf': '72.2098350525 milli seconds',
'OWL/unionOf/Manifest001.rdf': '67.4600601196 milli seconds'}
ok
----------------------------------------------------------------------
Ran 1 test in 205.390s
OK
===============================================
Here's what the output looks like when it hangs:
===============================================
Forall ?S ?O ( owl:complementOf(?O ?S) :- owl:complementOf(?S ?O) ),
Forall ?S ?O ( owl:disjointWith(?O ?S) :- owl:disjointWith(?S ?O) ),
Forall ?L1 ?L2 ?ANY ?L ( owl:differentFrom(?L1 ?L2) :- And( owl:AllDifferent(?ANY) owl:distinctMembers(?ANY ?L) list:in(?L1 ?L) list:in(?L2 ?L) <http://www.w3.org/2000/10/swap/log#notEqualTo>(?L1,?L2) ) ),
Forall ?I ?R ?L ( list:in(?I ?L) :- And( rdf:rest(?L ?R) list:in(?I ?R) ) ),
Forall ?I ?L ( list:in(?I ?L) :- rdf:first(?L ?I) )]
Goal to solve SELECT ?SUBJECT { ?SUBJECT
<http://www.w3.org/2002/07/owl#differentFrom>
<http://www.w3.org/2002/03owlt/distinctMembers/premises001#Barney> }
Time to build production rule (RDFLib): 8.89301300049e-05 seconds
===============================================
This is entered with an initial priority of high since bfp is now the preferred
reasoning strategy.
Original issue reported on code.google.com by [email protected]
on 7 Nov 2010 at 3:34
What steps will reproduce the problem?
1. Prepare a vocabulary with an rdfs:subPropertyOf relation. An example is
attached as subprop-tbox.n3.
2. Prepare instance data that uses a subproperty from that vocabulary. An
example is attached as subprop-abox.n3.
3. Use FuXi to materialize inferences from this data. An example program for
this is attached as reason.py (`python reason.py subprop-tbox.n3
subprop-abox.n3`).
What is the expected output? What do you see instead?
I expect to see the inferred superproperty statement, among other RDFS
entailments. I do not see such a statement.
What version of the product are you using? On what operating system?
cset a2e7663d59cd
Please provide any additional information below.
Note that other RDFS entailments (superclass, domain, range) are performed as
they should.
I observe this also on "real" vocabularies like DC (e.g. dcterms:title is a
subproperty of dc:title).
Original issue reported on code.google.com by vfaronov
on 24 Jul 2010 at 7:55
Attachments:
What steps will reproduce the problem?
1. easy_install-2.5 fuxi
What is the expected output? What do you see instead?
When attempting easy_install on OS X 10.6.6, does not run clean but produces:
...
Processing FuXi-1.1.production.macosx-10.5-i386.tar.gz
error: Couldn't find a setup script in
/var/folders/yN/yNVCI5CMGGm7dmdKQkYp-++++TI/-Tmp-/easy_install-4KltzK/FuXi-1.1.p
roduction.macosx-10.5-i386.tar.gz
Workaround is to install manually from sources as documented on the wiki, see
http://code.google.com/p/fuxi/wiki/Installation_Testing.
Original issue reported on code.google.com by [email protected]
on 5 Nov 2010 at 1:42
Need to port use of 4Suite-XML to use Amara 2 instead (and eventually,
[http://wiki.xml3k.org/Akara Akara] for the web infrastructure)
Original issue reported on code.google.com by [email protected]
on 31 Dec 2010 at 4:11
In particular if we have Exists then it breaks because it can't be transformed
into a triple.
Patch attached.
Original issue reported on code.google.com by [email protected]
on 21 Dec 2010 at 1:22
Attachments:
Running a variant of the example from
http://code.google.com/p/fuxi/wiki/FuXiUserManual against hg 9ef1f7f348b5 using
layercake-python SVN r354,
> python ./lib/Rete/CommandLine.py --debug \
> --ruleFacts --dlp --output=conflict --method=sld --strict=defaultDerived \
> --ns='test=http://www.w3.org/2002/03owlt/TransitiveProperty/premises001#' \
> --why="ASK { test:Ghent test:path <http://www.example.com/nopathhere> }" \
> http://www.w3.org/2002/03owlt/TransitiveProperty/premises00
(the sha1sum of http://www.w3.org/2002/03owlt/TransitiveProperty/premises00 as
retrieved is 918a841b1404ba797848717e939a068c5cfe6fa6) produces
> Time to reach answer ground goal answer of True: 217.927932739 milli seconds
Which is clearly wrong: there isn't a test:path from test:Ghent to that URI.
Changing the subject to test:Antwerp also produces True, but test:Amsterdam
produces False.
Using --method=gms I get output (prior to the profiling data) ending with
>
> Time to calculate closure on working memory: 2.85601615906 milli seconds
> <TerminalNode (ns1:path_magic(?X) :- ns1:path_magic(?X ?IBYGKzCx20)) (pass-
> thru): CommonVariables: [?X, ?IBYGKzCx20] (0 in left, 1 in right memories)>
> ns1:path_magic(?X) :- ns1:path_magic(?X ?IBYGKzCx20)
> 1 instanciations
> 485036 function calls (260105 primitive calls) in 6.895 CPU seconds
in every case, both those which should produce a path and which shouldn't.
Using --method=bfp throws "TypeError: argument of type 'NoneType' is not
iterable", and --method=naive (with --output=conflict and --output=n3) seems to
produce no meaningful output whatsoever.
Original issue reported on code.google.com by [email protected]
on 18 Jan 2011 at 11:14
Current implementation isn't moving all builtins to the end
Diff of Network.py that *should* fix problem - but introduces performance drop
{{{
diff -r 4f1111ec2d4d lib/Rete/Network.py
--- a/lib/Rete/Network.py Fri Oct 02 15:11:36 2009 -0400
+++ b/lib/Rete/Network.py Thu Oct 29 22:57:47 2009 -0400
@@ -657,10 +658,11 @@
self._resetinstanciationStats()
#self.checkDuplicateRules()
return
+ isaBuiltin = self.ruleStore.filters.get(currentPattern[PREDICATE])
if HashablePatternList([currentPattern]) in self.nodes:
#Current pattern matches an existing alpha node
matchedPatterns.append(currentPattern)
- elif matchedPatterns in self.nodes:
+ elif not isaBuiltin and matchedPatterns in self.nodes:
#preceding patterns match an existing join/beta node
newNode = self.createAlphaNode(currentPattern)
if len(matchedPatterns) == 1 and HashablePatternList([None])+matchedPatterns in
self.nodes:
}}}
Original issue reported on code.google.com by [email protected]
on 30 Oct 2009 at 3:03
Hi FuXi creators,
first of all, don't worry, this is not an issue. I just wanted to tell you
about my "bundle". I've been adapting rdflib 3.1 with rdfextras, FuXi and the
store modules of rdflib 2.4. The result is RDF.py:
https://github.com/fertapric/RDF.py.
In addition, I added some examples.
your thoughts about the project? names/licenses of the project (to update the
correspondent files and credits)??
Best regards
-- Fernando Tapia
Original issue reported on code.google.com by [email protected]
on 1 Apr 2011 at 12:28
What steps will reproduce the problem?
Run FuXi.Rete.BuiltinPredicates from command-line (triggering unit test
harness):
resulting in:
TypeError: unbound method __init__() must be called with Uniterm instance as
first argument (got ExternalFunction instance instead)
Original issue reported on code.google.com by [email protected]
on 19 Oct 2010 at 2:46
What steps will reproduce the problem?
1. Test data as previously supplied seems to work top down but bottoms up
results in exceptions for these two queries:
FuXi --input-format="n3" --ns=test=http://xdors.net/demo#
--ns=owl=http://www.w3.org/2002/07/owl# --dlp \
--method=bottomUp \
--why="SELECT ?x WHERE { ?x a test:female }" scratch.n3
echo mensch ==========================================================
FuXi --input-format="n3" --ns=test=http://xdors.net/demo#
--ns=owl=http://www.w3.org/2002/07/owl# --dlp \
--method=bottomUp \
--why="SELECT ?x WHERE { ?x a test:mensch }" scratch.n3
What is the expected output? What do you see instead?
Exceptions of the following form arise. This seems suspiciously like the
others I reported recently with keyErrors in convertTerm...
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Fu
Xi-1.0.dev-py2.6.egg/FuXi/Rete/AlphaNode.py:6: DeprecationWarning: the sets
module is deprecated
from sets import Set
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Fu
Xi-1.0.dev-py2.6.egg/FuXi/Rete/TopDown.py:12: DeprecationWarning: the md5
module is deprecated; use hashlib instead
import itertools, copy, md5
Time to build production rule (RDFLib): 7.70092010498e-05 seconds
Magic seed fact (used in bottom-up evaluation) :mensch_magic(?x)
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Fu
Xi-1.0.dev-py2.6.egg/FuXi/Rete/Magic.py:547: UserWarning: predicate symbol of
test:has_child(?X ?OEucOySk25) is in both IDB and EDB. Marking as base
"predicate symbol of %s is in both IDB and EDB. Marking as %s"%(term,mark))
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Fu
Xi-1.0.dev-py2.6.egg/FuXi/Rete/Magic.py:547: UserWarning: predicate symbol of
test:person(?OEucOySk39) is in both IDB and EDB. Marking as base
"predicate symbol of %s is in both IDB and EDB. Marking as %s"%(term,mark))
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/bin/FuXi", line 8, in <module>
load_entry_point('FuXi==1.0.dev', 'console_scripts', 'FuXi')()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/FuXi-1.0.dev-py2.6.egg/FuXi/Rete/CommandLine.py", line 495, in main
noMagic=noMagic):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/FuXi-1.0.dev-py2.6.egg/FuXi/Rete/Magic.py", line 179, in MagicSetTransformation
newRules.extend(AdditionalRules(factGraph))
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/FuXi-1.0.dev-py2.6.egg/FuXi/DLP/ConditionalAxioms.py", line 66, in AdditionalRules
if tBox.query(FUNCTIONAL_PROPERTIES).askAnswer[0]:
File "build/bdist.macosx-10.3-fat/egg/rdflib/Graph.py", line 738, in query
File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/bison/Processor.py", line 50, in query
File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/Algebra.py", line 312, in TopEvaluate
File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/Algebra.py", line 165, in ReduceToAlgebra
File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/bison/SPARQLEvaluate.py", line 273, in createSPARQLPConstraint
File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/bison/SPARQLEvaluate.py", line 186, in mapToOperator
File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/bison/SPARQLEvaluate.py", line 218, in mapToOperator
File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/bison/SPARQLEvaluate.py", line 71, in convertTerm
KeyError: u'owl'
Original issue reported on code.google.com by [email protected]
on 2 Jul 2010 at 8:40
Using the following command and input I get successful results for
some queries but not others. Can you advise how to resolve, debug or
work around such issues? Using the same command line except varying
the queries as follows
1) SELECT ?x WHERE { ?x a test:party }
2) SELECT ?x WHERE { ?x a test:person }
3) SELECT ?x WHERE { ?x a test:female }
4) SELECT ?x WHERE { ?x a test:mensch }
FuXi-1.0.dev returns results as expected for (1) and (2); but for
(3) and (4) error messages of the following form are returned:
AssertionError: [(?x, rdflib.URIRef('http://www.w3.org/1999/02/22-rdf-
syntax-ns#type'), rdflib.URIRef('http://xdors.net/demo#mensch'))]
Original issue reported on code.google.com by [email protected]
on 4 Jun 2010 at 9:08
Attachments:
The attached is intended as a first step toward in providing set of FuXi demos.
The thought is to provide command line demonstrations of simple queries
against OWL-based ontologies and facts. These will later be supplemented with
demo programs, rule examples, etc.
While the attached inputs produce expected results under third party products,
results vary under FuXi's different strategies.
The file attached file, output.txt, reflects the results of the shell script
Fuxi-bsa.command. The queries ask who is a man and who is a person given a
minimal set of facts, i.e., john is a man and jane is a woman. The classes
man and woman are subclasses of adult which in turn is a subclass of person--so
we can infer john and jane are persons.
Results under various strategies are as follows:
* SLD yields the expected answers to both queries.
* GMS does not report results in either case.
* BFP reports the expected result for who is a man; but aborts with the query
about who is a person with the exception "TypeError: argument of type
'NoneType' is not iterable."
Perhaps the TypeError issue is the same BFP problem as alluded to in the last
paragraph of Issue 44.
This is entered initially as a single, new, low priority report since the
issues did not arise in a production environment and also because the single
set of inputs provide grounds for comparison across strategies. However there
appear to be two distinct issues here (1) missing results for GMS queries and
(2) a NoneType is not iterable issue, which while mentioned in issue 44 is not
the main concern of that report.
Original issue reported on code.google.com by [email protected]
on 7 Feb 2011 at 4:45
Attachments:
The diff says it all:
diff -r ade3a47cc712 lib/Syntax/InfixOWL.py
--- a/lib/Syntax/InfixOWL.py Mon Jun 07 20:53:49 2010 -0400
+++ b/lib/Syntax/InfixOWL.py Tue Jul 20 14:18:30 2010 +0100
@@ -769,9 +769,9 @@
Chaining 3 intersections
>>> female = Class(exNs.Female,graph=g)
- >>> male = Class(exNs.Human,graph=g)
+ >>> human = Class(exNs.Human,graph=g)
>>> youngPerson = Class(exNs.YoungPerson,graph=g)
- >>> youngWoman = female & male & youngPerson
+ >>> youngWoman = female & human & youngPerson
>>> youngWoman
ex:YoungPerson that ( ex:Female and ex:Human )
>>> isinstance(youngWoman,BooleanClass)
Original issue reported on code.google.com by [email protected]
on 20 Jul 2010 at 1:20
What steps will reproduce the problem?
1. click on the links at bottom of page
2.
3.
What is the expected output? What do you see instead?
Since site is about a the semantic web, I expected to see html
What version of the product are you using? On what operating system?
chrome 6 osX
Please provide any additional information below.
Just a heads up.
Original issue reported on code.google.com by [email protected]
on 14 Sep 2010 at 1:55
[http://code.google.com/p/fuxi/wiki/ReteActions Externally defined actions] are
associated with terminal nodes but there is no easy way to get the terminal
node associated with a particular rule. The network instances have a
terminalNodes instance that is a list of terminal nodes but probably could use
a dictionary that maps rules (used to build the network) to the corresponding
terminal node in order to make it easier for the user to register externally
defined actions.
Original issue reported on code.google.com by [email protected]
on 16 Dec 2010 at 3:17
What steps will reproduce the problem?
1. Import error occurs with clean installation of FuXi on 7-1-10
This appears to be an extraneous import statement that can be commented out.
The additional errors I will report are net of this workaround.
Original issue reported on code.google.com by [email protected]
on 1 Jul 2010 at 11:49
$ FuXi --safety=loose --strictness=defaultDerived --idb=owl:sameAs --method=bfp
--why="ASK { ex:subject1 owl:sameAs ex:subject2 }" --debug
--ns=ex=http://www.w3.org/2002/03owlt/InverseFunctionalProperty/premises001#
--pDSemantics
--builtinTemplates=http://fuxi.googlecode.com/hg/RuleBuiltinSPARQLTemplates.n3
--dlp http://www.w3.org/2002/03owlt/InverseFunctionalProperty/premises001.rdf
Query triggered for rdfs:range_query(?P ?C) :- bfp:evaluate(rule:3 0)
Failed query SELECT ?C { a <http://www.w3.org/2000/01/rdf-schema#range> ?C }
..snip...
File "/Library/Python/2.5/site-packages/pyparsing-1.4.11-py2.5.egg/pyparsing.py", line 2297, in parseImpl
raise maxException
pyparsing.ParseException: Expected "}" (at char 17), (line:1, col:18)
Original issue reported on code.google.com by [email protected]
on 21 Sep 2010 at 2:01
From Uche: I've been going through all my projects and eliminating the need for
setuptools. I'd recommend the same for FuXi.
Original issue reported on code.google.com by [email protected]
on 8 Jun 2010 at 12:55
Patch attached. Only test failing is the mysterious PROGRAM2
Original issue reported on code.google.com by [email protected]
on 28 Jul 2010 at 1:27
Attachments:
Rules with second order predicates of the form ?C(:Foo :Bar) are not supported
by tip-down or GMS algorithms
Original issue reported on code.google.com by [email protected]
on 28 Aug 2010 at 1:52
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.