Question

I'm fairly new to OWL and still learning the restrictions. I am trying to model these statements:

  1. A person (P) can be male (M) or female (F), but not both
  2. A person must be male or female
  3. A male has no dresses
  4. A female has at least one dress (D)

So far, I have modeled it like:

P -> canBe -> M  
P -> canBe -> F  
M <- disjoint -> F  
F -> has (>= 1) -> D

I'm confused as to how to add the restriction that a person must be male or female and how to show that a male has no dresses. I'm also unsure of my modeling in general and would appreciate any feedback.

Was it helpful?

Solution

In general, there can be different ways of achieving the same goal. That means that the following answers aren't necessarily the only possibility, but they're the first ones that come to my mind.

1. A person (P) can be male (M) or female (F), but not both.
2. A person must be male or female.

For these two statements, there's an important modeling decision to make. Are Male and Female each subclasses of a Person class, or are you using some property, e.g., hasSex that relates person to a sex? If you're using the subclass approach, then you can do this by declaring that

Person is the disjoint union of Male and Female.

This means that every instance of Person is an instance of Male or an instance of Female, and that the classes Male and Female are disjoint, so nothing is an instance of both. (Of course, if you can talk about non-person things that male and female, then you wouldn't want to use this approach exactly.)

If you're using a property like hasSex, then it's either an object property or a data property. In the first case, you'd need a class Sex with two individuals male and female, and you'd declare that they are different from each other, and you could make hasSex a functional property, and declare its range to be the class Sex. Some of this depends on how general your classes and properties are, of course. If you don't declare a range for the property, then you'd still want to use some sort of restriction class as a superclass of Person. E.g.,

Person ⊑ =1 hasSex.{male,female}
Person ⊑ ∀hasSex.{male,female}

These axioms say that each person has exactly one value from {male, female} as a value for the *hasSex*property, and that every value a person has for hasSex must be from {male, female}.

3. A male has no dresses
4. A female has at least one dress (D)

If you're using a general has property that can apply to more than just dresses (as opposed to, for instance, a hasDress property that applies only to dresses), and you have a class for Dress, these are simply:

Male ⊑ =0 has.Dress
Female ⊑ ≥1 has.Dress

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top