1

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?

AlAnoodZ
  • 29
  • 5
  • "note that John has enrolled in all courses [for UG_CE] and an additional course." How do we know that? How do we know that there aren't addition courses for UG_CE that haven't been mentioned yet? – Joshua Taylor May 20 '15 at 11:53
  • For future readers, the solution to http://stackoverflow.com/questions/37380729/require-individuals-property-values-to-be-a-superset-of-anothers/37390763#37390763 probably works here, too. – Joshua Taylor May 24 '16 at 03:58

1 Answers1

0

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.

Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
  • I'm still thinking about exactly how to rework the last bit and get a general query for the set of individuals. It's easy to ask for the set of students enrolled in some classes for M (but that's not enough), or only classes for M (but that's too restrictive). Here we need to ask for students are only not enrolled in classes not required. Classes not required is easy (not(inverse(requires) value M)), but "not enrolled in" is trickier. – Joshua Taylor May 20 '15 at 12:10
  • I have thought of a similar approach previously, however, I wanted to avoid having to assert negative object properties my self. The scenario is if the object property "J enrolledIn A" is inferred by the reasoner, I would like to avoid adding manually "J : enrolledIn only {A}" and then negatively asserting that "J enrolledIn B" and J enrolledIn C. It seems like there is no option of assuming that the reasoner would be able to infer asserting the courses that J did not enroll as a negative object property. – AlAnoodZ May 20 '15 at 18:29
  • @user3689319 Well, OWL2 has a negativeObjectPropertyAssertions, so if a reasoner can figure out that J is not enrolledIn B, it could *affirm* NegativeObjectPropertyAssertion(J,enrolledIn,B). The problem is that there's no negative property expression, so the reasoner cannot affirm ObjectPropertyAssertion(J,not(enrolledIn),B). – Joshua Taylor May 20 '15 at 19:04
  • I agree, when I use negativeObjectPropertyAssertions in OWL2 it works, however as you stated, my real problem relies on not having a negative property expression. I'm not sure how I can go around that. – AlAnoodZ May 20 '15 at 20:04
  • @user3689319 There still might be something you can do with union classes, disjoint classes, disjoint properties, etc. I'm not sure. – Joshua Taylor May 20 '15 at 20:19