[Stardog 2.0.1 & Stardog 2.0.0] Constraint troubles & NullpointerException for reasoning explain

0 views
Skip to first unread message

Florian Orpeliere

unread,
Oct 16, 2013, 10:45:59 AM10/16/13
to sta...@clarkparsia.com
Hello everyone,

we work in a research laboratory in University of Burgundy on Web Semantic.

We have three problems. 
The first is on reasoning with constraints on the model. Indeed, we have create a functional dataproperty with boolean range. When we try to update it with a SPARQL Update (DELETE+INSERT), Stardog explain "Prepare phase failed, all transactions were rolled back". Why is not possible to do an update ? Knowing that we configured the database like that : 

icv.enabled=true
icv
.reasoning.type=EL
reasoning
.consistency.automatic=true
icv
.consistency.automatic=true


The second problem is on reasoning explain. We wish use reasoning explain with SL level (because data is infered due to SWRL rules) and we have a NullPointerExcepetion : 

K:\Projets\stardog-2.0.1\bin>stardog reasoning explain "testSmart;reasoning=SL" explain.nt
java.lang.NullPointerException

K:\Projets\stardog-2.0.1\bin>stardog reasoning explain "testSmart;reasoning=DL" explain.nt
Input axiom is not a valid inference; no explanation generated.

explain.nt contains : <http://url/example#Area1> <http://url/example#hasPathTo> <http://url/exemple#Area2>.


Finally, the last problem is transitive property. When we use a swrl rule, this property doesn't work anymore. We previously test our model in Protégé and the expected reasoning is good.
The model is link to this post in OWL format and we link to a picture of Protégé : 

In Stardog, when we execute a SPARQL query, we obtain : 

K:\Projets\stardog-2.0.1\bin>stardog query "testSmart;reasoning=SL" "select ?y {
test:Area1 test:hasPathTo ?y.}"
+------------+
|     y      |
+------------+
| test:Area1 |
| test:Area2 |
+------------+

While, we expect : 

+------------+
|     y      |
+------------+
| test:Area1 |
| test:Area2 |
| test:Area3 |
+------------+

Thanks in advance for your help.

Sincerely,

Florian

PS: Sorry for my bad english

test.owl

Héctor Pérez-Urbina

unread,
Oct 17, 2013, 8:59:04 AM10/17/13
to stardog
Hi Florian,

Thank you for your email. We will look into the issues you reported and get back to you shortly.


--
-- --
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



--
Best,
Héctor

Héctor Pérez-Urbina

unread,
Oct 23, 2013, 2:48:52 PM10/23/13
to stardog
Hi Florian,

Here's a little update.


On Thu, Oct 17, 2013 at 8:59 AM, Héctor Pérez-Urbina <hec...@clarkparsia.com> wrote:
Hi Florian,

Thank you for your email. We will look into the issues you reported and get back to you shortly.


On Wed, Oct 16, 2013 at 10:45 AM, Florian Orpeliere <florian....@gmail.com> wrote:
Hello everyone,

we work in a research laboratory in University of Burgundy on Web Semantic.

We have three problems. 
The first is on reasoning with constraints on the model. Indeed, we have create a functional dataproperty with boolean range. When we try to update it with a SPARQL Update (DELETE+INSERT), Stardog explain "Prepare phase failed, all transactions were rolled back". Why is not possible to do an update ? Knowing that we configured the database like that : 

icv.enabled=true
icv
.reasoning.type=EL
reasoning
.consistency.automatic=true
icv
.consistency.automatic=true



I think the problem might be that a constraint is being violated. Would you mind sending the ontology and the query?
 
The second problem is on reasoning explain. We wish use reasoning explain with SL level (because data is infered due to SWRL rules) and we have a NullPointerExcepetion : 

K:\Projets\stardog-2.0.1\bin>stardog reasoning explain "testSmart;reasoning=SL" explain.nt
java.lang.NullPointerException

K:\Projets\stardog-2.0.1\bin>stardog reasoning explain "testSmart;reasoning=DL" explain.nt
Input axiom is not a valid inference; no explanation generated.

explain.nt contains : <http://url/example#Area1> <http://url/example#hasPathTo> <http://url/exemple#Area2>.



We have found the problem regarding this problem. We are working on it right now; we'll include the fix in a future release.

Finally, the last problem is transitive property. When we use a swrl rule, this property doesn't work anymore. We previously test our model in Protégé and the expected reasoning is good.
The model is link to this post in OWL format and we link to a picture of Protégé : 

In Stardog, when we execute a SPARQL query, we obtain : 

K:\Projets\stardog-2.0.1\bin>stardog query "testSmart;reasoning=SL" "select ?y {
test:Area1 test:hasPathTo ?y.}"
+------------+
|     y      |
+------------+
| test:Area1 |
| test:Area2 |
+------------+

While, we expect : 

+------------+
|     y      |
+------------+
| test:Area1 |
| test:Area2 |
| test:Area3 |
+------------+


This bug has been fixed. We'll include the fix in the next release.
 
Thanks in advance for your help.

Sincerely,

Florian

PS: Sorry for my bad english

--
-- --
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



--
Best,
Héctor



--
Best,
Héctor

Florian Orpeliere

unread,
Oct 24, 2013, 2:32:15 PM10/24/13
to sta...@clarkparsia.com
Hi Héctor,

Thank you for your response.
I joined ontology to this post.
I defined a functional dataproperty with string range named "hasName", idefined too an person with "hasName "Toto"^^xsd:string".

If I try to insert a new triplet at this person, i violated the functional constraint, this is normal :

stardog query "smart;reasoning=EL" "INSERT DATA { functional:Toto functional:hasName \"Titi\"^^xsd:string.}"
Or
stardog query
"smart;reasoning=EL" "INSERT DATA { functional:Toto functional:hasName \"Titi\"^^<http://www.w3.org/2001/XMLSchema#string>.}"

Prepare phase failed, all transactions were rolled back

If I try to delete a new triplet at this person, i violated too the functional constraint.

stardog query "smart;reasoning=EL" "DELETE DATA { functional:Toto functional:hasName \"Toto\"^^xsd:string.}"
Or
stardog query 
"smart;reasoning=EL" "DELETE DATA { functional:Toto functional:hasName \"Toto\"^^<http://www.w3.org/2001/XMLSchema#string>.}"

Prepare phase failed, all transactions were rolled back

And, if I try do update, i have same problem :

stardog query "smart;reasoning=EL"
"DELETE { functional:Toto functional:hasName \"Toto\"^^xsd:string.}
INSERT { functional:Toto functional:hasName \"Titi\"^^xsd:string.}
WHERE {functional:Toto functional:hasName\"Toto\"^^xsd:string.}"

Prepare phase failed, all transactions were rolled back

Sinceraly,

Florian
functionalTest.owl

Héctor Pérez-Urbina

unread,
Oct 25, 2013, 5:20:31 PM10/25/13
to stardog
Hey Florian,

We tried the following, which worked as expected:

$ bin/stardog-admin db create -o icv.enabled=true icv.consistency.automatic=true icv.reasoning.type=SL -n smart ~/Downloads/functionalTest.owl

$ bin/stardog query "smart;reasoning=EL" "INSERT DATA { functional:Toto functional:hasName \"Titi\"^^xsd:string.}"

Prepare phase failed, all transactions were rolled back

$ bin/stardog query "smart;reasoning=EL" "DELETE DATA { functional:Toto functional:hasName \"Toto\"^^xsd:string.}"
Update query processed successfully.


Here, we are creating a DB containing the triples in functionalTest.owl, in which we (i) enable the guard mode for ICV, (ii) specify that we want to perform a consistency check after every transaction, and (iii) specify the reasoning level for ICV to SL [1]. Note, however, that we didn't add any constraint (via the icv command). A database for which no constraints are specified is always valid wrt ICV.

The INSERT fails not because of the ICV guard mode (remember, there are no constraints to be violated!), but because of the consistency check due to icv.consistency.automatic=true: the strings 'Toto' and 'Titi' cannot be inferred to be the same; therefore, we have a logical inconsistency. The DELETE succeeds because deleting this property assertion from the database causes no ICV violations or logical inconsistency.

In Stardog, the constraints must be kept separate from the data. It seems that the functionality axiom in your OWL file should be a constraint, whereas the property assertion should be in the database.

In any case, could you please let us know how exactly you created the db (and added the constraints in case you did)?



--
-- --
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



--
Best,
Héctor

Florian Orpeliere

unread,
Oct 28, 2013, 5:01:09 AM10/28/13
to sta...@clarkparsia.com
Hi Héctor,

I actually confused the ICV rules and consistency checking. I have not added ICV constraints because I made ​​the ontology with Protégé and constraints (eg functional) are in the model. In the future, I will separate the constraints of the model.
I did the following command to create my base : 

stardog-admin db create -n smart -o icv.enabled=true icv.reasoning.type=SL reasoning.consistency.automatic=true icv.consistency.automatic=true -- functionalTest.owl

With this command I had problems because I used : reasoning.consistency.automatic=true.

Thank you for your help.
Sinceraly,

Florian

Le mercredi 16 octobre 2013 16:45:59 UTC+2, Florian Orpeliere a écrit :
Reply all
Reply to author
Forward
0 new messages