Search code examples
owlprotegedescription-logicdlquery

Why does not this DL query return expected results?


I've created a simple OWL ontology in Protege that describes human relationships:

  • Classes : Person, Man, Woman
    • Person is super class of Man and Woman
    • Man and Woman are disjoint
  • Object Properties : hasChild
    • Its doman and range is Person
  • Individuals : a (Man), b (Man) , c (Man) --- x (Woman), y (Woman), z (Woman)
  • Assertions :
    • a hasChild x
    • a hasChild y
    • c hasChild a

Now I want to query all persons whose children are only daughter. I wrote this query in DL query tab:

Person and hasChild only Woman

But it returns no instances! Or a simple query for persons who have only two children

Person and hasChild exactly 2

Both these queries returns no instances, Can anyone please tell me what's the problem?

Thanks


Solution

  • DL has an Open World Assumption (OWA). This means that the knowledge that is captured in an ontology is incomplete. The alternative is Closed World Assumption (CWA), which is used in, say, databases. In CWA everything that is not declared is absent.

    According to OWA, all we know from an ontology above is that a and c have some children. We do not know whether a has more than one children, as x and y could be the same (to avoid this situation one should use DifferentIndividuals() axiom). We don't know whether these are the only children: in the open world any individual can have other children, of any gender, that are omitted in the ontology. That's why the answer to these query is an empty set.

    The easiest way to get an expected answer os to close the knowledge. If the ontology will contain an axiom

    a instanceOf (hasChild only {x,y})

    then a would become an answer of the first query. If, in addition , an axiom

    DifferentIndividuals(x,y)

    would be added, then the second query will return a. Protege allows one to easily make axioms of the 2nd type.