[Pellet-users] InternalReasonerExceptions
Wolfgang May
may at informatik.uni-goettingen.de
Wed Jan 23 15:52:17 UTC 2008
Hi,
when playing with Pellet, I got some InternalReasonerExceptions.
I tried to reduce the ontology, and got two different
error messages for slightly different fragments:
* Adding type to a pruned node anon3 foo:bla#Nationalities
* java.lang.NullPointerException
at org.mindswap.pellet.Individual.getMaxCard(Individual.java:569)
You find more details below (the fragments themselves don't make too much
sense since they are stripped). The (hopefully) full ontology that also
results in the first of the above errors is also attached; its textual
description can be found at
http://www.dbis.informatik.uni-goettingen.de/Teaching/SemWeb/fish-puzzle.html
Best,
Wolfgang
********************************************************************
Building Model with inference support. Using Pellet-Plugin.
Exception in thread "main"
org.mindswap.pellet.exceptions.InternalReasonerException: Adding type to a
pruned node anon3 foo:bla#Nationalities
at org.mindswap.pellet.Individual.addType(Individual.java:212)
at
org.mindswap.pellet.CompletionStrategy.addType(CompletionStrategy.java:252)
at
org.mindswap.pellet.CompletionStrategy.applyDomainRange(CompletionStrategy.java:403)
at
org.mindswap.pellet.CompletionStrategy.applyPropertyRestrictions(CompletionStrategy.java:378)
at
org.mindswap.pellet.CompletionStrategy.addEdge(CompletionStrategy.java:368)
at
org.mindswap.pellet.CompletionStrategy.applySomeValuesRule(CompletionStrategy.java:1133)
at
org.mindswap.pellet.CompletionStrategy.applySomeValuesRule(CompletionStrategy.java:1025)
at
org.mindswap.pellet.CompletionStrategy.applySomeValuesRule(CompletionStrategy.java:985)
at
org.mindswap.pellet.SROIQStrategy.complete(SROIQStrategy.java:260)
at org.mindswap.pellet.ABox.isConsistent(ABox.java:1605)
at org.mindswap.pellet.ABox.isConsistent(ABox.java:1489)
at
org.mindswap.pellet.KnowledgeBase.consistency(KnowledgeBase.java:1568)
at
org.mindswap.pellet.KnowledgeBase.isConsistent(KnowledgeBase.java:1589)
at
org.mindswap.pellet.jena.PelletInfGraph.prepare(PelletInfGraph.java:267)
at
com.hp.hpl.jena.ontology.impl.OntModelImpl.prepare(OntModelImpl.java:2598)
at org.semwebtech.util.ParseRDF.prepareModel(ParseRDF.java:370)
at org.semwebtech.util.ParseRDF.printClassTree(ParseRDF.java:288)
at org.semwebtech.util.ParseRDF.main(ParseRDF.java:232)
********
The ontology (fragment)
*************************************************************************************
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix : <foo:bla#>.
:Houses a owl:Class;
owl:oneOf (:one :two :three :four :five);
rdfs:subClassOf
[ a owl:Restriction; owl:onProperty :nextTo; owl:maxCardinality 2 ].
#owl:AllDifferent owl:distinctMembers (:one :two :three :four :five).
:one :leftOf :two.
:two :leftOf :three.
:three :leftOf :four.
:four :leftOf :five.
:Nationalities a owl:Class;
owl:equivalentClass [ owl:oneOf (:gb :s :dk :n :d) ].
#owl:AllDifferent owl:distinctMembers (:gb :s :dk :n :d).
####
:livesIn a owl:FunctionalProperty;
a owl:InverseFunctionalProperty;
owl:inverseOf :ownedBy;
rdfs:domain :Nationalities;
rdfs:range :Houses.
:hasColor a owl:FunctionalProperty;
rdfs:domain :Houses.
:keepsAnimal a owl:FunctionalProperty;
a owl:InverseFunctionalProperty;
rdfs:domain :Nationalities;
rdfs:range :Animals.
# Die Hinweise:
:yellowHouse :hasColor :yellow.
# 08. Der Besitzer des gelben Hauses raucht Dunhill
[ a owl:Restriction;
owl:onProperty :livesIn; owl:hasValue :yellowHouse]
owl:equivalentClass
[ a owl:Restriction;
owl:onProperty :smokes; owl:hasValue :dunhill].
# 11. Der Mann, der ein Pferd haelt, wohnt neben dem, der Dunhill raucht
[ a owl:Restriction;
owl:onProperty :smokes; owl:hasValue :dunhill]
rdfs:subClassOf
[ a owl:Restriction;
owl:onProperty :livesIn; owl:someValuesFrom
[ a owl:Restriction;
owl:onProperty :nextTo; owl:someValuesFrom
[ a owl:Restriction;
owl:onProperty :ownedBy; owl:someValuesFrom
[ a owl:Restriction;
owl:onProperty :keepsAnimal; owl:hasValue :horse]]]].
# 13. Neben dem blauen Haus wohnt der Norweger
:n a
[ a owl:Restriction;
owl:onProperty :livesIn; owl:someValuesFrom
[ a owl:Restriction;
owl:onProperty :nextTo; owl:hasValue :blueHouse]].
*************************************************************************
Second one:
*************************************************************************
Building Model with inference support. Using Pellet-Plugin.
Exception in thread "main" java.lang.NullPointerException
at org.mindswap.pellet.Individual.getMaxCard(Individual.java:569)
at
org.mindswap.pellet.CompletionStrategy.addEdge(CompletionStrategy.java:345)
at
org.mindswap.pellet.CompletionStrategy.mergeIndividuals(CompletionStrategy.java:2126)
at
org.mindswap.pellet.CompletionStrategy.mergeTo(CompletionStrategy.java:2064)
at
org.mindswap.pellet.CompletionStrategy.applyFunctionalMaxRule(CompletionStrategy.java:749)
at
org.mindswap.pellet.CompletionStrategy.applyFunctionality(CompletionStrategy.java:417)
at
org.mindswap.pellet.CompletionStrategy.applyPropertyRestrictions(CompletionStrategy.java:381)
at
org.mindswap.pellet.CompletionStrategy.addEdge(CompletionStrategy.java:368)
at org.mindswap.pellet.GuessBranch.tryBranch(GuessBranch.java:71)
at org.mindswap.pellet.Branch.tryNext(Branch.java:99)
at
org.mindswap.pellet.CompletionStrategy.addEdge(CompletionStrategy.java:360)
at
org.mindswap.pellet.CompletionStrategy.applySomeValuesRule(CompletionStrategy.java:1133)
at
org.mindswap.pellet.CompletionStrategy.applySomeValuesRule(CompletionStrategy.java:1025)
at
org.mindswap.pellet.CompletionStrategy.applySomeValuesRule(CompletionStrategy.java:985)
at
org.mindswap.pellet.SROIQStrategy.complete(SROIQStrategy.java:260)
at org.mindswap.pellet.ABox.isConsistent(ABox.java:1605)
at org.mindswap.pellet.ABox.isConsistent(ABox.java:1489)
at
org.mindswap.pellet.KnowledgeBase.consistency(KnowledgeBase.java:1568)
at
org.mindswap.pellet.KnowledgeBase.isConsistent(KnowledgeBase.java:1589)
at
org.mindswap.pellet.jena.PelletInfGraph.prepare(PelletInfGraph.java:267)
at
com.hp.hpl.jena.ontology.impl.OntModelImpl.prepare(OntModelImpl.java:2598)
at org.semwebtech.util.ParseRDF.prepareModel(ParseRDF.java:370)
at org.semwebtech.util.ParseRDF.printClassTree(ParseRDF.java:288)
at org.semwebtech.util.ParseRDF.main(ParseRDF.java:232)
***************************************************************************
The fragment (just two lines are commented out):
***************************************************************************
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix : <foo:bla#>.
:Houses a owl:Class;
owl:oneOf (:one :two :three :four :five);
rdfs:subClassOf
[ a owl:Restriction; owl:onProperty :nextTo; owl:maxCardinality 2 ].
#owl:AllDifferent owl:distinctMembers (:one :two :three :four :five).
:one :leftOf :two.
:two :leftOf :three.
:three :leftOf :four.
:four :leftOf :five.
:Nationalities a owl:Class;
owl:equivalentClass [ owl:oneOf (:gb :s :dk :n :d) ].
#owl:AllDifferent owl:distinctMembers (:gb :s :dk :n :d).
####
:livesIn a owl:FunctionalProperty;
# a owl:InverseFunctionalProperty;
# owl:inverseOf :ownedBy;
rdfs:domain :Nationalities;
rdfs:range :Houses.
:hasColor a owl:FunctionalProperty;
rdfs:domain :Houses.
:keepsAnimal a owl:FunctionalProperty;
a owl:InverseFunctionalProperty;
rdfs:domain :Nationalities;
rdfs:range :Animals.
# Die Hinweise:
:yellowHouse :hasColor :yellow.
# 08. Der Besitzer des gelben Hauses raucht Dunhill
[ a owl:Restriction;
owl:onProperty :livesIn; owl:hasValue :yellowHouse]
owl:equivalentClass
[ a owl:Restriction;
owl:onProperty :smokes; owl:hasValue :dunhill].
# 11. Der Mann, der ein Pferd haelt, wohnt neben dem, der Dunhill raucht
[ a owl:Restriction;
owl:onProperty :smokes; owl:hasValue :dunhill]
rdfs:subClassOf
[ a owl:Restriction;
owl:onProperty :livesIn; owl:someValuesFrom
[ a owl:Restriction;
owl:onProperty :nextTo; owl:someValuesFrom
[ a owl:Restriction;
owl:onProperty :ownedBy; owl:someValuesFrom
[ a owl:Restriction;
owl:onProperty :keepsAnimal; owl:hasValue :horse]]]].
# 13. Neben dem blauen Haus wohnt der Norweger
:n a
[ a owl:Restriction;
owl:onProperty :livesIn; owl:someValuesFrom
[ a owl:Restriction;
owl:onProperty :nextTo; owl:hasValue :blueHouse]].
************************************************************************
-------------- next part --------------
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix : <foo:bla#>.
# 00. Fuenf Haeuser stehen in einer Reihe.mit je einer Farbe
# 01. Jedes Haus hat eine andere Farbe
# 02. In jedem Haus wohnt eine Person einer anderen Nationalitaet
# 03. Jeder Hausbewohner bevorzugt ein bestimmtes Getraenk, raucht eine
# bestimmte Zigarettenmarke und haelt ein bestimmtes Haustier
# 04. KEINE der 5 Personen trinkt das gleiche Getraenk, raucht die gleichen
# Zigaretten oder haelt das gleiche Tier, wie einer seiner Nachbarn
# Frage: Wem gehoert der Fisch????
:Houses a owl:Class;
owl:oneOf (:one :two :three :four :five);
rdfs:subClassOf
[ a owl:Restriction; owl:onProperty :nextTo; owl:maxCardinality 2 ].
owl:AllDifferent owl:distinctMembers (:one :two :three :four :five).
:one :leftOf :two.
:two :leftOf :three.
:three :leftOf :four.
:four :leftOf :five.
:OuterHouse a owl:Class; owl:equivalentClass
[ a owl:Restriction; owl:onProperty :nextTo; owl:cardinality 1 ].
:NoRight a owl:Class ; owl:intersectionOf
( [ a owl:Restriction; owl:onProperty :leftOf; owl:cardinality 0 ]
:OuterHouse ).
:five a :NoRight.
:NoLeft rdf:type owl:Class ; owl:intersectionOf
( [ a owl:Restriction; owl:onProperty :rightOf; owl:cardinality 0 ]
:OuterHouse ).
:one a :NoLeft.
:rightOf a owl:ObjectProperty; a owl:FunctionalProperty;
owl:inverseOf :leftOf;
rdfs:subPropertyOf :nextTo.
:leftOf a owl:ObjectProperty; a owl:FunctionalProperty;
rdfs:subPropertyOf :nextTo.
:nextTo a owl:ObjectProperty;
rdfs:domain :House; rdfs:range :House.
:Nationalities a owl:Class;
owl:equivalentClass [ owl:oneOf (:gb :s :dk :n :d) ].
#owl:AllDifferent owl:distinctMembers (:gb :s :dk :n :d).
:Colors a owl:Class;
owl:equivalentClass [ owl:oneOf (:red :green :white :yellow :blue) ].
owl:AllDifferent owl:distinctMembers (:red :green :white :yellow :blue).
:Cigarettes a owl:Class;
owl:equivalentClass
[ owl:oneOf (:pallmall :dunhill :marlboro :winfield :rothmans) ].
owl:AllDifferent owl:distinctMembers
(:pallmall :dunhill :marlboro :winfield :rothmans).
:Drinks a owl:Class;
owl:equivalentClass [ owl:oneOf (:tea :coffee :water :milk :beer) ].
owl:AllDifferent owl:distinctMembers (:tea :coffee :water :milk :beer).
:Animals a owl:Class;
owl:equivalentClass [ owl:oneOf (:dog :bird :fish :cat :horse) ].
owl:AllDifferent owl:distinctMembers (:dog :bird :fish :cat :horse).
####
:livesIn a owl:FunctionalProperty;
a owl:InverseFunctionalProperty;
owl:inverseOf :ownedBy;
rdfs:domain :Nationalities;
rdfs:range :Houses.
:hasColor a owl:FunctionalProperty;
a owl:InverseFunctionalProperty;
rdfs:domain :Houses;
rdfs:range :Colors.
:smokes a owl:FunctionalProperty;
a owl:InverseFunctionalProperty;
rdfs:domain :Nationalities;
rdfs:range :Cigarettes.
:drinks a owl:FunctionalProperty;
a owl:InverseFunctionalProperty;
rdfs:domain :Nationalities;
rdfs:range :Drinks.
:keepsAnimal a owl:FunctionalProperty;
a owl:InverseFunctionalProperty;
rdfs:domain :Nationalities;
rdfs:range :Animals.
# Die Hinweise:
:greenHouse :hasColor :green.
:whiteHouse :hasColor :white.
:redHouse :hasColor :red.
:yellowHouse :hasColor :yellow.
:blueHouse :hasColor :blue.
# 01. Der Brite lebt im roten Haus
:gb :livesIn :redHouse.
# 02. Der Schwede haelt einen Hund
:s :keepsAnimal :dog.
# 03. Der Daene trinkt gerne Tee
:dk :drinks :tea.
# 04. Das gruene Haus steht direkt links vom weissen Haus
:greenHouse :leftOf :whiteHouse.
# 05. Der Besitzer des gruenen Hauses trinkt gerne Kaffee
[ a owl:Restriction;
owl:onProperty :livesIn; owl:hasValue :greenHouse]
owl:equivalentClass
[ a owl:Restriction;
owl:onProperty :drinks; owl:hasValue :coffee].
# 06. Die Person, die Pall Mall raucht, haelt einen Vogel
[ a owl:Restriction;
owl:onProperty :smokes; owl:hasValue :pallmall]
owl:equivalentClass
[ a owl:Restriction;
owl:onProperty :keepsAnimal; owl:hasValue :bird].
# 07. Der Mann, der im mittleren Haus wohnt, trinkt gerne Milch
[ a owl:Restriction;
owl:onProperty :livesIn; owl:hasValue :three]
owl:equivalentClass
[ a owl:Restriction;
owl:onProperty :drinks; owl:hasValue :milk].
# 08. Der Besitzer des gelben Hauses raucht Dunhill
[ a owl:Restriction;
owl:onProperty :livesIn; owl:hasValue :yellowHouse]
owl:equivalentClass
[ a owl:Restriction;
owl:onProperty :smokes; owl:hasValue :dunhill].
# 09. Der Norweger wohnt in dem ganz links stehenden Haus
:n :livesIn :one.
# 10. Der Marlboro-Raucher wohnt neben dem, der eine Katze haelt
[ a owl:Restriction;
owl:onProperty :smokes; owl:hasValue :marlboro]
rdfs:subClassOf
[ a owl:Restriction;
owl:onProperty :livesIn; owl:someValuesFrom
[ a owl:Restriction;
owl:onProperty :nextTo; owl:someValuesFrom
[ a owl:Restriction;
owl:onProperty :ownedBy; owl:someValuesFrom
[ a owl:Restriction;
owl:onProperty :keepsAnimal; owl:hasValue :cat]]]].
# 11. Der Mann, der ein Pferd haelt, wohnt neben dem, der Dunhill raucht
[ a owl:Restriction;
owl:onProperty :smokes; owl:hasValue :dunhill]
rdfs:subClassOf
[ a owl:Restriction;
owl:onProperty :livesIn; owl:someValuesFrom
[ a owl:Restriction;
owl:onProperty :nextTo; owl:someValuesFrom
[ a owl:Restriction;
owl:onProperty :ownedBy; owl:someValuesFrom
[ a owl:Restriction;
owl:onProperty :keepsAnimal; owl:hasValue :horse]]]].
# 12. Der Winfield-Raucher trinkt gerne Bier
[ a owl:Restriction;
owl:onProperty :smokes; owl:hasValue :winfield]
owl:equivalentClass
[ a owl:Restriction;
owl:onProperty :drinks; owl:hasValue :beer].
# 13. Neben dem blauen Haus wohnt der Norweger
:n a
[ a owl:Restriction;
owl:onProperty :livesIn; owl:someValuesFrom
[ a owl:Restriction;
owl:onProperty :nextTo; owl:hasValue :blueHouse]].
# 14. Der Deutsche raucht Rothmans
:d :smokes :rothmans.
# 15. Derjenige, der Marlboro raucht, hat einen Nachbarn, der Wasser trinkt
[ a owl:Restriction;
owl:onProperty :smokes; owl:hasValue :marlboro]
rdfs:subClassOf
[ a owl:Restriction;
owl:onProperty :livesIn; owl:someValuesFrom
[ a owl:Restriction;
owl:onProperty :nextTo; owl:someValuesFrom
[ a owl:Restriction;
owl:onProperty :ownedBy; owl:someValuesFrom
[ a owl:Restriction;
owl:onProperty :drinks; owl:hasValue :water]]]].
More information about the Pellet-users
mailing list