Galigator / openllet

Openllet is an OWL 2 reasoner in Java, build on top of Pellet.
https://www.w3.org/TR/owl2-primer/
Other
96 stars 26 forks source link

Unsupported rule Rule #67

Closed amin101 closed 2 years ago

amin101 commented 2 years ago

I am using openllet 2.6.3 and owlapi 5.1.19 . have some swrl rules created by protege :

Patient(?patient) ^ Has_EDSS(?patient, ?edss) ^ swrlb:lessThan(?edss, 7777) ->Should_be_used(?patient,:_Treadmill_walking)

but i get error:

Exception in thread "main" openllet.atom.OpenError: Unsupported rule Rule([Patient(?patient), Has_EDSS(?patient,?edss), lessThan([?edss, "7777"^^integer])] => [Should_be_used(?patient,_Treadmill_walking)])
    at openllet.core.rules.ContinuousRulesStrategy.complete(ContinuousRulesStrategy.java:208)

Caused by: java.lang.UnsupportedOperationException: Builtin using unsafe variables: [lessThan([?edss, "7777"^^integer])]
    at openllet.core.rules.rete.Compiler.compile(Compiler.java:235)
    at openllet.core.rules.ContinuousRulesStrategy.complete(ContinuousRulesStrategy.java:204)

also I open the question in stackoverflow

Galigator commented 2 years ago

This is strange because there is a test case in https://github.com/Galigator/openllet/blob/2.6.3/module-owlapi/src/test/java/openllet/pellet/owlapi/test/TestBasic.java#L506 for the lessThan swrlb predicat. Could you give more detail about your ontology ? A sub-ontology that just throw the exception could be nice.

amin101 commented 2 years ago

This error was due to the definition of a object property of the same name with data property.removing the object property and modifying swrl rule resolved the issue