0

尝试在模型中执行带有推理的查询时,出现此错误:000012: com.complexible.stardog.plan.eval.operator.OperatorException: Uncaught error during query evaluation: ConcurrentModificationException

本体模型有 2 个 SWRL 规则并且是一致的,因为它在 Protege 中运行良好(带有内置的颗粒推理器)。模型已导入stardog rdf 模型和查询

SELECT ?tse
FROM <urn:test_graph>
{
    ?tse a :TaperedShaftEnd
}

失败并显示上述错误消息。

通过删除 SWRL 规则,查询运行良好,但模型当然不再代表所需的域。通过将 SWRL 规则翻译成 stardog 原生规则,错误再次出现。

推理级别设置为 DL,因为 SL 意味着目标应用程序的处理时间太长。更改推理选项中的 sameAs 标志不会改变行为。按照 Stardog 文档中的一般建议,将推理级别设置为 SL将解决此简化模型的问题,但如前所述,将导致在最终目标应用程序中使用不切实际。

您能帮我找出根本原因和可能的解决方案吗?有没有人在处理 SWRL 规则时遇到过同样的问题?

下面是海龟格式的相关模型,以便在测试图上轻松复制问题。

衷心感谢任何可以帮助我的人。

@prefix : <http://api.stardog.com/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix stardog: <tag:stardog:api:> .
@prefix test: <urn:test_graph#> .

<http://swrl.stanford.edu/ontologies/3.3/swrla.owl#isRuleEnabled> a owl:AnnotationProperty .

<urn:test> a owl:Ontology .

:hasTorqueTransmissionConnectionWith a owl:ObjectProperty , owl:FunctionalProperty , owl:InverseFunctionalProperty , owl:SymmetricProperty , owl:IrreflexiveProperty .

:CouplingConnection a owl:Class ;
    owl:disjointWith :ShaftEnd .

:ShaftEnd a owl:Class ;
    owl:disjointWith :ShaftEnd .

:LeftCouplingConnection a owl:Class ;
    rdfs:subClassOf :CouplingConnection ;
    owl:disjointWith :RightCouplingConnection .

:RightCouplingConnection a owl:Class ;
    rdfs:subClassOf :CouplingConnection .

:LeftShaftEnd a owl:Class ;
    rdfs:subClassOf :ShaftEnd ;
    owl:disjointWith :RightShaftEnd .

:RightShaftEnd a owl:Class ;
    rdfs:subClassOf :ShaftEnd .

:TaperedCouplingConnection a owl:Class , <tag:stardog:api:rule:SPARQLRule> ;
    rdfs:subClassOf :CouplingConnection ;
    <tag:stardog:api:rule:content> """IF {
   ?tse a :TaperedShaftEnd .
   ?tse :hasTorqueTransmissionConnectionWith ?cc .
   ?cc a :CouplingConnection .
}
THEN {
   ?cc a :TaperedCouplingConnection .
}
""" .

:TaperedShaftEnd a owl:Class , <tag:stardog:api:rule:SPARQLRule> ;
    rdfs:subClassOf :ShaftEnd ;
    <tag:stardog:api:rule:content> """IF {
   ?tcc a :TaperedCouplingConnection .
   ?tcc :hasTorqueTransmissionConnectionWith ?se .
   ?se a :ShaftEnd .
}
THEN {
   ?se a :TaperedShaftEnd .
}
""" .

:lcc1 a :LeftCouplingConnection , owl:NamedIndividual .

:lse2 a :LeftShaftEnd , owl:NamedIndividual .

:rcc2 a :RightCouplingConnection , :TaperedCouplingConnection , owl:NamedIndividual ;
    :hasTorqueTransmissionConnectionWith :lse2 .

:rse1 a :RightShaftEnd , owl:NamedIndividual ;
    :hasTorqueTransmissionConnectionWith :lcc1 .
4

0 回答 0