Search code examples
owlprotegenegationswrl

Does SWRL support classical negation in Protege?


I wanted to try the following rule:

(not Person)(?x) -> NonHuman(?x) which is provided here - https://github.com/protegeproject/swrlapi/wiki/SWRLLanguageFAQ#does-swrl-support-classical-negation

and i got this: enter image description here

Is classical negation supported in Protege 5.5.0? If yes, how I can make the following rule to be okay? Thanks in advance!


Solution

  • From https://github.com/protegeproject/swrlapi/issues/63:

    Unfortunately, the SWRLAPI's parser does not support OWL class expressions in rules.
    There is no timeline for their inclusion.

    Fortunately, one can use the Rules view (Windows > Views > Ontology Views > Rules):

    Rule: (not Person)(?x) -> NonHuman(?x) is parsed correctly and works as intended.


    Actually, you do not need SWRL in this particlular case. Just write (not Person) SubClassOf NonHuman in the General class axioms section, or define NonPerson first, if you don't like GCI axioms.

    Don't forget about the OWA.