Re: a SHACL specification based on SPARQL

Richard,

I hope not :-)

My point is that in order to produce answers that users will expect,
we need to go beyond entailment. In the example the the RDF graph
contains a term from OWL so users should use OWL entailment. However,
OWL entailment will simply add more triples, e.g.:

ex:Darth owl:sameAs ex:Anakin .

However, the intention of the user is to assert that ex:Darth and
ex:Anakin denote the same resource. So from the user viewpoint the
graph does not violate the cardinality constraint. However, if we
naively count triples, then the graph violates the cardinality
constraint.

This discord is very similar to the one we encounter with multiple
lexical forms for a given literal value. For example, suppose the
property ex:numberOfWheels has cardinality of exactly-one. Consider
the following graph:

ex:MyUnicycle ex:numberOfWheels "1"^^xsd:integer .
ex:MyUnicycle ex:numberOfWheels "01"^^xsd:integer .

A user might expect this to be valid since the two lexical forms
correspond to the same literal value. However, if we naively count
triples then the graph is invalid. Peter has repeatedly raised this
point.

The simple thing for SHACL to do is naive triple counting. However,
this might cause a problem in some real-world situations. I think we'd
need a way for users to specify the behavior they want. For example,
we could introduce a canonical form function to pick a unique
representative for each IRI or literal.

-- Arthur

On Thu, Mar 19, 2015 at 7:00 AM, Richard Cyganiak <richard@cyganiak.de> wrote:
> Arthur,
>
>> On 17 Mar 2015, at 20:00, Arthur Ryman <arthur.ryman@gmail.com> wrote:
>>
>> Concerning RDFS, I'd prefer to see SHACL specified purely in terms of
>> graphs, i.e. what you get after entailment.
>
> […]
>
>> For example, if I specify that ex:hasFather is
>> zero-or-one, and have the following:
>> ex:Luke ex:hasFather ex:Anakin .
>> ex:Luke ex:hasFather ex:Darth .
>> ex:Anakin owl:sameAs ex:Darth .
>> then there should be no violation.
>
> Aren’t you contradicting yourself here?
>
> In the owl:sameAs example, the graph clearly contains two ex:hasFather triples for ex:Luke. If ex:hasFather is zero-or-one, and SHACL is specified purely in terms of graphs, then that has to be a violation.
>
> Richard

Received on Thursday, 19 March 2015 16:59:14 UTC