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

Different results with bnodes depending on the rule order #109

Open
eyusupov opened this issue May 12, 2024 · 1 comment
Open

Different results with bnodes depending on the rule order #109

eyusupov opened this issue May 12, 2024 · 1 comment

Comments

@eyusupov
Copy link

eyusupov commented May 12, 2024

@prefix : <http://example.com/>.

:a :a :b.
:b :b :c.

{ ?a ?a ?b. :a :a :b } => { _:e _:e _:e }.
{ ?b ?b ?c. :b :b :c } => { _:e _:f _:f }.

gives:

eye --quiet --nope --pass-only-new tests/n3/bnodes/bnode-several-rules-same-production.n3
EYE v10.7.2 (2024-05-06)
SWI-Prolog version 9.2.4
starting 71 [msec cputime] 68 [msec walltime]

_:sk_0 _:sk_0 _:sk_0.

While

@prefix : <http://example.com/>.

:a :a :b.
:b :b :c.

{ ?b ?b ?c. :b :b :c } => { _:e _:f _:f }.
{ ?a ?a ?b. :a :a :b } => { _:e _:e _:e }.

gives:

eye --quiet --nope --pass-only-new tests/n3/bnodes/bnode-several-rules-same-production-3.n3
EYE v10.7.2 (2024-05-06)
SWI-Prolog version 9.2.4
starting 75 [msec cputime] 72 [msec walltime]

_:sk_1 _:sk_0 _:sk_0.
_:sk_2 _:sk_2 _:sk_2.
@josd
Copy link
Collaborator

josd commented May 13, 2024

This is indeed an artefact of the implementation:

  • in the former the first rule derives _:sk_0 _:sk_0 _:sk_0. and the conclusion of the second rule is entailed by _:sk_0 _:sk_0 _:sk_0.
  • in the latter the first rule derives _:sk_1 _:sk_0 _:sk_0. and the conclusion of the second rule is the new _:sk_2 _:sk_2 _:sk_2.

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

2 participants