1

I would like to write the following rule in SWRL:

Each instance of A is a subclass of B

This is what I entered as a SWRL rule in Protege:

A(?x1) -> subClassOf(?x1, B)

Error:

Invalid OWL individual name 'B'

enter image description here

Nix
  • 176
  • 1
  • 10
  • You can't use TBox built-ins in SWRL that's why the editor expects always individuals to be the arguments of relations. – UninformedUser Aug 25 '17 at 14:22
  • @AKSW can you link a reference to the limitation? Is there a way to express such rule in Protege? – Nix Aug 25 '17 at 15:53
  • 1
    You can find the syntax in the [W3C submission](https://www.w3.org/Submission/SWRL/) : in particular in Sec. 2.1 it states `atom ::= description '(' i-object ')' | dataRange '(' d-object ')' | individualvaluedPropertyID '(' i-object i-object ')' | datavaluedPropertyID '(' i-object d-object ')' | sameAs '(' i-object i-object ')' | differentFrom '(' i-object i-object ')' | builtIn '(' builtinID { d-object } ')'` Yours would be `individualvaluedPropertyID`, thus, individuals are expected. – UninformedUser Aug 26 '17 at 13:57
  • You can try to create an individual `B` in your ontology, i.e. you explicitly use punning. Then the parser shouldn't complain. What the reasoner does, I don't know- try it out as this is beyond SWRL. – UninformedUser Aug 26 '17 at 14:00
  • 2
    As an alternative, you could have a look at the SWRLAPI, which has some [TBox built-ins](https://github.com/protegeproject/swrlapi/wiki/SWRLTBoxBuiltInLibrary), e.g. `tbox:sca(?c, B)`, but this only works with the SWRLTab in Protege. – UninformedUser Aug 26 '17 at 14:01
  • @AKSW I tried `tbox.sca` and it does indeed pass the syntax check in the SWRLTab. I can't find a reasoner capable of handling such rule, this is the error I get using HermiT: `An error occurred during reasoning: A SWRL rule uses a built-in atom, but built-in atoms are not supported yet..`. You may combine your comments into an answer and I'll accept it. Thanks! – Nix Aug 28 '17 at 20:07
  • 1
    This are non-standard SWRL built-ins, thus, there is no such reasoner that can handle this built-in as it doesn't know how. It's just an extension by the SWRLAPI - sorry to say that. – UninformedUser Aug 28 '17 at 23:10

0 Answers0