OWL HermiT 调试可满足性检查
OWL HermiT debug satisfiability check
我将 HermiT v1.3.8.4
与 OWLAPI v3.5.6
和 运行 一起使用,解决了 reasoner.isSatisfiable(clazz)
运行 永远存在的问题。
有没有办法检查 HermiT 在做什么,即获取调试信息的方法?
我目前的设置大致如下
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;
}
...
}
不确定这是否有帮助,但有一些 类 与调试相关,尽管我从未使用过它们。您可以尝试使用以下配置选项
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.
否则,日志级别可能会有帮助。
获得反馈的另一种方法是使用分析器。 jvisualvm 包含在所有最新的 Oracle JRE 中,采样器模式将为您提供有关 HermiT 正在做什么的良好线索。它不是一个进度监视器,但它有助于了解减慢速度的原因是 ontology 的大小还是特定构造。
我将 HermiT v1.3.8.4
与 OWLAPI v3.5.6
和 运行 一起使用,解决了 reasoner.isSatisfiable(clazz)
运行 永远存在的问题。
有没有办法检查 HermiT 在做什么,即获取调试信息的方法?
我目前的设置大致如下
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;
}
...
}
不确定这是否有帮助,但有一些 类 与调试相关,尽管我从未使用过它们。您可以尝试使用以下配置选项
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.
否则,日志级别可能会有帮助。
获得反馈的另一种方法是使用分析器。 jvisualvm 包含在所有最新的 Oracle JRE 中,采样器模式将为您提供有关 HermiT 正在做什么的良好线索。它不是一个进度监视器,但它有助于了解减慢速度的原因是 ontology 的大小还是特定构造。