Problems in using Existential restrictions in Protege

722 Views Asked by At

I want to find out if an Individual belonging to Class A, has a least one relation with ALL the Individuals of Class B.

I have a problem finding a suitable expression that gives me the DL query results I desire. For the below example:

Classs: Course {CourseA, CourseB, CourseC, CourseD}
Class: Program {UG_CE, G_CE}
Class: Student {John}

ObjectProperty: is-PartOf (Course,Program)

ObjectProperty: hasEnrolledIn (Student, Course)

for Individuals: CourseA and CourseB, I asserted the property:

is-PartOf UG_CE

For Individual John, the following 3 properties were asserted:

hasEnrolledIn CourseA
hasEnrolledIn CourseB
hasEnrolledIn CourseC

I also added to individual type

hasEnrolledIn only ({CourseA , CourseB , CourseC}) 

to address OWA problems.

I want to know if John has enrolled in all the courses that are required for UG_CE, note that John has enrolled in all courses and an additional course.

After invoking the reasoner, the following query will not give me the desired result:

Student that hasEnrolledIn only (is-PartOf value UG_CE)

since "only" is limited to defining the exact number of relationships, it does not serve the intended purpose. Also, I can't use Max or Min since the number of courses are inferred and not known in advance.

Can another approach address my problem?

1

There are 1 best solutions below

5
On BEST ANSWER

While it's good to "close" the world with regard to what classes John is taking, it's just as important to close it with regard to what classes are required for UG_CE. I think you need an approach like this:

    M requires A.
    M requires B.
    M : requires only {A, B}.

    J enrolledIn A.
    J enrolledIn B.
    J enrolledIn C.
    J : enrolledIn only {A, B, C}.

For an individual student J, you can find out whether they are enrolled in all the classes required for M by asking whether the set of classes required by M is a subset of the set of classes enrolled in by the student:

    (inverse(requires) value M) SubClassOf (inverse(enrolledIn) value J)

or, in DL notation, with enumerated classes (lots of possible ways to express this):

    ∃ requires-1.{M} ⊑ ∃ enrolledIn-1.{J}

Now, if OWL had property negation, you could get the set of students who are only not enrolled in classes not required by an expression like this:

    not(enrolledIn) only not(inverse(requires) value M)

That asks for things such that the only courses they're not enrolled in are courses not required by M. However, OWL doesn't have property negation expressions, so I'm not sure where that leaves us. The simplest thing to do would be add a "not enrolled in" property, though that doesn't seem as elegant.