Data type reasoning crashes reasoner

Issue #10 resolved
Dmitry Tsarkov repo owner created an issue

Original [issue 10](https://code.google.com/p/factplusplus/issues/detail?id=10) created by dtsarkov on 2008-03-25T23:31:03.000Z:

I am trying to do datatype reasoning with Fact++ via OWLAPI and I have been experiencing reasoner crashes.

To reproduce the problem simply run the program in DataTypeMinimalTestCase.java

The program should simply print the name of the individual that it creates ("ind"), but instead it crashes. I rebuilt FaCT++ using ENABLE_CHECKS and I got the following output:

call initKernel from JNI FaCT++.Kernel: Reasoner for the SROIQ(D) Description Logic Copyright (C) Dmitry V. Tsarkov, 2002-2007. Version 1.1.10 (30 November 2007) call getDataProperty from JNI call getBuiltInDataType from JNI call getDataValue from JNI call getDataValue from JNI call askInstances from JNI java: DataReasoning.h:229: DataTypeAppearance& DataTypeReasoner::getDTAbyType(const TDataEntry*): Assertion `Map.find(dataType) != Map.end()' failed.

CUT

The stack trace at the assertion is:

  1.  0 0x00002ae78185dcab in raise () from /lib/libc.so.6
  2.  1 0x00002ae78185f660 in abort () from /lib/libc.so.6
  3.  2 0x00002ae781857436 in assert_fail () from /lib/libc.so.6
  4.  3 0x00002aaaf29df409 in DataTypeReasoner::getDTAbyType (this=0x2aaaf266e2b8, dataType=0x2aaaf2567c00) at DataReasoning.h:229
  5.  4 0x00002aaaf29df479 in DataTypeReasoner::getDTAbyValue (this=0x2aaaf266e2b8, dataValue=0x2aaaf24b0fe0) at DataReasoning.h:239
  6.  5 0x00002aaaf29df4dc in DataTypeReasoner::processRestriction (this=0x2aaaf266e2b8, pos=true, min=false, excl=false, c=0x2aaaf24b0fe0, dep=@0x2aaaf25c4614) at DataReasoning.h:195
  7.  6 0x00002aaaf29dd3bf in DataTypeReasoner::addDataEntry (this=0x2aaaf266e2b8, c=@0x2aaaf25c4610) at DataReasoning.cpp:67
  8.  7 0x00002aaaf299ff5b in DlSatTester::checkDataClash (this=0x2aaaf266e1c0, Node=0x2aaaf25c4520) at Reasoner.cpp:247
  9.  8 0x00002aaaf29bed1b in DlSatTester::setupEdge (this=0x2aaaf266e1c0, pA=0x2aaaf266e560, curDep=@0x2aaaf266e4d4, flags=5) at Tactic.cpp:751
  10.  9 0x00002aaaf29bff06 in DlSatTester::createNewEdge (this=0x2aaaf266e1c0, Role=0x2aaaf25eea90, Concept=4, curDep=@0x2aaaf266e4d4, flags=5) at Tactic.cpp:657
  11.  10 0x00002aaaf29c1121 in DlSatTester::commonTacticBodySome (this=0x2aaaf266e1c0, cur=@0x2aaaf25c4420) at Tactic.cpp:602
  12.  11 0x00002aaaf29c1634 in DlSatTester::commonTacticBody (this=0x2aaaf266e1c0, cur=@0x2aaaf25c4420) at Tactic.cpp:121
  13.  12 0x00002aaaf29c180a in DlSatTester::commonTactic (this=0x2aaaf266e1c0) at Tactic.cpp:67
  14.  13 0x00002aaaf299fb4c in DlSatTester::checkSatisfiability (this=0x2aaaf266e1c0) at Reasoner.cpp:522
  15.  14 0x00002aaaf299fd98 in DlSatTester::runSat (this=0x2aaaf266e1c0) at Reasoner.cpp:294
  16.  15 0x00002aaaf2998e82 in DlSatTester::runSat (this=0x2aaaf266e1c0, p=2, q=1) at Reasoner.h:772
  17.  16 0x00002aaaf29a0404 in DlSatTester::createCache (this=0x2aaaf266e1c0, p=2) at Reasoner.cpp:497
  18.  17 0x00002aaaf29a0500 in DlSatTester::fillsCache (this=0x2aaaf266e1c0, p=2) at Reasoner.cpp:397
  19.  18 0x00002aaaf2977a5e in TBox::initCache (this=0x2aaaf25edec0, pConcept=0x2aaaf25c4030) at Reasoner.h:1039
  20.  19 0x00002aaaf298f017 in TBox::createTempConcept (this=0x2aaaf25edec0, desc=0x2aaaf266e190) at dlTBox.cpp:264
  21.  20 0x00002aaaf29baa33 in ReasoningKernel::setUpCache (this=0x2aaaf26340c0, query=0x2aaaf266e190, level=ReasoningKernel::csClassified) at Kernel.cpp:169
  22.  21 0x00002aaaf2984041 in ReasoningKernel::getDescendants<JTaxonomyActor<IndividualPolicy> > (this=0x2aaaf26340c0, C=0x2aaaf266e190, actor=@0x4022a850) at ../Kernel/Kernel.h:547
  23.  22 0x00002aaaf298409a in ReasoningKernel::getInstances<JTaxonomyActor<IndividualPolicy> > (this=0x2aaaf26340c0, C=0x2aaaf266e190, actor=@0x4022a850) at ../Kernel/Kernel.h:647
  24.  23 0x00002aaaf2962fa4 in Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_askInstances (env=0x40114190, obj=0x4022a958, arg=0x4022a950) at FaCTPlusPlus.cpp:1630

CUT

I am using FaCT++ 1.1.10 on 64bit linux. I built the C++ code myself from scratch (which required a couple of tweaks to the build system because it was not setup to build on 64bit). However I used the prebuilt jar for the OWLAPI java code.

I am using OWLAPI 2.1.1.

This issue may be related to issue # 9.

Comments (3)

  1. Dmitry Tsarkov reporter

    Comment [#1](https://code.google.com/p/factplusplus/issues/detail?id=10#c1) originally posted by dtsarkov on 2008-03-26T16:13:17.000Z:

    I included the wrong stack trace. Below is the correct one. Interestingly they appear to be almost identical despite the fact that the ontologies resulting in them are quite different.

    1.  0 0x00002aedf733bcab in raise () from /lib/libc.so.6
    2.  1 0x00002aedf733d660 in abort () from /lib/libc.so.6
    3.  2 0x00002aedf7335436 in assert_fail () from /lib/libc.so.6
    4.  3 0x00002aaaf2980409 in DataTypeReasoner::getDTAbyType (this=0x2aaaf4158fa8, dataType=0x2aaaf416d320) at DataReasoning.h:229
    5.  4 0x00002aaaf2980479 in DataTypeReasoner::getDTAbyValue (this=0x2aaaf4158fa8, dataValue=0x2aaaf417ba20) at DataReasoning.h:239
    6.  5 0x00002aaaf29804dc in DataTypeReasoner::processRestriction (this=0x2aaaf4158fa8, pos=true, min=false, excl=false, c=0x2aaaf417ba20, dep=@0x2aaaf418ee84) at DataReasoning.h:195
    7.  6 0x00002aaaf297e3bf in DataTypeReasoner::addDataEntry (this=0x2aaaf4158fa8, c=@0x2aaaf418ee80) at DataReasoning.cpp:67
    8.  7 0x00002aaaf2940f5b in DlSatTester::checkDataClash (this=0x2aaaf4158eb0, Node=0x2aaaf418ed90) at Reasoner.cpp:247
    9.  8 0x00002aaaf295fd1b in DlSatTester::setupEdge (this=0x2aaaf4158eb0, pA=0x2aaaf417bc80, curDep=@0x2aaaf41591c4, flags=5) at Tactic.cpp:751
    10.  9 0x00002aaaf2960f06 in DlSatTester::createNewEdge (this=0x2aaaf4158eb0, Role=0x2aaaf411c8b0, Concept=4, curDep=@0x2aaaf41591c4, flags=5) at Tactic.cpp:657
    11.  10 0x00002aaaf2962121 in DlSatTester::commonTacticBodySome (this=0x2aaaf4158eb0, cur=@0x2aaaf418ec90) at Tactic.cpp:602
    12.  11 0x00002aaaf2962634 in DlSatTester::commonTacticBody (this=0x2aaaf4158eb0, cur=@0x2aaaf418ec90) at Tactic.cpp:121
    13.  12 0x00002aaaf296280a in DlSatTester::commonTactic (this=0x2aaaf4158eb0) at Tactic.cpp:67
    14.  13 0x00002aaaf2940b4c in DlSatTester::checkSatisfiability (this=0x2aaaf4158eb0) at Reasoner.cpp:522
    15.  14 0x00002aaaf2940d98 in DlSatTester::runSat (this=0x2aaaf4158eb0) at Reasoner.cpp:294
    16.  15 0x00002aaaf2939e82 in DlSatTester::runSat (this=0x2aaaf4158eb0, p=2, q=1) at Reasoner.h:772
    17.  16 0x00002aaaf2941404 in DlSatTester::createCache (this=0x2aaaf4158eb0, p=2) at Reasoner.cpp:497
    18.  17 0x00002aaaf2941500 in DlSatTester::fillsCache (this=0x2aaaf4158eb0, p=2) at Reasoner.cpp:397
    19.  18 0x00002aaaf2918a5e in TBox::initCache (this=0x2aaaf416ca20, pConcept=0x2aaaf418e8a0) at Reasoner.h:1039
    20.  19 0x00002aaaf2930017 in TBox::createTempConcept (this=0x2aaaf416ca20, desc=0x2aaaf417bbb0) at dlTBox.cpp:264
    21.  20 0x00002aaaf295ba33 in ReasoningKernel::setUpCache (this=0x2aaaf41630f0, query=0x2aaaf417bbb0, level=ReasoningKernel::csClassified) at Kernel.cpp:169
    22. &nbsp;21 0x00002aaaf2925041 in ReasoningKernel::getDescendants<JTaxonomyActor<IndividualPolicy> > (this=0x2aaaf41630f0, C=0x2aaaf417bbb0, actor=@0x4022a960) at ../Kernel/Kernel.h:547
    23. &nbsp;22 0x00002aaaf292509a in ReasoningKernel::getInstances<JTaxonomyActor<IndividualPolicy> > (this=0x2aaaf41630f0, C=0x2aaaf417bbb0, actor=@0x4022a960) at ../Kernel/Kernel.h:647
    24. &nbsp;23 0x00002aaaf2903fa4 in Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_askInstances (env=0x40114190, obj=0x4022aa70, arg=0x4022aa68) at FaCTPlusPlus.cpp:1630
  2. Log in to comment