0

I am using HermiT v1.3.8.4 with OWLAPI v3.5.6 and run into an issue where reasoner.isSatisfiable(clazz) runs forever.

Is there a way to inspect what HermiT is doing, i.e., a way to get debug information?

My current setup looks roughly like this

OWLReasonerFactory reasonerFactory = new Reasoner.ReasonerFactory();
OWLReasonerConfiguration config;
if (this.verbose_output) {
    ConsoleProgressMonitor progressMonitor = new ConsoleProgressMonitor();
    config = new SimpleConfiguration(
        progressMonitor
    );
} else {
    config = new SimpleConfiguration();
}
OWLReasoner reasoner = reasonerFactory.createReasoner(this.ontology, config);

...

for (OWLClass c: this.ontology.getClassesInSignature(this.include_import_closure)) {
    if (!reasoner.isSatisfiable(c)) {  // This step takes forever
        continue;
    }

    ...
}
F Lekschas
  • 12,481
  • 10
  • 60
  • 72

2 Answers2

3

Not sure if this helps, but there are some classes that are related to debugging, although I never used those. You could try to use the following config option

Configuration config=new Configuration();
// Lets make HermiT open a debugger window from which we can control the 
// further actions that HermiT performs. 
// DEBUGGER_HISTORY_ON will cause HermiT to save the deriviation tree for 
// each derived conclusion. 
// DEBUGGER_NO_HISTORY will not save the derivation tree, so no causes for a 
// clash can be given, but the memory requirement is smaller. 
config.tableauMonitorType=TableauMonitorType.DEBUGGER_HISTORY_ON;
// Now we can start and create the reasoner with the above created configuration.
Reasoner hermit = new Reasoner(config,ontology);
// This will open the debugger window at runtime and it should say:
// Good morning Dr. Chandra. This is HAL. I'm ready for my first lesson.
// Derivation history is on.
// Reasoning task started: ABox satisfiability
// > 
// you can press 'c' to make HermiT continue with checking whether the ontology 
// is consistent
hermit.isSatisfiable(c); // for a class 'c'
// HermiT should now have said 'Reasoning task finished: true' in the debugger window. 
// Now, you can type 'showModel' to see all the assertions in the ABox that HermiT generated. 

Otherwise, maybe the log level could help.

UninformedUser
  • 8,397
  • 1
  • 14
  • 23
2

Another way to get feedback is to use a profiler. jvisualvm is included in all recent Oracle JREs, and the sampler mode will provide you with a good clue about what HermiT is doing. It's not a progress monitor but it helps to understand if what's slowing things down is the size of the ontology or a particular construct.

Ignazio
  • 10,504
  • 1
  • 14
  • 25