cliffxuan / fuxi

Automatically exported from code.google.com/p/fuxi
0 stars 0 forks source link

Inference produces incorrect answers? #44

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 nwfila...@gmail.com on 18 Jan 2011 at 11:14

GoogleCodeExporter commented 9 years ago
This looks to be a problem with the way the reasoner is being used and not the 
reasoner, because when I query for "SELECT ?path { test:Ghent test:path ?path 
}", using the same reasoner, data, etc. I get no bindings or inferred 
statements:

$ FuXi --ruleFacts --dlp --output=conflict --method=bfp --strict=defaultDerived 
 --ns='test=http://www.w3.org/2002/03owlt/TransitiveProperty/premises001#' 
--why="SELECT ?path { test:Ghent test:path ?path
<Network: 6 rules, 9 nodes, 4 tokens in working memory, 0 inferred tokens>

Original comment by chime...@gmail.com on 12 Nov 2011 at 2:53

GoogleCodeExporter commented 9 years ago
This issue was closed by revision b1778d11a5af.

Original comment by chime...@gmail.com on 3 Nov 2012 at 4:57