Question

I just started learning OWL using Protégé 4.3, and now I am facing a difficult problem. I have defined a class A with some restriction superclasses that ensure that each A has a property value from P1 and P2, and each P1 and P2 have a value that is a double:

A ⊑ ∃hasProperty.(P1 ⊓ ∃hasValue.xsd:double)
A ⊑ ∃hasProperty.(P2 ⊓ ∃hasValue.xsd:double)

How can I assert that P1 values of an A are all less than all the P2 values?

Was it helpful?

Solution

You can't do this with OWL Axioms

This is an interesting problem, but it's one that you can't solve using pure OWL axioms, unfortunately. Generally, it's easy to say something about the values that individuals of class have, by using restriction superclasses, but it's hard or impossible to say something about the relationship between values of properties. E.g., you can't say that the family name property of a person must be the same as the value of the surname property.

It's important to clear up a bit of terminology, first, though, particularly the term restriction in:

I want to define a restriction,for all Individuals of A,value of p1 is always less than value of p2

A restriction is a class. E.g., the restriction likes some Person is the class of individuals each of which likes some Person. We often use restrictions as superclasses of other classes to ensure that certain constraints hold. E.g., when we say that

Person subClassOf hasName some xsd:string

we're saying that every person has a value for the property hasName that is an xsd:string.

You probably can do this with SWRL

You could assert that if something is a member of A and has p1 and p2 values, then p1 must be less than p2. This would look like:

A(?a) ∧
hasProperty(?a,?p1) ∧ P1(?p1) ∧ hasValue(?p1,?v1) ∧
hasProperty(?a,?p2) ∧ P2(?p2) ∧ hasValue(?p2,?v2)

swrlb:lessThan(?v1,?v2)

This will ensure that every P1 value on an A is less than every P2 value on the A. If you ever assert some data that violates this, then there will be an inconsistency.

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