Help with reasoning - keeps thinking

Hi guys,

So I have a bunch of data, an ontology and some rulesets that combined should give me some results.

The basics of it is this:

I have some instances of rdf:type ifcowl:IfcWallStandardCase.

My ontology states that a class ccs:WallStructure owl:equivalentClass ifcowl:IfcWallStandardCase .
Then I do some computing and I get results like this for the following properties:
?wall ccs:singleLevelID “AD2”
?wall ccs:typeID “AD1” …

Another property related to this is ccs:singleLevelLocationAtID that is found from the following ruleset:

# Rule for CCSSingleLevelLocationAtID for elements inside storey->space (Lokations-ID). 
[] a rule:SPARQLRule ;
    rule:content """
            IF {
            ?relcontains a ifcowl:IfcRelContainedInSpatialStructure ;
                    ifcowl:relatedElements_IfcRelContainedInSpatialStructure ?el ;
                    ifcowl:relatingStructure_IfcRelContainedInSpatialStructure  ?space .        
            ?space a ifcowl:IfcSpace ;
                    ccs:singleLevelID ?SpaceID .         
            ?rel a ifcowl:IfcRelAggregates ;
                ifcowl:relatingObject_IfcRelAggregates ?storey ;
                ifcowl:relatedObjects_IfcRelAggregates ?space .

            ?storey ccs:singleLevelID ?sID .   

            ?el ccs:singleLevelID ?elID . 

            BIND(REPLACE(?SpaceID, "#", " ", "i") AS ?sID2)  

            BIND (CONCAT("++", ?sID, ".", ?sID2 , "." , ?elID) AS ?elementinspaceID)                
            THEN {
            ?el ccs:singleLevelLocationAtID ?elementinspaceID .     

This is partly based on the dataset, but also on the following rulesets:

# Rule for Storey classification and identification . 
[] a rule:SPARQLRule ;
    rule:content """
            IF {
            ?storey a ifcowl:IfcBuildingStorey ;
                ifcowl:name_IfcRoot/express:hasString ?string . 

            BIND (substr(?string, strlen(?string)) AS ?levelno) .

            ## E is the prefix for storey ## 
            BIND (CONCAT("E", ?levelno) AS ?storeyID)
            THEN {
            ?storey ccs:singleLevelID ?storeyID .
# Rule for Space classification and identification . 
[] a rule:SPARQLRule ;
    rule:content """
            IF {
            ?space a ifcowl:IfcSpace ;
                ifcowl:name_IfcRoot/express:hasString ?roomno .

            ## R is the prefix for space ## 
            BIND (CONCAT("#","R", ?roomno) AS ?spaceID)
            THEN {
            ?space ccs:singleLevelID ?spaceID .

So to sum it up and get the results I want i run the following query in the Stardog webdatabase:

select *

where {
  ?uri a ccs:WallStructure ; 
        ifcowl:globalId_IfcRoot/express:hasString ?guid ; 
        ccs:singleLevelID ?ID .
  OPTIONAL {?uri ifcowl:objectType_IfcObject/express:hasString ?type2 .}
  OPTIONAL {?uri ccs:typeID ?typeID .}
  OPTIONAL {?uri ccs:topNode ?topNode .}
  OPTIONAL {?uri ccs:singleLevelLocationAtID ?locationID .}

But when I run this it just keep thinking (the blue bar to just seems to be loading) and my testcase only has 14 instances of ccs:WallStructure … So i dont know what to do about this… is the rules too much for the reasoner? Can I make the reasoner work faster? Any input would be appreciated.

Hi Arbaz,

The first thing to do if the query is not returning is to check the stardog.log file on the server. Are there any error messages?


Hey Arbaz,

Make sure you toggle “SL” reasoning in the stardog. You do so by (1) go to database admin pannel, (2) turn off the database, (3) click “edit” (4) choose “SL” reasoning.
Sometime stardog halts for no reason. I have been encountering halting-forever lots of times. I found “turn it off and turn it on again” pretty useful.

good luck.

I get the following message:

ERROR 2017-04-11 14:14:56,838 [Stardog.Executor-120] com.complexible.common.protocols.server.rpc.ServerHandler:exceptionCaught(413): exceptionCaughtServerHandler
com.complexible.stardog.server.UnknownDatabaseException: Database ‘watchdog’ does not exist.
at com.complexible.stardog.server.UnknownDatabaseException.create( ~[stardog-core-shared-4.2.jar:?]
at com.complexible.stardog.protocols.http.annex.WebConsole.handleMessage( ~[stardog-webconsole-annex-4.2.jar:?]
at com.complexible.common.protocols.server.rpc.ServerHandler.lambda$handleMessage$1( ~[stardog-protocols-api-server-4.2.jar:?]
at java.util.concurrent.Executors$ Source) [?:1.8.0_121]
at Source) [?:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$ Source) [?:1.8.0_121]
at Source) [?:1.8.0_121]

I tried this, but no luck

I believe that the watchdog database may be an internal system database that supports the watchdog monitoring feature. I’m not sure why you’re having a problem but it might be corrupt, a permission problem, you may have accidentally deleted something, licensing issue (I can’t remember if that’s an enterprise feature) etc.

Depending on what the state of your database you could try shutting down Stardog removing all your database directories and the system directory and it will probably come back up ok. or you could simply reinstall Stardog from scratch. Obviously this doesn’t really solve the immediate problem and you would have to reload all your data.

Watchdog is, in fact, an Enterprise-only feature.

Is there any chance you were using a 30-day evaluation license and it expired? I’ve always been a little hazy about what exactly happens to the 30-day eval license once it expires. Will it stop working completely or will it simply revert to a community license?

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