0

as a beginner in OWL I find the difference of rdfs:range and Restrictions with owl:allValuesFrom a bit hard to grasp.

In "Semantic Web for the Working Ontologist" (2nd Edition) chapter 11, page 228f. a questionnaire is modeled somewhat like so:

q:Answer a owl:Class .
q:Question a owl:Class .

q:optionOf a owl:ObjectProperty ;
    rdfs:domain q:Answer ;
    rdfs:range q:Question ;
    owl:inverseOf q:hasOption .
    
q:hasSelectedOption a owl:ObjectProperty ;
    rdfs:subPropertyOf q:hasOption ;
    rdfs:range q:SelectedAnswer.

q:AnsweredQuestion owl:equivalentClass
    [a owl:Restriction
    owl:onProperty q:hasSelectedOption
    owl:someValuesFrom q:Answer] .

q:SelectedAnswer a owl:Class ;
    rdfs:subClassOf q:Answer ;
    rdfs:subclassOf
    [a owl:Restriction ;
    owl:onProperty q:enablesCandidate ;
    owl:allValuesFrom q:EnabledQuestion ] .

q:EnabledQuestion a owl:Class .

q:enablesCandidate a owl:ObjectProperty ;
    rdfs:domain q:Answer ;
    rdfs:range q:Question .

Now the basic idea is that if an answer is selected, a new triple along q:hasSelectedOption is added to the triple store; this allows the inference that the selected answer is a q:SelectedAnswer (via rdfs:range).

Since members of q:SelectedAnswer are also members of the asserted Restriction (subClassOf), it can also be inferred that any ?object along q:enablesCandidate is of type q:EnabledQuestion ('universal inference').

With 'universal inference' I mean, that given

[a owl:Restriction ;
owl:onProperty P ;
owl:allValuesFrom C] .

it is entailed that for any individual that is a member of an owl:allValuesFrom restriction, any object asserted along predicate P must of type C.

I think somewhere in the Pizza tutorial it says that domain/range are for inferencing, whereas axioms are for 'data integrity constraints' (?), but isn't the the subClassOf-allValuesFrom-construct in q:SelectedAnswer also used for inferencing here?

And why not just assert q:enablesCandidate rdfs:range q:EnabledQuestion?

Edit:

Sorry, I think this duplicates owl:allValuesFrom and rdfs:range difference.

upgrd
  • 720
  • 7
  • 16
  • all OWL axioms will be used for inference - the whole semantics of OWL empowers the entailment of implicit knowledge from explicit knowledge. There is no concept of constraints resp. ICV in OWL. Sure, you can make your ontology that restrictive, that the whole ontology will become inconsistent, i.e. its model empty - which in fact allows to draw any conclusion from it. But proper constraints are more the job of languages like SHACL or SHeX – UninformedUser Apr 05 '23 at 10:15
  • 1
    by the way, the range `R` of a property `p` is a global statement, it is equivalent to `Thing SubClassOf p only R` - if on the other hand, you say `A SubClassOf p only R`, then this "range" only holds for individuals of class `A` - so you can consider it some kind of "local range" declaration – UninformedUser Apr 05 '23 at 10:18

0 Answers0