eye
eye copied to clipboard
Repeated statements in ttl file cause unexpected reasoning result
I use eye version
EYE v10.22.5 (2024-09-11)
SWI-Prolog version 8.4.2
I have a ttl file with my data and model (2 instances, 2 classes)
:d rdf:type :D.
:d rdf:type :D.
:e rdf:type :E.
Note the repetition of statement :d rdf:type :D
I associate a number to instances according to their type:
{
?d :op 1.
} <= {
?d rdf:type :D.
}.
{
?e :op 2.
} <= {
?e rdf:type :E.
}.
I want to map a list of instances to their associated number:
:let :myl (:d :e).
{
:let :myl ?l.
( ?v { ?l list:member ?e. ?e :op ?v} ?vs ) log:collectAllIn _:x.
} => {
:result :is ?vs.
}.
I get the result
ns1:result ns1:is (1 1 2).
Note the repetition of 1
: NOK. I expect to receive (1 2)
.
If I remove the repetition of statement :d rdf:type :D
, I get the expected result.
If I put my data and model in the n3 file, I get the expected result.