Stardog Rule with multiple filter conditions

Hey,
i’m experiencing some trouble with the Stardog Rules.
Assert I have this Rule:

IF {

        ?c a sick:Component ; 
           sosa:isFeatureOfInterestOf [
                sosa:hasFeatureOfInterest ?c ;
                a sosa:Observation ;
                sosa:observedProperty aoi:x-shift ;
                sosa:hasSimpleResult ?x 
           ] , [
                sosa:hasFeatureOfInterest ?c ;
                a sosa:Observation ;
                sosa:observedProperty aoi:y-shift ;
                sosa:hasSimpleResult ?y 
           ] .

        aoi:thresholds sick:x-shift-threshold ?x_thres ;
                       sick:y-shift-threshold ?y_thres  .

        FILTER (?x > ?x_thres )    

    } THEN {
    	?c a aoi:BadComponent-X
    
    }

With an Observation being:

<http://localhost/concept/observations/1> rdf:type owl:NamedIndividual ,
                                               sosa:Observation ;
                                      sosa:hasFeatureOfInterest <http://localhost/concept/material/component#c1-1> ;
                                      sosa:madeBySensor <http://localhost/concept/equipment/AOI_SMD407> ;
                                      sosa:observedProperty aoi:x-shift ;
                                      sosa:hasSimpleResult 3 ;
                                      sosa:resultTime "2016-05-18T12:55:27.954"^^xsd:dateTime .

And a component:

<http://localhost/concept/material/component#c1-1> rdf:type owl:NamedIndividual , 
                                                   sick:Component .

One can assume that

sosa:isFeatureOfInterestOf is the inverse of sosa:hasFeatureOfInterest

and this is inferred.

Still the rule execution triggers this

WARN  2017-10-24 18:02:31,086 [XNIO-1 task-3] com.clarkparsia.pellet.rules.FilterBindingHelper:rebind(53): 
Function evaluation error
java.lang.ClassCastException: null

I don’t get it.

As target I want to increase the FILTER condition with additional statements, like y-shift > someThreshold. Still, that doesn’t work.

Thanks, I appreciate every help!

Hi,

Is there a more detailed error in stardog.log?

Nope, unfortunately not.

But there’s one thing:
I do need DL Reasoning… is Stardog rule reasoning fully compatible with DL reasoning?
Or do I need to use SL?

Stardog (and SWRL) rules are only available when the reasoning type is SL

1 Like

Hey, so I changed my ontology to be conform with OWL 2 RL (some axioms still not adopted, but reasoning takes place).

But I still experience some problems regarding rule reasoning:

IF {

      ?c a sick:Component ; 
          sosa:isFeatureOfInterestOf [
            a sosa:Observation ;
            sosa:hasFeatureOfInterest ?c ;
            sosa:observedProperty aoi:x-shift ;
            sosa:hasSimpleResult ?x          
          ] , [
            a sosa:Observation ;
            sosa:hasFeatureOfInterest ?c ;
            sosa:observedProperty aoi:y-shift ;
            sosa:hasSimpleResult ?y
          ] , [
            a sosa:Observation ;
            sosa:hasFeatureOfInterest ?c ;
            sosa:observedProperty aoi:twisting ;
            sosa:hasSimpleResult ?z
          ] .  

        
      FILTER (?x > 0 && ?y > 0 && ?z > 0)    

    } THEN {
        ?c a aoi:BadComponent .
    
    }

If the rule contains only two (filter) conditions, everything works fine and the rule gets fired.
If I add the third (?z) condition, the rule doesnt fire.

The stardog.log file sometimes mentions this part:

WARN  2017-10-25 15:56:41,735 [XNIO-1 task-7] com.clarkparsia.blackout.Saturator:saturate(104): Saturation was interrupted. Query results might be incomplete.

Seems as the computation takes too long or sth… any tipps how to increase the performance?

As I mentioned, stardog.log warns about some axioms being not conform with SL, but they dont conflict with the
rule and they should be in OWL 2 RL. So I don’t get it, again, where’s the poop? :slight_smile:

Thanks!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.