Paul Barnes
Paul Barnes

Reputation: 1

Protege unexpected behavior with owl max restriction

I am creating an ontology in Protégé modelling desserts. There are two main base classes Dessert and Ingredient and a hasIngredient property to connect them. An example of a dessert looks as follows;

NeapolitanIceCream subclass of Dessert
    hasIngredient exactly 1 IceCream
    hasIngredient exactly 1 wafers
    hasIngredient only (IceCream or Wafers)

And I have 2 primitive classes SimpleDessert and ComplexDessert

SimpleDessert subclass of Dessert and (hasIngredient max 3 Ingredient)

ComplexDessert subclass of Dessert and (hasIngredient min 5 Ingredient)

SimpleDessert(min) performs as expected but ComplexDessert(max) has no subclasses when I run the reasoner. My understanding of the Open World Principle thought that the exactly 1 clauses and the only clause make it clear that there are only these two possible ingredients and the quantity is clear. I'm probably missing something obvious but would love any help here.

Upvotes: 0

Views: 498

Answers (1)

Joshua Taylor
Joshua Taylor

Reputation: 85913

This axiom may not mean what you want it to mean:

SimpleDessert subclass of Dessert and (hasIngredient max 3 Ingredient)

This says that "if something is a SimpleDessert, then it is a Dessert and has at most three ingredients. It does not say that "if something is a Dessert and has at most three ingredients, then it is a SimpleDessert."

I you want to say the latter, then you need the subclass axiom in the other direction:

        Dessert ⊓ ≤3 hasIngredent.Ingredient ⊑ SimpleDessert

In Protege, you do that using the General Axioms tab. (See my answer to owl protege how can I describe a class that has just some properties? for an example and screenshots.)

Upvotes: 3

Related Questions