eyereasoner / eye

Euler Yet another proof Engine
https://eyereasoner.github.io/eye/
MIT License
124 stars 17 forks source link

Blank nodes of different files mixed with each other. #117

Closed MichelSc closed 2 months ago

MichelSc commented 2 months ago

I use eye version

EYE v10.17.1 (2024-07-31)
SWI-Prolog version 8.4.2

I work with 2 ttl files and 1 n3 file.

test1.ttl contains 2 statements and 1 blank node:

:t1 :p1 [ :p2 :o1].

test2.ttl contains 2 statements and 1 blank node:

:t2 :p1 [ :p2 :o2].

I want to retrieve the blank node of :t1:

:let :myt :t1.
{
    :let :myt ?t.
    ?t :p1 ?b.
    ?b :p2 ?o.
} => {
    :result :is ?o.
}.

This is the result

ns1:result ns1:is ns1:o1.
ns1:result ns1:is ns1:o2.

Both blank nodes are retrieved, although only :o1 is expected: NOK.

All happens as if both blank nodes get the same id (this is what we can see in the proof).

Putting all the statements in 1 file provides the expected result

ns1:result ns1:is ns1:o1.

This is quite annoying!

For your information, eye output

eye --quiet --pass-only-new --debug --nope --turtle test1.ttl --turtle test2.ttl test.n3
EYE v10.17.1 (2024-07-31)
SWI-Prolog version 8.4.2
starting 25 [msec cputime] 24 [msec walltime]
GET file:///home/michelschaffers/git/KG4NPDRedesign/test/test23/test1.ttl SC=2
GET file:///home/michelschaffers/git/KG4NPDRedesign/test/test23/test2.ttl SC=2
GET file:///home/michelschaffers/git/KG4NPDRedesign/test/test23/test.n3 SC=2
networking 1 [msec cputime] 1 [msec walltime]
eam/1 entering recursion 0
. eam/1 selecting rule implies(('<urn:example:myt>'('<urn:example:let>',_3222),'<urn:example:p1>'(_3222,_3234),'<urn:example:p2>'(_3234,_3240)),'<urn:example:is>'('<urn:example:result>',_3240),'<file:///home/michelschaffers/git/KG4NPDRedesign/test/test23/test.n3>')
... eam/1 assert step '<urn:example:is>'('<urn:example:result>','<urn:example:o1>')
... eam/1 assert step '<urn:example:is>'('<urn:example:result>','<urn:example:o2>')
eam/1 entering recursion 0
. eam/1 selecting rule implies(('<urn:example:myt>'('<urn:example:let>',_3376),'<urn:example:p1>'(_3376,_3388),'<urn:example:p2>'(_3388,_3394)),'<urn:example:is>'('<urn:example:result>',_3394),'<file:///home/michelschaffers/git/KG4NPDRedesign/test/test23/test.n3>')
reasoning 0 [msec cputime] 0 [msec walltime]
2024-09-11T08:30:34.543Z in=6 out=4 ent=2 step=4 brake=2 inf=26239 sec=0.026 inf/sec=1009192
josd commented 2 months ago

Thanks for the observation and it is now fixed in v10.22.5.

It also worked with eye --quiet --pass-only-new --nope test1.ttl test2.ttl test.n3 but indeed not with --turtle which is using the fast C turtle parser and which doesn't relabel blank nodes across documents.

MichelSc commented 2 months ago

Fixed with 10.22.5.

Thanks.