0

I have build a small ontology in Protege 5.0.0. When I run Hermit 1.3.8.3 reasoner, it outputs status as:

Initializing the reasoner by performing the following steps:
class hierarchy
object property hierarchy
data property hierarchy
class assertions
object property assertions
same individuals
HermiT 1.3.8.3 classified in 97ms

On the other hand, When I run Fact++ on same ontology, it seems that ontology is inconsistent. Output is:

Initializing the reasoner by performing the following steps:
class hierarchy
object property hierarchy
data property hierarchy
class assertions
object property assertions
same individuals  
Error logged
java.io.IOException: invalid url
at javax.swing.JEditorPane.setPage(JEditorPane.java:418)
at org.protege.editor.owl.ui.explanation.io.IntroductoryPanel.createCenterPanel(IntroductoryPanel.java:42)
at org.protege.editor.owl.ui.explanation.io.IntroductoryPanel.<init>(IntroductoryPanel.java:33)
at org.protege.editor.owl.ui.explanation.io.InconsistentOntologyManager.explain(InconsistentOntologyManager.java:37)
at org.protege.editor.owl.model.inference.OWLReasonerManagerImpl$ClassificationRunner.installRunningReasoner(OWLReasonerManagerImpl.java:436)
at org.protege.editor.owl.model.inference.OWLReasonerManagerImpl$ClassificationRunner.run(OWLReasonerManagerImpl.java:375)
at java.lang.Thread.run(Thread.java:745)

Which of the reasoners should I rely upon. Fact++ is throwing exception "invalid url".How should I solve this?

UPDATE # 1 Sorry, I am not able to find the owl file on which the above scenario was happening. But, today same thing is happening on another file where Hermit throws Exception but FACT works properly: Link to file is: Link.
Exception thrown in Hermit is:

 Error 7 Logged at Tue Feb 24 10:27:06 IST 2015
 IOException: invalid url
 javax.swing.JEditorPane.setPage(JEditorPane.java:418)
 org.protege.editor.owl.ui.explanation.io.IntroductoryPanel.createCenterPanel(IntroductoryPanel.java:42)
    org.protege.editor.owl.ui.explanation.io.IntroductoryPanel.<init>(IntroductoryPanel.java:33)
    org.protege.editor.owl.ui.explanation.io.InconsistentOntologyManager.explain(InconsistentOntologyManager.java:37)
    org.protege.editor.owl.model.inference.OWLReasonerManagerImpl$ClassificationRunner.installRunningReasoner(OWLReasonerManagerImpl.java:436)
    org.protege.editor.owl.model.inference.OWLReasonerManagerImpl$ClassificationRunner.run(OWLReasonerManagerImpl.java:375)
    java.lang.Thread.run(Thread.java:745)
Haroon Lone
  • 2,837
  • 5
  • 29
  • 65
  • What's the ontology? It's quite possible that one reasoner supports one kind of reasoning that another doesn't. For instance, it looks like FacT++ is checking that IRIs are actually legal, whereas HermiT may very well just treat them as opaque strings. Have you tried validating your ontology with any OWL validation tools? – Joshua Taylor Feb 23 '15 at 16:45
  • Yes, I checked on [site](http://mowl-power.cs.man.ac.uk:8080/validator/). It shows that _The ontology and all of its imports are in the OWL 2 profile_ – Haroon Lone Feb 23 '15 at 17:05
  • Well, it could still be that that site doesn't check IRI validity. Or the second reasoner could be checking something incorrectly. Without your ontology, we can't really help figure out what the problem is. – Joshua Taylor Feb 23 '15 at 17:07
  • 1
    That exception is not thrown by FaCT++, it is rather Protege tries to find a reason why the ontology is inconsistent. I would also ask you to provide the ontology if possible, or an anonymised version of it. As the FaCT++ developer I would like to investigate the disagreement between reasoners and fix the problem in FaCT++ if it appeared to be buggy. – Dmitry Tsarkov Feb 23 '15 at 18:26

2 Answers2

3

(This correspond to the ontology linked to in UPDATE 1)

The ontology is inconsistent according to the OWL 2 DL Standard, FaCT++ is correct there. The reason why the ontology is inconsistent is as follows.

1) There is a data property measures in the ontology, described as (only relevant bits left):

<rdf:Description rdf:about="http://www.example.com/tempsensor#measures">
    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
    <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
</rdf:Description>

2) The usage of this property everywhere in the ontology is:

<rdf:Description rdf:about="http://www.example.com/tempsensor#ind20">
    <measures rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">24</measures>
    <rdf:type rdf:resource="http://www.example.com/tempsensor#TempSensor"/>
</rdf:Description>

Note that the range of the property is set to float, but the values used in the actual individuals are integer. According to the OWL 2 spec (Floating-Point Numbers), float and integer are disjoint datatypes.

It seems that for a practical reason HermiT relaxes the formal datatype restrictions, while FaCT++ stays close to the standard.

fenceop
  • 1,439
  • 3
  • 18
  • 29
Dmitry Tsarkov
  • 768
  • 4
  • 11
0

FaCT++ does not throw IOExceptions nor does it try to check IRI validity. The Error logged message makes me think Protege has caught an exception of some kind - might be an inconsistent ontology exception, but it's hard to tell from this message. Do you get any other output in Protege? A reasoning error might be reported in the top left corner, under a red triangle, not just in the console.

Edit: these are the lines where the exception is thrown:

    URL help = getClass().getResource("InconsistentOntologyHelp.html");
    tp.setPage(help);
    Font font = UIManager.getFont("TextArea.font");

The issue seems to be with the help URL being incorrect - which in this case is likely to mean inexistent. Explanation of the inconsistency does not seem to work correctly.

As Dmitry Tsarkov pointed out, there's an issue revealed by this: FaCT++ and HermiT are disagreeing on whether the ontology is consistent or inconsistent. That's a separate issue, as the exception you're seeing is generated in Protege code, but is still a worry - thanks for providing an example. I'll open an issue on the reasoners' pages to debug and fix.

Ignazio
  • 10,504
  • 1
  • 14
  • 25