erlangen-crm / ecrm

Erlangen CRM - An OWL implementation of the CIDOC Conceptual Reference Model
http://erlangen-crm.org
41 stars 13 forks source link

P7 took place at / P7 witness appears in the cardinality restriction ObjectMinCardinality #3

Open r0xen opened 6 years ago

r0xen commented 6 years ago

Hello, I think there is a bug in the ontology: P7 took place at can't be exactly 1.

Context: Protégé 5.2.0 on macOS 10.13.5 with Hermit 1.3.8.413, erlangen imported from url: http://erlangen-crm.org/ontology/ecrm/ecrm_170309.owl

HOW TO REPRODUCE:

Define a new activity (disjoint from siblings) with:

'P7 took place at' exactly 1 'E53 Place' and 'P7 took place at' only 'E53 Place'

running Hermit fails, with protege.log:


------------------------------- Running Reasoner -------------------------------
2018-06-15 18:41:07.217 [Classification Thread] INFO  OWLReasonerManager    
2018-06-15 18:41:07.218 [Classification Thread] ERROR OWLReasonerManager    An error occurred during reasoning: Non-simple property '<http://erlangen-crm.org/170309/P7_took_place_at>' or its inverse appears in the cardinality restriction 'ObjectMinCardinality(2 <http://erlangen-crm.org/170309/P7_took_place_at> <http://erlangen-crm.org/170309/E53_Place>)'..
java.lang.IllegalArgumentException: Non-simple property '<http://erlangen-crm.org/170309/P7_took_place_at>' or its inverse appears in the cardinality restriction 'ObjectMinCardinality(2 <http://erlangen-crm.org/170309/P7_took_place_at> <http://erlangen-crm.org/170309/E53_Place>)'.
    at org.semanticweb.HermiT.structural.ObjectPropertyInclusionManager.rewriteAxioms(ObjectPropertyInclusionManager.java:123) ~[na:na]
    at org.semanticweb.HermiT.structural.OWLClausification.preprocessAndClausify(OWLClausification.java:161) ~[na:na]
    at org.semanticweb.HermiT.Reasoner.loadOntology(Reasoner.java:208) ~[na:na]
    at org.semanticweb.HermiT.Reasoner.<init>(Reasoner.java:199) ~[na:na]
    at org.semanticweb.HermiT.Reasoner.<init>(Reasoner.java:173) ~[na:na]
    at org.semanticweb.HermiT.ReasonerFactory.createHermiTOWLReasoner(ReasonerFactory.java:51) ~[na:na]
    at org.semanticweb.HermiT.ReasonerFactory.createReasoner(ReasonerFactory.java:19) ~[na:na]
    at org.protege.editor.owl.model.inference.ReasonerUtilities.createReasoner(ReasonerUtilities.java:20) ~[na:na]
    at org.protege.editor.owl.model.inference.OWLReasonerManagerImpl$ClassificationRunner.ensureRunningReasonerInitialized(OWLReasonerManagerImpl.java:428) ~[na:na]
    at org.protege.editor.owl.model.inference.OWLReasonerManagerImpl$ClassificationRunner.run(OWLReasonerManagerImpl.java:386) ~[na:na]
    at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_40]

To me it seems like I have no control on this issue, I think it may be something on your side?

r0xen commented 6 years ago

Any update on this? A simple case attached. Out of curiosity I performed a quick search on your .owl for minCardinality properties with 2 and I couldn't find P7 or P7i, something more tricky seems going on.

test-case-bug-reasoner.owl.zip