2

Protege: Create a ontology with hierarchy that restrict a instances from using its ancestor to be its child

I have an ontology with class Activity. I want to create a hierarchy of activities. An activity can be decomposed into any number of subactivities. I created property “hasSubActivity”, transitive; and subproperty “hasChildActivity”, asymmetry and irreflexive. All the properties has the same domain and range in class Activity. I created a few instances of activities and it seems to work fine: hasChildActivity shows the direct subactivity while hasSubActivity show all the descendents. I also created the inverse properties already and they are ok too. Now I want to restrict so that the hierarchy stay linear, no previous activiy already in the hierarchy can be the child activities of the current one.For example: act1 has child act 2, act2 has child act 3 and so on until actn. Restrict that actn cannot have act1, act2 and so on to be the next child (actn+1)

I'm not sure how to do this, maybe with disjoint somehow?

Bao Luong
  • 21
  • 1
  • impossible in OWL and also impossible in SWRL because a) inference is monotonic and b) open world assumption holds. Maybe possible in SHACL via e.g. SPARQL (with usage of property path) rule . – UninformedUser May 21 '23 at 12:03
  • That's too bad. Thank you for the pointer. I'll check out SHACL instead – Bao Luong May 22 '23 at 09:11

0 Answers0