-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected number format exception on checking ontology consistency in owlapi-jfact 4.0.0 #3
Comments
Thanks for the report. Can you share the ontology that results in this error, or a snippet that reproduces the issue? It's likely to be the value of rational typed literal. |
I'm trying to update my fork of the protege code-generation plugin to OWL https://github.com/rchallen/code-generation/tree/master/src/test/resources not sure which one is causing the issue but they all ran OK with jfact, Rob, On 3 December 2014 at 16:28, Ignazio Palmisano [email protected]
Rob Challen
BMJ advances healthcare worldwide by sharing knowledge and expertise to Tavistock Square, London WC1H 9JR, UK. |
I've checked out the current master for your project and had a quick go at building it with JFact 4.0.0 and OWLAPI 4.0.1 - the tests ran correctly. |
I've pushed my development branch in the code generation project (imaginatively called owl4) |
It is the CodeGeneration001.owl file that causes the number format exception I'm not sure whether owl:rationals are supported by JFact going to actually need rationals so I'll change the test ontology and carry on without needing any fixes to JFact. I shall let you decide if you are going to fix - I suppose a FractionFormat ff = new FractionFormat(); is all that is needed instead of what is there. |
There are a couple of other things that are causing issues with this now. A ReasonerInternalException that is thrown by a transitive property in the pizza ontology (hasIngredient) when I check whether the property can be more than single. You can argue this one. I've caught the exception and handled it but it's different behaviour to Pellet and Hermit which return a false rather than throw the exception. (see: org.protege.owl.codegeneration.inference.ReasonerBasedInference.isSingleton(OWLClass, OWLDataProperty)) Also there is a test of a data property assertion on an equivalent individual that is not passing - this looks more like a "real" issue. (see: org.protege.owl.codegeneration.TestInferredPropertyValues.testInferredPropertyValues()) I've put some notes in my owl4 branch where these tests are failing and disabled them, as I think I can make this work anyway for my use case. |
Thanks a lot for your feedback, appreciated. Matthew is working on a Protege update that should clear some of the dependency tangles away. I'll try and fix the issues you pinpointed. |
Caused by: java.lang.NumberFormatException
at java.math.BigDecimal.(BigDecimal.java:470)
at java.math.BigDecimal.(BigDecimal.java:739)
at uk.ac.manchester.cs.jfact.datatypes.DatatypeFactory$RATIONAL_DATATYPE.parseValue(DatatypeFactory.java:1572)
at uk.ac.manchester.cs.jfact.datatypes.LiteralImpl.typedValue(LiteralImpl.java:42)
at uk.ac.manchester.cs.jfact.datatypes.NumericLiteralImpl.typedValue(NumericLiteralImpl.java:16)
at uk.ac.manchester.cs.jfact.datatypes.LiteralImpl.hashCode(LiteralImpl.java:86)
at uk.ac.manchester.cs.jfact.datatypes.NumericLiteralImpl.hashCode(NumericLiteralImpl.java:16)
at uk.ac.manchester.cs.jfact.datatypes.LiteralEntry.hashCode(LiteralEntry.java:92)
at uk.ac.manchester.cs.jfact.kernel.DlSatTester$DataCall.hashCode(DlSatTester.java:1888)
at java.util.HashMap.hash(HashMap.java:362)
at java.util.HashMap.put(HashMap.java:492)
at java.util.HashSet.add(HashSet.java:217)
at uk.ac.manchester.cs.jfact.kernel.DlSatTester.hasDataClash(DlSatTester.java:1946)
at uk.ac.manchester.cs.jfact.kernel.DlSatTester.setupEdge(DlSatTester.java:3026)
at uk.ac.manchester.cs.jfact.kernel.DlSatTester.createNewEdge(DlSatTester.java:2935)
at uk.ac.manchester.cs.jfact.kernel.DlSatTester.commonTacticBodySome(DlSatTester.java:2875)
at uk.ac.manchester.cs.jfact.kernel.DlSatTester.commonTacticBody(DlSatTester.java:2304)
at uk.ac.manchester.cs.jfact.kernel.DlSatTester.commonTactic(DlSatTester.java:2269)
at uk.ac.manchester.cs.jfact.kernel.DlSatTester.checkSatisfiability(DlSatTester.java:2033)
at uk.ac.manchester.cs.jfact.kernel.DlSatTester.runSat(DlSatTester.java:1970)
at uk.ac.manchester.cs.jfact.kernel.NominalReasoner.consistentNominalCloud(NominalReasoner.java:135)
at uk.ac.manchester.cs.jfact.kernel.TBox.performConsistencyCheck(TBox.java:1824)
at uk.ac.manchester.cs.jfact.kernel.TBox.isConsistent(TBox.java:1075)
at uk.ac.manchester.cs.jfact.kernel.ReasoningKernel.processKB(ReasoningKernel.java:2013)
at uk.ac.manchester.cs.jfact.kernel.ReasoningKernel.realiseKB(ReasoningKernel.java:848)
at uk.ac.manchester.cs.jfact.JFactReasoner.precomputeInferences(JFactReasoner.java:406)
The text was updated successfully, but these errors were encountered: