owlcs / jfact

JFact repository
13 stars 8 forks source link

Different consistency result for java7 and java8 #9

Closed anthu closed 7 years ago

anthu commented 8 years ago

I'm using JFact 4.0.0 with OWL API 4.0.2 in my RCP-Application.

With JavaSE-1.8 as Runtime Environment everything's fine - but when I switch to JavaSE-1.7 the Reasoner reports inconsistency in my ontology.

These are the last lines of the verbose log:

[(131,-505){~all}:}: ce(131->191,[removed]#hasFilePath) DN(191) +(131,223)le +urn:enum50["[removed].yawl"^^string], +urn:enum50["[removed].yawl"^^string],]
[(131,223){at-most}:}: ss(1) SaveNode(191[1],1) +urn:enum51["[removed].yawl"^^string], +urn:enum51["[removed].yawl"^^string], -string, DT-TT] Clash
Checking time was 282.0 milliseconds done: false

The ontology is INCONSISTENT done in 344.0 seconds
ignazio1977 commented 8 years ago

I discovered a few bugs after 4.0 was released. I'll make a release with the fixes, it might help in your case.

Can you share the ontology, or a fragment that replicates the issue?

anthu commented 8 years ago

Sadly I'm not allowed to share the ontology, but I will try to recreate one with same behaviour.

I don't know if it helps, but running @ Java8 the same Clash occure, too. But without returning inconsistency:

[(135,-512){~all}:}: ce(135->193[removed]#hasFilePath) DN(193) +(135,249)le +urn:enum52["[removed].yawl"^^string], +urn:enum52["[removed].yawl"^^string],]
[(135,249){at-most}:}: ss(1) SaveNode(193[1],1) +urn:enum53["[removed].yawl"^^string], +urn:enum53["[removed].yawl"^^string], -string, DT-TT] Clash{1} RestNode(193[1],1) sr(1)

[...]

 done: true

The ontology is consistent done in 738.0 seconds
anthu commented 8 years ago

I think I've found the mistake, at least for my case:

the following DataPropertyAssertion could not be met - simply because the given path was wrong :/ :

<DataPropertyAssertion>
        <DataProperty IRI="#hasFilePath"/>
        <NamedIndividual IRI="#myindividual"/>
        <Literal datatypeIRI="&xsd;string">path/to/my/file.yawl</Literal>
    </DataPropertyAssertion>

BTW: thank you for providing this great and simple-to-use Reasoner.

ignazio1977 commented 8 years ago

BTW: thank you for providing this great and simple-to-use Reasoner.

Glad to hear that :-)

ignazio1977 commented 8 years ago

I've just released 4.0.2 - it will be available on Maven Central shortly.

The fact that you see the clash on both Java 7 and 8 seems to imply the problem is not in the datatype reasoning itself but in handling of its results in the layers above. A few of the changes that have been included have to do with similar issues, so there's a chance 4.0.2 might fix the issue for you.