sparqlowlprotegerdfsdescription-logic

OWL: Create a class definition that has multiple object properties that need to be related?


I am trying to define a class in terms of the relationship between its object properties. I'm not sure if it's expressible in OWL/Protege, and wanted some opinions. Moreso, even if possible, I wonder if Protege would be able to infer new individuals of said class given instances of the objects that the class is defined in terms of.

I will illustrate with a simple example:

Consider the following instances:

  1. There are 2 resources (R1, R2)
  2. There are 4 tasks (T1, T2, T3, T4)
  3. T1 and T2 require R1
  4. T3 and T4 require R2

In this case, there should be two instances of SRD, where the first instance has two "hasTask" properties with tasks T1 and T2, and 1 "hasResource" property with R1. The second instance has two "hasTask" properties with tasks T3 and T4, and 1 "hasResource" property with R2.

Any thoughts on:

  1. how SRD could be defined in this case, if at all?
  2. If not directly expressible, are there any suggested workarounds (for example, defining tasks, resources and their relation in the ontology and then defining SRD instances externally via some rdflib python script)?

So far, I have SRD ⊑ =1 hasResource.Resource ⊓ >=2 hasTask.(Task ⊓ requiredBy.Resource). But of course, there are two issues with this definition:

  1. there is no guarantee that the resource in the hasResource relation is the same as the Resource in the hasTask relation
  2. there are no guarantees that the >=2 Tasks in the hasTask relations require the same Resource.

Solution

  • There is no way to express "the set of individuals related to the same individual" except when that same individual is named. But then you will need to define the set explicitly for each named individual. I.e., if your resources are finite and known, you could define the resources R1, ...,rn as individuals. Then you can define the set of tasks requiring R1 as SRD_R1 \equiv hasResource.R1, but then you have to do it for R2...Rn, which is not ideal nor generalizable.

    However, you could do this with SWRL:

     hasResource(?task1, ?resource), hasResource(?task2, ?resource) -> SDR(?resource)