0

I am trying to capture a conflict using SWRL rules. I learned that SWRL do support rules with empty head(consequent). But the Protege does not allow defining such rules. A dummy example of what I am trying to achieve is

Person(?x)^hasSon(?x,?y)^hasDaughter(?x,?y)->

Meaning that it is not possible that a person can be linked with a same individual both by hasSon and hasDaughter properties. If it is not possible in protege, please guide me on how to achieve this alternatively.

1 Answers1

0

The rule body can be empty, but it does not imply a contradiction, as in your intentions; it is interpreted as the rule not applying. The specs are here.

If I understand your intent correctly, what you are after can be achieved by creating two classes: define an exact cardinality restriction of 0 for hasSon and an exact cardinality restriction of 0 for hasDaughter, then assign these classes as range of hasDaughter and hasSon respectively.

This way, stating that A hasSon B and A hasDaughter B will cause an inconsistency.

Ignazio
  • 10,504
  • 1
  • 14
  • 25
  • Thanks for your feedback. I am talking of the head (consequent) being empty (not the body as you mentioned). The link you shared state that "An empty antecedent is treated as trivially holding (true), and an empty consequent is treated as trivially not holding (false)." Here, with 'trivially not holding', I infer that the conjunction of axioms in the antecedent (as given in my example) cannot hold together, if the consequent is empty and same is what i want. But the query is that SWRL tab in protege does not support this feature (leaving consequent empty), which is confusing for me – Mujahid Mohsin Jun 12 '16 at 09:49
  • Swrl rules add axioms to an ontology during execution. A rule with no consequent would never have any effect and therefore no utility. – Ignazio Jun 12 '16 at 22:33