Saturation was interrupted

10 views
Skip to first unread message

Mads Holten Rasmussen

unread,
Dec 13, 2016, 4:03:18 AM12/13/16
to Stardog
Hi

Sometimes I experience that the reasoner won't run. It seems pretty random when this happens, and the only error in the log is the following:

WARN  2016-12-13 09:56:42,583 [StardogServer.WorkerGroup-4] com.clarkparsia.blackout.Saturator:saturate(104): Saturation was interrupted. Query results might be incomplete.

Any ideas what can be wrong? 

Michael Grove

unread,
Dec 13, 2016, 7:41:20 AM12/13/16
to stardog
It means that rewriting the query could not be completed in the time allowed. Rewriting is done at query time so if you're not seeing it all the time, it suggest that some queries are more complex than others and can more easily run into the rewriting timeout.

Cheers,

Mike

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+unsubscribe@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

Mads Holten Rasmussen

unread,
Dec 13, 2016, 4:07:41 PM12/13/16
to Stardog
I don't understand why this should suddenly take too long. Usually I would get response in less than a second when it works. The database contains only 82 triples.


On Tuesday, 13 December 2016 13:41:20 UTC+1, Michael Grove wrote:
It means that rewriting the query could not be completed in the time allowed. Rewriting is done at query time so if you're not seeing it all the time, it suggest that some queries are more complex than others and can more easily run into the rewriting timeout.

Cheers,

Mike
On Tue, Dec 13, 2016 at 4:03 AM, Mads Holten Rasmussen <mads.h.r...@gmail.com> wrote:
Hi

Sometimes I experience that the reasoner won't run. It seems pretty random when this happens, and the only error in the log is the following:

WARN  2016-12-13 09:56:42,583 [StardogServer.WorkerGroup-4] com.clarkparsia.blackout.Saturator:saturate(104): Saturation was interrupted. Query results might be incomplete.

Any ideas what can be wrong? 

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to

Michael Grove

unread,
Dec 13, 2016, 8:35:59 PM12/13/16
to stardog
It's difficult to provide any more insight based on a fragment from a log.

If you can provide the query where this happens and the data, we're happy to dig in and take a look.

Cheers,

Mike

Mads Holten Rasmussen

unread,
Dec 14, 2016, 4:00:25 AM12/14/16
to sta...@clarkparsia.com
I see. My problem is that my rules are suddenly not working. Here is an example of a rule:

@prefix rule:   <tag:stardog:api:context:all:rule:> .
@prefix po:     <http://www.example.com/pipeOnt#> .
@prefix p:      <http://www.example.com/pipe/> .
@prefix rdfs:   <http://www.w3.org/2000/01/rdf-schema#> .
 
[] a rule:SPARQLRule ;
    rdfs:label "Outer diameter from inner diameter and material thickness" ;
    rule:content """
        PREFIX :<urn:test:>
            IF {
                ?p a po:Pipe ;
                    po:innerDiameter ?di ;
                    po:materialThickness ?t
                BIND (2 * ?t + ?di AS ?do)
            }
            THEN {
                ?p po:outerDiameter ?do
            }""".

Reasoning type is set to SL and TBox named graph is set to *. TBox and RBox are in separate named graphs.

In my ABox I have the following triples defined:
p:pipeA a po:Pipe ;
po:innerDiameter 11 ;
po:materialThickness 2.5 .

With reasoning on the following query:
SELECT * WHERE {p:pipeA ?p ?o}
 
should give me a new triple: 
 p:pipeA po:outerDiameter 16

---
You received this message because you are subscribed to the Google Groups "Stardog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stardog+unsubscribe@clarkparsia.com.



--
--------
Mads Holten Rasmussen
Civilingeniør, Bygningsdesign
M.Sc. Architectural Engineering

Mads Holten Rasmussen

unread,
Dec 14, 2016, 8:54:47 AM12/14/16
to sta...@clarkparsia.com
I tried on my mac and still with no luck. I then discovered that 

@prefix rule:   <tag:stardog:api:context:all:rule:> .

Should have been

 @prefix rule:   <tag:stardog:api:rule:> . 

Michael Grove

unread,
Dec 14, 2016, 9:22:40 AM12/14/16
to stardog
On Wed, Dec 14, 2016 at 8:54 AM, Mads Holten Rasmussen <mads.h.r...@gmail.com> wrote:
I tried on my mac and still with no luck. I then discovered that 

@prefix rule:   <tag:stardog:api:context:all:rule:> .

Should have been

 @prefix rule:   <tag:stardog:api:rule:> . 

Right. When I use your query, rule, and data snippet, I'm consistently getting the correct result in about 100ms on my rather underpowered laptop. I do not see the warning message you mention. If you can amend the example such that it exhibits the behavior you're seeing, we can take a deeper look.

Cheers,

Mike

Mads Holten Rasmussen

unread,
Dec 14, 2016, 11:16:50 AM12/14/16
to sta...@clarkparsia.com
Well it works now, so I am happy. I have another question if I may. Is it possible to define the output of a rule to include a blank node? If I was to use qudt for units I might want to state the output of above rule as the following:

?p po:outerDiameter [ qudt:unit unit:Millimeter ; qudt:value ?o ]

Jess Balint

unread,
Dec 14, 2016, 12:15:01 PM12/14/16
to sta...@clarkparsia.com
You can create a new individual as described in the docs:


Best,
Jess

Mads Holten Rasmussen

unread,
Dec 15, 2016, 4:44:29 AM12/15/16
to sta...@clarkparsia.com
In order for this to work I would have to do two binds, and that doesn't work for me. Can you help me with what I am doing wrong?

[] a rule:SPARQLRule ;
    rdfs:label "Outer diameter from inner diameter and material thickness" ;
    rule:content """
        PREFIX p:<http://example.com/pipe/>
        PREFIX po:<http://example.com/pipeOnt#>
        PREFIX qudt:<http://qudt.org/schema/qudt#>
        PREFIX unit:<http://qudt.org/vocab/unit#>
            IF {
                ?p a po:Pipe ;
                    po:innerDiameter ?di ;
                    po:materialThickness ?t .
                BIND (2 * ?t + ?di AS ?do) .
                BIND (UUID() AS ?blank) .
            }
            THEN {
                ?p po:outerDiameter ?blank .
                ?blank qudt:unit unit:Millimeter ;
                           qudt:value ?do . 
            }""".

I can get a blank node with the following, but the combination doesn't work..
 
[] a rule:SPARQLRule ;
    rdfs:label "Outer diameter from inner diameter and material thickness" ;
    rule:content """
        PREFIX p:<http://example.com/pipe/>
        PREFIX po:<http://example.com/pipeOnt#>
            IF {
                ?p a po:Pipe ;
                    po:innerDiameter ?di ;
                    po:materialThickness ?t .
                BIND (UUID() AS ?blank) .
            }
            THEN {
                ?p po:outerDiameter ?blank .
            }""".

Jess Balint

unread,
Dec 15, 2016, 1:12:30 PM12/15/16
to sta...@clarkparsia.com
The modeling for this gets a bit cumbersome because "rules with more than one atom in the head are broken up into several rules" [1]. You will need to create the "outer diameter" instance using UUID in a rule separate from the one in which you assign the properties. i.e.:

  [] a rule:SPARQLRule ;
    rule:content """
        PREFIX p:<http://example.com/pipe/>
        PREFIX po:<http://example.com/pipeOnt#>
        PREFIX qudt:<http://qudt.org/schema/qudt#>
        PREFIX unit:<http://qudt.org/vocab/unit#>
            IF {
                ?p a po:Pipe ;
                    po:outerDiameter ?od ;
                    po:innerDiameter ?di ;
                    po:materialThickness ?t .
                BIND (2 * ?t + ?di AS ?do) .
            }
            THEN {
                ?od qudt:value ?do ; qudt:unit unit:Millimeter . 
            }""".
[] a rule:SPARQLRule ;
    rdfs:label "Outer diameter from inner diameter and material thickness" ;
    rule:content """
                ?p a po:Pipe.
                BIND (UUID() AS ?blank) .
            }
            THEN {
                ?p po:outerDiameter ?blank .
            }""".
Hope this helps.
Jess

Mads Holten Rasmussen

unread,
Dec 16, 2016, 4:30:12 AM12/16/16
to sta...@clarkparsia.com
I see. This is a problem when there is more than one pipe instance since all ?od instances will be bound to the ?blank node. I don't see how this can be solved in a smart way..

Jess Balint

unread,
Dec 16, 2016, 12:42:37 PM12/16/16
to sta...@clarkparsia.com
Looks like this is a bug with rule reasoning due to the use of the non-deterministic UUID function. You can create a unique deterministic new individual as follows:
[] a rule:SPARQLRule ;
    rdfs:label "Outer diameter from inner diameter and material thickness" ;
    rule:content """
        PREFIX p:<http://example.com/pipe/>
        PREFIX po:<http://example.com/pipeOnt#>
        PREFIX qudt:<http://qudt.org/schema/qudt#>
        PREFIX unit:<http://qudt.org/vocab/unit#>
            IF {
                ?p a po:Pipe.
                BIND (iri(concat(str(?p), "_OD")) AS ?blank) .
            }
            THEN {
                ?p po:outerDiameter ?blank .
            }""".
I tested this combined with the value/unit rule using multiple pipe instances and it's working as expected.

Jess

Mads Holten Rasmussen

unread,
Dec 19, 2016, 6:47:13 AM12/19/16
to sta...@clarkparsia.com
Thanks Jess. Unfortunately this slows down the reasoning quite significantly.

Martynas Jusevičius

unread,
Dec 19, 2016, 7:06:54 AM12/19/16
to sta...@clarkparsia.com
Mads,

do you really need the reasoning on the fly? Can't you materialize the
rules using CONSTRUCT?

Martynas

On Mon, Dec 19, 2016 at 12:47 PM, Mads Holten Rasmussen
>>>>>>>>>>> ---
>>>>>>>>>>> You received this message because you are subscribed to the
>>>>>>>>>>> Google Groups "Stardog" group.
>>>>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>>>>> send an email to stardog+u...@clarkparsia.com.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> --------
>>>>>>>>>> Mads Holten Rasmussen
>>>>>>>>>> Civilingeniør, Bygningsdesign
>>>>>>>>>> M.Sc. Architectural Engineering
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> --------
>>>>>>>>> Mads Holten Rasmussen
>>>>>>>>> Civilingeniør, Bygningsdesign
>>>>>>>>> M.Sc. Architectural Engineering
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> -- --
>>>>>>>>> You received this message because you are subscribed to the C&P
>>>>>>>>> "Stardog" group.
>>>>>>>>> To post to this group, send email to sta...@clarkparsia.com
>>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>>> stardog+u...@clarkparsia.com
>>>>>>>>> For more options, visit this group at
>>>>>>>>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> -- --
>>>>>>>> You received this message because you are subscribed to the C&P
>>>>>>>> "Stardog" group.
>>>>>>>> To post to this group, send email to sta...@clarkparsia.com
>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>> stardog+u...@clarkparsia.com
>>>>>>>> For more options, visit this group at
>>>>>>>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>>>>>>>> ---
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "Stardog" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>> send an email to stardog+u...@clarkparsia.com.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> --------
>>>>>>> Mads Holten Rasmussen
>>>>>>> Civilingeniør, Bygningsdesign
>>>>>>> M.Sc. Architectural Engineering
>>>>>>>
>>>>>>> --
>>>>>>> -- --
>>>>>>> You received this message because you are subscribed to the C&P
>>>>>>> "Stardog" group.
>>>>>>> To post to this group, send email to sta...@clarkparsia.com
>>>>>>> To unsubscribe from this group, send email to
>>>>>>> stardog+u...@clarkparsia.com
>>>>>>> For more options, visit this group at
>>>>>>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>>>>>>
>>>>>>
>>>>>> --
>>>>>> -- --
>>>>>> You received this message because you are subscribed to the C&P
>>>>>> "Stardog" group.
>>>>>> To post to this group, send email to sta...@clarkparsia.com
>>>>>> To unsubscribe from this group, send email to
>>>>>> stardog+u...@clarkparsia.com
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>>>>>> ---
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "Stardog" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>>> an email to stardog+u...@clarkparsia.com.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> --------
>>>>> Mads Holten Rasmussen
>>>>> Civilingeniør, Bygningsdesign
>>>>> M.Sc. Architectural Engineering
>>>>>
>>>>> --
>>>>> -- --
>>>>> You received this message because you are subscribed to the C&P
>>>>> "Stardog" group.
>>>>> To post to this group, send email to sta...@clarkparsia.com
>>>>> To unsubscribe from this group, send email to
>>>>> stardog+u...@clarkparsia.com
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>>>>
>>>>
>>>> --
>>>> -- --
>>>> You received this message because you are subscribed to the C&P
>>>> "Stardog" group.
>>>> To post to this group, send email to sta...@clarkparsia.com
>>>> To unsubscribe from this group, send email to
>>>> stardog+u...@clarkparsia.com
>>>> For more options, visit this group at
>>>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Stardog" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to stardog+u...@clarkparsia.com.
>>>
>>>
>>>
>>>
>>> --
>>> --------
>>> Mads Holten Rasmussen
>>> Civilingeniør, Bygningsdesign
>>> M.Sc. Architectural Engineering
>>>
>>> --
>>> -- --
>>> You received this message because you are subscribed to the C&P "Stardog"
>>> group.
>>> To post to this group, send email to sta...@clarkparsia.com
>>> To unsubscribe from this group, send email to
>>> stardog+u...@clarkparsia.com
>>> For more options, visit this group at
>>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>>
>>
>> --
>> -- --
>> You received this message because you are subscribed to the C&P "Stardog"
>> group.
>> To post to this group, send email to sta...@clarkparsia.com
>> To unsubscribe from this group, send email to
>> stardog+u...@clarkparsia.com
>> For more options, visit this group at
>> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Stardog" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to stardog+u...@clarkparsia.com.
>
>
>
>
> --
> --------
> Mads Holten Rasmussen
> Civilingeniør, Bygningsdesign
> M.Sc. Architectural Engineering
>
> --
> -- --
> You received this message because you are subscribed to the C&P "Stardog"
> group.
> To post to this group, send email to sta...@clarkparsia.com
> To unsubscribe from this group, send email to
> ---
> You received this message because you are subscribed to the Google Groups
> "Stardog" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to stardog+u...@clarkparsia.com.

Zachary Whitley

unread,
Dec 19, 2016, 7:27:37 AM12/19/16
to sta...@clarkparsia.com
That's surprising. Can you quantify, "quite significantly"?
Reply all
Reply to author
Forward
0 new messages