stardog-union / pellet

Pellet is an OWL 2 reasoner in Java; open source (AGPL) and commercially licensed, commercial support available.
http://clarkparsia.com/pellet
Other
302 stars 153 forks source link

Porting to Jena 3.0.1 #30

Open ghost opened 8 years ago

ghost commented 8 years ago

Hi,

I tried to port this Pellet repo to Jena 3.0.1 and got some test failures. Can you tell please, do these cases indicate serious issues with the reasoner making it unusable?

The failures' stack traces are bellow. I tried to investigate them and found the following:

  1. Cases with names testTenaLoader* failed due to different interpretation of the PlainLiterals in Jena 3 (TestAnnotations.java:329). It renders them as xsd:string without language tag, while Pellet expects rdf:PlainLiteral. It seems that current Jena's behaviour is perfectly valid for RDF 1.1: https://www.w3.org/TR/rdf11-concepts/#dfn-literal
  2. Case testDatatypeProperties is trickier, it fails on model.validate() method (JenaTests.java:1655). I checked the validation report with debugger and it revealed the following problem: Error (KB is inconsistent!): Individual urn:test:JohnDoe has more than one value for the functional property urn:test:name1.

So, what do you think about all of these errors? Are they crucial for the real-world usage?

-------------------------------------------------------------------------------
Test set: org.mindswap.pellet.test.PelletTestSuite
-------------------------------------------------------------------------------
Tests run: 2054, Failures: 5, Errors: 0, Skipped: 79, Time elapsed: 151.069 sec <<< FAILURE! - in org.mindswap.pellet.test.PelletTestSuite
testDatatypeProperties(org.mindswap.pellet.test.JenaTests)  Time elapsed: 0.011 sec  <<< FAILURE!
java.lang.AssertionError: null
    at org.junit.Assert.fail(Assert.java:86)
    at org.junit.Assert.assertTrue(Assert.java:41)
    at org.junit.Assert.assertTrue(Assert.java:52)
    at org.mindswap.pellet.test.JenaTests.testDatatypeProperties(JenaTests.java:1655)

testJenaLoader1(org.mindswap.pellet.test.TestAnnotations)  Time elapsed: 0.002 sec  <<< FAILURE!
java.lang.AssertionError: expected:<[literal(o,(),http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral)]> but was:<[literal(o,(),http://www.w3.org/2001/XMLSchema#string)]>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)
    at org.junit.Assert.assertEquals(Assert.java:118)
    at org.junit.Assert.assertEquals(Assert.java:144)
    at org.mindswap.pellet.test.TestAnnotations.testJenaLoader1(TestAnnotations.java:329)

testJenaLoader3(org.mindswap.pellet.test.TestAnnotations)  Time elapsed: 0.002 sec  <<< FAILURE!
java.lang.AssertionError: expected:<[literal(o1,(),http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral)]> but was:<[literal(o1,(),http://www.w3.org/2001/XMLSchema#string)]>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)
    at org.junit.Assert.assertEquals(Assert.java:118)
    at org.junit.Assert.assertEquals(Assert.java:144)
    at org.mindswap.pellet.test.TestAnnotations.testJenaLoader3(TestAnnotations.java:371)

testJenaLoader1(com.clarkparsia.pellet.test.annotations.TestReasoningWithAnnotationAxioms)  Time elapsed: 0.001 sec  <<< FAILURE!
java.lang.AssertionError: expected:<[literal(o1,(),http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral)]> but was:<[literal(o1,(),http://www.w3.org/2001/XMLSchema#string)]>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)
    at org.junit.Assert.assertEquals(Assert.java:118)
    at org.junit.Assert.assertEquals(Assert.java:144)
    at com.clarkparsia.pellet.test.annotations.TestReasoningWithAnnotationAxioms.testJenaLoader1(TestReasoningWithAnnotationAxioms.java:176)

testJenaLoader2(com.clarkparsia.pellet.test.annotations.TestReasoningWithAnnotationAxioms)  Time elapsed: 0.001 sec  <<< FAILURE!
java.lang.AssertionError: expected:<[literal(o1,(),http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral)]> but was:<[literal(o1,(),http://www.w3.org/2001/XMLSchema#string)]>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)
    at org.junit.Assert.assertEquals(Assert.java:118)
    at org.junit.Assert.assertEquals(Assert.java:144)
    at com.clarkparsia.pellet.test.annotations.TestReasoningWithAnnotationAxioms.testJenaLoader2(TestReasoningWithAnnotationAxioms.java:198)