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:
there are tasks and resources. (
Task ⊑ Thing,Resource ⊑ Thing)tasks require resources. (
Task ⊑ requires.Resource) with inverserequiredBya shared resource dependency (
SRD) is when atleast two tasks require the same resource. The SRD class I am trying to create must have atleast two Tasks that require the same resource (i.e.>=2 hasTask.Task), and exactly 1 resource (i.e.=1 hasResource.Resource) which must be the resource through which the linked tasks both depend on.
Consider the following instances:
- There are 2 resources (R1, R2)
- There are 4 tasks (T1, T2, T3, T4)
- T1 and T2 require R1
- 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:
- how SRD could be defined in this case, if at all?
- 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:
- there is no guarantee that the resource in the
hasResourcerelation is the same as theResourcein thehasTaskrelation - there are no guarantees that the >=2
Tasksin thehasTaskrelations require the sameResource.
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, ...,rnas individuals. Then you can define the set of tasks requiringR1asSRD_R1 \equiv hasResource.R1, but then you have to do it forR2...Rn, which is not ideal nor generalizable.However, you could do this with SWRL: