eyereasoner / eye

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

BlankNodes getting converted literals #76

Closed jeswr closed 1 year ago

jeswr commented 1 year ago

For the following data.n3

{ _:n3-30 ?p ?o} => {} .

the following is output

$ npx eyereasoner@latest --nope --quiet --pass-all ./data.n3 
{"some1-301" ?U_0 ?U_2} => true.

The problem seems to specifically be when there is a dash (-) in the blank node similar problems occur if there is a . in the blank node name.

jeswr commented 1 year ago

In lieu of a good production grammar for N3, I would expect BlankNodes to be parsed in the same way as in turtle, which is given by the following https://www.w3.org/TR/turtle/#grammar-production-BlankNode.

jeswr commented 1 year ago

I would also expect an error to be thrown if it was a literal because as far as I am aware literals are not valid subjects in N3?

josd commented 1 year ago

Is for sure a bug and a side effect of the internal bookkeeping of the whole zoo of variables.

josd commented 1 year ago

I would also expect an error to be thrown if it was a literal because as far as I am aware literals are not valid subjects in N3?

Literals are valid subjects in N3 https://w3c.github.io/N3/spec/#grammar-production-subject https://w3c.github.io/N3/spec/#grammar-production-expression https://w3c.github.io/N3/spec/#grammar-production-path https://w3c.github.io/N3/spec/#grammar-production-pathItem

josd commented 1 year ago

It is now fixed in EYE v3.4.3 and giving

{?U_1-301 ?U_0 ?U_2} => true.

Remark that an existential within the scope of the premis can become a universal within the scope of the rule.