owlontologyprotegeowl-apireasoner

Modelling class as complement / negation of Parent Sibling Class OWL/Protege


I'm trying to model, desires and intentions in OWL as follows.

enter image description here

There are four sub-classes of Parent Class Desire as shown and Intention specialize as the intersection of two of them, i.e. AchievableDesire and NonConflictingDesire.

enter image description here

I have equivalent class expressions for all four direct sub-classes of Desire and individuals are inferred correctly using a reasoner.

The following individuals are inferred for these classes.

While these classes work as expected I have trouble inferring the right individuals for the Intention class. In addition to the intersection of AchievableDesire and NonConflictingDesire, I would like to exclude/minus the union of NonAchievableDesire and ConflictingDesire. So in this case I would expect {A,B,C} n {A,B,C} - ({A,B} u {}) => {C}

When I defined the equivalent class expression for Intention as AchievableDesire and NonConflictingDesire, i infer A,Band C as expected. But if I append a not clause to the aforementioned such as and not NonAchievableDesire no individulals are inferred. Why is that so and what is the right way to model the equivalence expressions to get the behaviour I expect?

Most similar questions on SO want to classify instances where assertions are absent which I clearly understand is not possible under the OWA . Here I have already classified the unwanted results in a separate class (NonAchievableDesire and ConflictingDesire) so that I can use them in another class definition (Intention) with the not or owl:complementOf owl axiom. I can't wrap my head around why this fails.


Solution

  • Why no individuals are inferred

    The reason why you get no individuals inferred when you add and not NonAchievableDesire is as @UninformedUser said: there is absolutely no information in your ontology from which a reasoner can infer that A, B and C belongs to the set and not NonAchievableDesire. You can easily verify that this is indeed true by

    1. For A set the Type to not NonAchievableDesire, save and run the reasoner. You will see that A is still inferred to be an instance of Desire.

    2. For A set the Type to NonAchievableDesire (that is without the not), save and run the reasoner. You will see that A is still inferred to be an instance of Desire.

    Why is A in both cases still inferred to be an instance of Intention? Because there is zero information that states that NonAchievableDesire plays any role in the definition of Intention.

    The reasoner only returns inferences for which explicit information is available to make the inference - this is the open world assumption.

    How to get individuals inferred

    If you want to get individuals inferred when you add and not NonAchievableDesire, you need to make explicit that an individual do not have non achievable desires. One way to do that is to change the type of the individual to also be of type not NonAchievableDesire as below:

    A of type not NonAchievableDesire

    Using data/object properties to achieve this

    You can achieve this through data/object properties as well by adding hasRequiredCapability and doesNotHaveRequiredCapability data/object properties that are disjoint. For hasRequiredCapability you set the domain to AchievableDesire and for doesNotHaveRequiredCapability you set the domain to NonAchievableDesire.

    Then you can have an individual A that has some achievable and non-achievable desires. To test this you can add the following to your example ontology:

    <owl:DatatypeProperty rdf:about="http://www.semanticweb.org/ontologies/2022/6/untitled-ontology-10#doesNotHaveRequiredCapability">
        <rdfs:domain rdf:resource="http://www.semanticweb.org/ontologies/2022/6/untitled-ontology-10#NonAchievableDesire"/>
        <owl:propertyDisjointWith rdf:resource="http://www.semanticweb.org/ontologies/2022/6/untitled-ontology-10#hasRequiredCapability"/>
    </owl:DatatypeProperty>
    
    
    <owl:DatatypeProperty rdf:about="http://www.semanticweb.org/ontologies/2022/6/untitled-ontology-10#hasRequiredCapability">
        <rdfs:domain rdf:resource="http://www.semanticweb.org/ontologies/2022/6/untitled-ontology-10#AchievableDesire"/>
    </owl:DatatypeProperty>
    
    
    <owl:NamedIndividual rdf:about="http://www.semanticweb.org/ontologies/2022/6/untitled-ontology-10#A">
        <untitled-ontology-101:doesNotHaveRequiredCapability>Cannot do that</untitled-ontology-101:doesNotHaveRequiredCapability>
        <untitled-ontology-101:hasRequiredCapability>Can do this</untitled-ontology-101:hasRequiredCapability>
    </owl:NamedIndividual>    
    

    Classification of desires

    Importantly, you can get an explanation for why a desire is achievable by clicking on the ? in Protege:

    Explanation