From 639bb26339c6d06fcc67fc7f158931dbc197e214 Mon Sep 17 00:00:00 2001 From: Yevgeny Kazakov Date: Tue, 12 Mar 2024 12:32:54 +0100 Subject: [PATCH] Restore equality detection of some unsupported constructors. Fixes #61 Identical concepts built using the following constructors are detected ObjectComplementOf ObjectHasSelf ObjectUnionOf DataHasSelf For example if an ontology contains axioms: SubClassOf(:A ObjectComplementOf(:B)) SubClassOf(ObjectComplementOf(:B) :C) Then SubClassOf(:A :C) will be derived by ELK --- .../elk/matching/InferenceMatchVisitor.java | 4 ++-- ...clusionComposedMatch1InferenceVisitor.java | 6 ++--- ...usionDecomposedMatch2InferenceVisitor.java | 6 ++--- ...ubClassInclusionDecomposedMatch1Watch.java | 4 ++-- .../conclusions/SubClassInclusionMatch.java | 14 ----------- .../matching/inferences/InferenceMatch.java | 8 +++---- .../inferences/InferenceMatchBaseFactory.java | 14 +++++------ .../InferenceMatchDelegatingFactory.java | 14 +++++------ .../inferences/InferenceMatchPrinter.java | 4 ++-- ...sInclusionComposedOfDecomposedMatch1.java} | 24 +++++++++---------- ...sInclusionComposedOfDecomposedMatch2.java} | 14 +++++------ .../elk/owl/inferences/ProofTest.java | 8 ------- .../ClassInferenceConclusionVisitor.java | 2 +- .../ComposedClassInferenceVisitor.java | 2 +- .../DummyClassInferenceVisitor.java | 2 +- .../DummySaturationInferenceVisitor.java | 2 +- .../SubClassInclusionComposedInference.java | 2 +- ...ubClassInclusionComposedOfDecomposed.java} | 20 ++++++++-------- .../rules/ConditionalRuleVisitor.java | 3 +-- .../rules/DelegatingRuleVisitor.java | 5 ++-- .../saturation/rules/DummyRuleVisitor.java | 3 +-- .../rules/RuleApplicationTimerVisitor.java | 3 +-- .../saturation/rules/RuleCounterVisitor.java | 3 +-- .../ComposedFromDecomposedSubsumerRule.java | 22 ++++++++--------- .../SubsumerDecompositionRuleVisitor.java | 4 ++-- .../SubsumerDecompositionVisitor.java | 10 ++++++-- .../tracing/TracingInferenceDummyVisitor.java | 4 ++-- .../TracingInferencePremiseVisitor.java | 4 ++-- .../tracing/TracingInferencePrinter.java | 4 ++-- ...lassInferenceConclusionGettingVisitor.java | 4 ++-- .../ClassInferenceLocalPremiseVisitor.java | 4 ++-- .../SaturationGraphValidationStage.java | 3 +-- .../StructuralDataHasValueEquivalence.owl | 9 +++++++ ...StructuralDataHasValueEquivalence.taxonomy | 8 +++++++ .../StructuralDataHasValueInclusion.owl | 9 +++++++ .../StructuralDataHasValueInclusion.taxonomy | 8 +++++++ .../StructuralDisjunctionEquivalence.owl | 9 +++++++ .../StructuralDisjunctionEquivalence.taxonomy | 10 ++++++++ .../StructuralDisjunctionInclusion.owl | 9 +++++++ .../StructuralDisjunctionInclusion.taxonomy | 10 ++++++++ .../StructuralHasSelfEquivalence.owl | 9 +++++++ .../StructuralHasSelfEquivalence.taxonomy | 8 +++++++ .../StructuralHasSelfInclusion.owl | 9 +++++++ .../StructuralHasSelfInclusion.taxonomy | 8 +++++++ .../StructuralNegationEquivalence.owl | 9 +++++++ .../StructuralNegationEquivalence.taxonomy | 9 +++++++ .../StructuralNegationInclusion.owl | 9 +++++++ .../StructuralNegationInclusion.taxonomy | 9 +++++++ 48 files changed, 243 insertions(+), 125 deletions(-) rename elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/{SubClassInclusionComposedEntityMatch1.java => SubClassInclusionComposedOfDecomposedMatch1.java} (79%) rename elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/{SubClassInclusionComposedEntityMatch2.java => SubClassInclusionComposedOfDecomposedMatch2.java} (85%) rename elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/{SubClassInclusionComposedEntity.java => SubClassInclusionComposedOfDecomposed.java} (85%) create mode 100644 elk-reasoner/src/test/resources/test_input/classification/StructuralDataHasValueEquivalence.owl create mode 100644 elk-reasoner/src/test/resources/test_input/classification/StructuralDataHasValueEquivalence.taxonomy create mode 100644 elk-reasoner/src/test/resources/test_input/classification/StructuralDataHasValueInclusion.owl create mode 100644 elk-reasoner/src/test/resources/test_input/classification/StructuralDataHasValueInclusion.taxonomy create mode 100644 elk-reasoner/src/test/resources/test_input/classification/StructuralDisjunctionEquivalence.owl create mode 100644 elk-reasoner/src/test/resources/test_input/classification/StructuralDisjunctionEquivalence.taxonomy create mode 100644 elk-reasoner/src/test/resources/test_input/classification/StructuralDisjunctionInclusion.owl create mode 100644 elk-reasoner/src/test/resources/test_input/classification/StructuralDisjunctionInclusion.taxonomy create mode 100644 elk-reasoner/src/test/resources/test_input/classification/StructuralHasSelfEquivalence.owl create mode 100644 elk-reasoner/src/test/resources/test_input/classification/StructuralHasSelfEquivalence.taxonomy create mode 100644 elk-reasoner/src/test/resources/test_input/classification/StructuralHasSelfInclusion.owl create mode 100644 elk-reasoner/src/test/resources/test_input/classification/StructuralHasSelfInclusion.taxonomy create mode 100644 elk-reasoner/src/test/resources/test_input/classification/StructuralNegationEquivalence.owl create mode 100644 elk-reasoner/src/test/resources/test_input/classification/StructuralNegationEquivalence.taxonomy create mode 100644 elk-reasoner/src/test/resources/test_input/classification/StructuralNegationInclusion.owl create mode 100644 elk-reasoner/src/test/resources/test_input/classification/StructuralNegationInclusion.taxonomy diff --git a/elk-proofs/src/main/java/org/semanticweb/elk/matching/InferenceMatchVisitor.java b/elk-proofs/src/main/java/org/semanticweb/elk/matching/InferenceMatchVisitor.java index 856891a2e..a89cadcf8 100644 --- a/elk-proofs/src/main/java/org/semanticweb/elk/matching/InferenceMatchVisitor.java +++ b/elk-proofs/src/main/java/org/semanticweb/elk/matching/InferenceMatchVisitor.java @@ -1803,7 +1803,7 @@ public Void visit( } @Override - public Void visit(SubClassInclusionComposedEntityMatch1 inferenceMatch1) { + public Void visit(SubClassInclusionComposedOfDecomposedMatch1 inferenceMatch1) { SubClassInclusionDecomposedMatch1 premiseMatch2 = inferenceMatch1 .getPremiseMatch(conclusionFactory_); inferences_.add(premiseMatch2, inferenceMatch1); @@ -1816,7 +1816,7 @@ public Void visit(SubClassInclusionComposedEntityMatch1 inferenceMatch1) { } @Override - public Void visit(SubClassInclusionComposedEntityMatch2 inferenceMatch2) { + public Void visit(SubClassInclusionComposedOfDecomposedMatch2 inferenceMatch2) { inferenceMatch2.getConclusionMatch(conclusionFactory_); // no ELK inferences diff --git a/elk-proofs/src/main/java/org/semanticweb/elk/matching/SubClassInclusionComposedMatch1InferenceVisitor.java b/elk-proofs/src/main/java/org/semanticweb/elk/matching/SubClassInclusionComposedMatch1InferenceVisitor.java index 6a577cd2c..5265dc59d 100644 --- a/elk-proofs/src/main/java/org/semanticweb/elk/matching/SubClassInclusionComposedMatch1InferenceVisitor.java +++ b/elk-proofs/src/main/java/org/semanticweb/elk/matching/SubClassInclusionComposedMatch1InferenceVisitor.java @@ -25,7 +25,7 @@ import org.semanticweb.elk.matching.conclusions.SubClassInclusionComposedMatch1; import org.semanticweb.elk.matching.inferences.InferenceMatch; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedDefinedClass; -import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedEntity; +import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedOfDecomposed; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedInference; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedObjectIntersectionOf; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedObjectSomeValuesFrom; @@ -50,8 +50,8 @@ public Void visit(SubClassInclusionComposedDefinedClass inference) { } @Override - public Void visit(SubClassInclusionComposedEntity inference) { - factory.getSubClassInclusionComposedEntityMatch1(inference, child); + public Void visit(SubClassInclusionComposedOfDecomposed inference) { + factory.getSubClassInclusionComposedOfDecomposedMatch1(inference, child); return null; } diff --git a/elk-proofs/src/main/java/org/semanticweb/elk/matching/SubClassInclusionDecomposedMatch2InferenceVisitor.java b/elk-proofs/src/main/java/org/semanticweb/elk/matching/SubClassInclusionDecomposedMatch2InferenceVisitor.java index b8e184624..7de1c3068 100644 --- a/elk-proofs/src/main/java/org/semanticweb/elk/matching/SubClassInclusionDecomposedMatch2InferenceVisitor.java +++ b/elk-proofs/src/main/java/org/semanticweb/elk/matching/SubClassInclusionDecomposedMatch2InferenceVisitor.java @@ -30,7 +30,7 @@ import org.semanticweb.elk.matching.inferences.ForwardLinkOfObjectHasSelfMatch1; import org.semanticweb.elk.matching.inferences.ForwardLinkOfObjectSomeValuesFromMatch1; import org.semanticweb.elk.matching.inferences.InferenceMatch; -import org.semanticweb.elk.matching.inferences.SubClassInclusionComposedEntityMatch1; +import org.semanticweb.elk.matching.inferences.SubClassInclusionComposedOfDecomposedMatch1; import org.semanticweb.elk.matching.inferences.SubClassInclusionDecomposedFirstConjunctMatch1; import org.semanticweb.elk.matching.inferences.SubClassInclusionDecomposedSecondConjunctMatch1; import org.semanticweb.elk.matching.inferences.SubClassInclusionExpandedDefinitionMatch2; @@ -82,8 +82,8 @@ public Void visit(ForwardLinkOfObjectSomeValuesFromMatch1 inferenceMatch1) { } @Override - public Void visit(SubClassInclusionComposedEntityMatch1 inferenceMatch1) { - factory.getSubClassInclusionComposedEntityMatch2(inferenceMatch1, + public Void visit(SubClassInclusionComposedOfDecomposedMatch1 inferenceMatch1) { + factory.getSubClassInclusionComposedOfDecomposedMatch2(inferenceMatch1, child); return null; } diff --git a/elk-proofs/src/main/java/org/semanticweb/elk/matching/conclusions/SubClassInclusionDecomposedMatch1Watch.java b/elk-proofs/src/main/java/org/semanticweb/elk/matching/conclusions/SubClassInclusionDecomposedMatch1Watch.java index 80f778bb3..cf19f771d 100644 --- a/elk-proofs/src/main/java/org/semanticweb/elk/matching/conclusions/SubClassInclusionDecomposedMatch1Watch.java +++ b/elk-proofs/src/main/java/org/semanticweb/elk/matching/conclusions/SubClassInclusionDecomposedMatch1Watch.java @@ -6,7 +6,7 @@ import org.semanticweb.elk.matching.inferences.ForwardLinkOfObjectHasSelfMatch1; import org.semanticweb.elk.matching.inferences.ForwardLinkOfObjectSomeValuesFromMatch1; import org.semanticweb.elk.matching.inferences.InferenceMatch; -import org.semanticweb.elk.matching.inferences.SubClassInclusionComposedEntityMatch1; +import org.semanticweb.elk.matching.inferences.SubClassInclusionComposedOfDecomposedMatch1; import org.semanticweb.elk.matching.inferences.SubClassInclusionDecomposedFirstConjunctMatch1; import org.semanticweb.elk.matching.inferences.SubClassInclusionDecomposedSecondConjunctMatch1; import org.semanticweb.elk.matching.inferences.SubClassInclusionExpandedDefinitionMatch2; @@ -51,7 +51,7 @@ interface Visitor extends BackwardLinkOfObjectHasSelfMatch1.Visitor, ClassInconsistencyOfObjectComplementOfMatch1.Visitor, ForwardLinkOfObjectHasSelfMatch1.Visitor, ForwardLinkOfObjectSomeValuesFromMatch1.Visitor, - SubClassInclusionComposedEntityMatch1.Visitor, + SubClassInclusionComposedOfDecomposedMatch1.Visitor, SubClassInclusionDecomposedFirstConjunctMatch1.Visitor, SubClassInclusionDecomposedSecondConjunctMatch1.Visitor, SubClassInclusionExpandedDefinitionMatch2.Visitor, diff --git a/elk-proofs/src/main/java/org/semanticweb/elk/matching/conclusions/SubClassInclusionMatch.java b/elk-proofs/src/main/java/org/semanticweb/elk/matching/conclusions/SubClassInclusionMatch.java index a30667ace..12b7bbc43 100644 --- a/elk-proofs/src/main/java/org/semanticweb/elk/matching/conclusions/SubClassInclusionMatch.java +++ b/elk-proofs/src/main/java/org/semanticweb/elk/matching/conclusions/SubClassInclusionMatch.java @@ -1,7 +1,6 @@ package org.semanticweb.elk.matching.conclusions; import org.semanticweb.elk.matching.ElkMatchException; -import org.semanticweb.elk.matching.subsumers.IndexedClassEntityMatch; import org.semanticweb.elk.matching.subsumers.IndexedClassMatch; import org.semanticweb.elk.matching.subsumers.IndexedIndividualMatch; import org.semanticweb.elk.matching.subsumers.IndexedObjectComplementOfMatch; @@ -105,19 +104,6 @@ private O failSubsumerMatch() { throw new ElkMatchException(getSubsumer(), subsumerMatch_); } - public IndexedClassEntityMatch getSubsumerIndexedClassEntityMatch() { - return subsumerMatch_ - .accept(new FailingSubsumerMatcher() { - - @Override - public IndexedClassEntityMatch defaultVisit( - IndexedClassEntityMatch match) { - return match; - } - - }); - } - public O accept(final IndexedObjectUnionOfMatchVisitor visitor) { if (subsumerMatch_ instanceof SubsumerElkObjectMatch) { diff --git a/elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/InferenceMatch.java b/elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/InferenceMatch.java index 8524de634..7508574bb 100644 --- a/elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/InferenceMatch.java +++ b/elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/InferenceMatch.java @@ -117,8 +117,8 @@ interface Factory extends BackwardLinkCompositionMatch1.Factory, SubClassInclusionComposedEmptyObjectOneOfMatch2.Factory, SubClassInclusionComposedEmptyObjectUnionOfMatch1.Factory, SubClassInclusionComposedEmptyObjectUnionOfMatch2.Factory, - SubClassInclusionComposedEntityMatch1.Factory, - SubClassInclusionComposedEntityMatch2.Factory, + SubClassInclusionComposedOfDecomposedMatch1.Factory, + SubClassInclusionComposedOfDecomposedMatch2.Factory, SubClassInclusionComposedObjectHasValueMatch1.Factory, SubClassInclusionComposedObjectHasValueMatch2.Factory, SubClassInclusionComposedObjectIntersectionOfMatch1.Factory, @@ -268,8 +268,8 @@ interface Visitor extends BackwardLinkCompositionMatch1.Visitor, SubClassInclusionComposedEmptyObjectOneOfMatch2.Visitor, SubClassInclusionComposedEmptyObjectUnionOfMatch1.Visitor, SubClassInclusionComposedEmptyObjectUnionOfMatch2.Visitor, - SubClassInclusionComposedEntityMatch1.Visitor, - SubClassInclusionComposedEntityMatch2.Visitor, + SubClassInclusionComposedOfDecomposedMatch1.Visitor, + SubClassInclusionComposedOfDecomposedMatch2.Visitor, SubClassInclusionComposedObjectHasValueMatch1.Visitor, SubClassInclusionComposedObjectHasValueMatch2.Visitor, SubClassInclusionComposedObjectIntersectionOfMatch1.Visitor, diff --git a/elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/InferenceMatchBaseFactory.java b/elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/InferenceMatchBaseFactory.java index 612384a8b..6bd1f72d8 100644 --- a/elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/InferenceMatchBaseFactory.java +++ b/elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/InferenceMatchBaseFactory.java @@ -94,7 +94,7 @@ import org.semanticweb.elk.reasoner.saturation.inferences.ForwardLinkOfObjectSomeValuesFrom; import org.semanticweb.elk.reasoner.saturation.inferences.PropagationGenerated; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedDefinedClass; -import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedEntity; +import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedOfDecomposed; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedObjectIntersectionOf; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedObjectSomeValuesFrom; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedObjectUnionOf; @@ -758,18 +758,18 @@ public SubClassInclusionComposedEmptyObjectUnionOfMatch2 getSubClassInclusionCom } @Override - public SubClassInclusionComposedEntityMatch1 getSubClassInclusionComposedEntityMatch1( - SubClassInclusionComposedEntity parent, + public SubClassInclusionComposedOfDecomposedMatch1 getSubClassInclusionComposedOfDecomposedMatch1( + SubClassInclusionComposedOfDecomposed parent, SubClassInclusionComposedMatch1 conclusionMatch) { - return new SubClassInclusionComposedEntityMatch1(parent, + return new SubClassInclusionComposedOfDecomposedMatch1(parent, conclusionMatch); } @Override - public SubClassInclusionComposedEntityMatch2 getSubClassInclusionComposedEntityMatch2( - SubClassInclusionComposedEntityMatch1 parent, + public SubClassInclusionComposedOfDecomposedMatch2 getSubClassInclusionComposedOfDecomposedMatch2( + SubClassInclusionComposedOfDecomposedMatch1 parent, SubClassInclusionDecomposedMatch2 premiseMatch) { - return new SubClassInclusionComposedEntityMatch2(parent, premiseMatch); + return new SubClassInclusionComposedOfDecomposedMatch2(parent, premiseMatch); } @Override diff --git a/elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/InferenceMatchDelegatingFactory.java b/elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/InferenceMatchDelegatingFactory.java index a0f978691..75681a66d 100644 --- a/elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/InferenceMatchDelegatingFactory.java +++ b/elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/InferenceMatchDelegatingFactory.java @@ -94,7 +94,7 @@ import org.semanticweb.elk.reasoner.saturation.inferences.ForwardLinkOfObjectSomeValuesFrom; import org.semanticweb.elk.reasoner.saturation.inferences.PropagationGenerated; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedDefinedClass; -import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedEntity; +import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedOfDecomposed; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedObjectIntersectionOf; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedObjectSomeValuesFrom; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedObjectUnionOf; @@ -836,18 +836,18 @@ public SubClassInclusionComposedEmptyObjectUnionOfMatch2 getSubClassInclusionCom } @Override - public SubClassInclusionComposedEntityMatch1 getSubClassInclusionComposedEntityMatch1( - SubClassInclusionComposedEntity parent, + public SubClassInclusionComposedOfDecomposedMatch1 getSubClassInclusionComposedOfDecomposedMatch1( + SubClassInclusionComposedOfDecomposed parent, SubClassInclusionComposedMatch1 conclusionMatch) { - return filter(mainFactory_.getSubClassInclusionComposedEntityMatch1( + return filter(mainFactory_.getSubClassInclusionComposedOfDecomposedMatch1( parent, conclusionMatch)); } @Override - public SubClassInclusionComposedEntityMatch2 getSubClassInclusionComposedEntityMatch2( - SubClassInclusionComposedEntityMatch1 parent, + public SubClassInclusionComposedOfDecomposedMatch2 getSubClassInclusionComposedOfDecomposedMatch2( + SubClassInclusionComposedOfDecomposedMatch1 parent, SubClassInclusionDecomposedMatch2 premiseMatch) { - return filter(mainFactory_.getSubClassInclusionComposedEntityMatch2( + return filter(mainFactory_.getSubClassInclusionComposedOfDecomposedMatch2( parent, premiseMatch)); } diff --git a/elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/InferenceMatchPrinter.java b/elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/InferenceMatchPrinter.java index 7b841ca6c..d0258d70e 100644 --- a/elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/InferenceMatchPrinter.java +++ b/elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/InferenceMatchPrinter.java @@ -506,12 +506,12 @@ public String visit( } @Override - public String visit(SubClassInclusionComposedEntityMatch1 inferenceMatch1) { + public String visit(SubClassInclusionComposedOfDecomposedMatch1 inferenceMatch1) { return inferenceMatch1.getParent() + " | "; } @Override - public String visit(SubClassInclusionComposedEntityMatch2 inferenceMatch2) { + public String visit(SubClassInclusionComposedOfDecomposedMatch2 inferenceMatch2) { return inferenceMatch2.getParent() + " | "; } diff --git a/elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/SubClassInclusionComposedEntityMatch1.java b/elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/SubClassInclusionComposedOfDecomposedMatch1.java similarity index 79% rename from elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/SubClassInclusionComposedEntityMatch1.java rename to elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/SubClassInclusionComposedOfDecomposedMatch1.java index 3d7d05b24..4f91b7ec7 100644 --- a/elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/SubClassInclusionComposedEntityMatch1.java +++ b/elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/SubClassInclusionComposedOfDecomposedMatch1.java @@ -27,25 +27,23 @@ import org.semanticweb.elk.matching.conclusions.SubClassInclusionDecomposedMatch1; import org.semanticweb.elk.matching.conclusions.SubClassInclusionDecomposedMatch1Watch; import org.semanticweb.elk.matching.root.IndexedContextRootMatch; -import org.semanticweb.elk.matching.subsumers.IndexedClassEntityMatch; import org.semanticweb.elk.matching.subsumers.SubsumerMatch; -import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedEntity; +import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedOfDecomposed; -public class SubClassInclusionComposedEntityMatch1 - extends AbstractInferenceMatch +public class SubClassInclusionComposedOfDecomposedMatch1 + extends AbstractInferenceMatch implements SubClassInclusionDecomposedMatch1Watch { private final IndexedContextRootMatch originMatch_; - private final IndexedClassEntityMatch conclusionSubsumerMatch_; + private final SubsumerMatch conclusionSubsumerMatch_; - SubClassInclusionComposedEntityMatch1( - SubClassInclusionComposedEntity parent, + SubClassInclusionComposedOfDecomposedMatch1( + SubClassInclusionComposedOfDecomposed parent, SubClassInclusionComposedMatch1 conclusionMatch) { super(parent); this.originMatch_ = conclusionMatch.getDestinationMatch(); - this.conclusionSubsumerMatch_ = conclusionMatch - .getSubsumerIndexedClassEntityMatch(); + this.conclusionSubsumerMatch_ = conclusionMatch.getSubsumerMatch(); checkEquals(conclusionMatch, getConclusionMatch(DEBUG_FACTORY)); } @@ -53,7 +51,7 @@ public IndexedContextRootMatch getOriginMatch() { return originMatch_; } - public IndexedClassEntityMatch getConclusionSubsumerMatch() { + public SubsumerMatch getConclusionSubsumerMatch() { return conclusionSubsumerMatch_; } @@ -91,7 +89,7 @@ public O accept( */ public interface Visitor { - O visit(SubClassInclusionComposedEntityMatch1 inferenceMatch1); + O visit(SubClassInclusionComposedOfDecomposedMatch1 inferenceMatch1); } @@ -103,8 +101,8 @@ public interface Visitor { */ public interface Factory { - SubClassInclusionComposedEntityMatch1 getSubClassInclusionComposedEntityMatch1( - SubClassInclusionComposedEntity parent, + SubClassInclusionComposedOfDecomposedMatch1 getSubClassInclusionComposedOfDecomposedMatch1( + SubClassInclusionComposedOfDecomposed parent, SubClassInclusionComposedMatch1 conclusionMatch); } diff --git a/elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/SubClassInclusionComposedEntityMatch2.java b/elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/SubClassInclusionComposedOfDecomposedMatch2.java similarity index 85% rename from elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/SubClassInclusionComposedEntityMatch2.java rename to elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/SubClassInclusionComposedOfDecomposedMatch2.java index 805b8619f..116f0584f 100644 --- a/elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/SubClassInclusionComposedEntityMatch2.java +++ b/elk-proofs/src/main/java/org/semanticweb/elk/matching/inferences/SubClassInclusionComposedOfDecomposedMatch2.java @@ -30,13 +30,13 @@ import org.semanticweb.elk.matching.root.IndexedContextRootMatch; import org.semanticweb.elk.matching.subsumers.SubsumerMatch; -public class SubClassInclusionComposedEntityMatch2 - extends AbstractInferenceMatch { +public class SubClassInclusionComposedOfDecomposedMatch2 + extends AbstractInferenceMatch { private final IndexedContextRootMatch extendedOriginMatch_; - SubClassInclusionComposedEntityMatch2( - SubClassInclusionComposedEntityMatch1 parent, + SubClassInclusionComposedOfDecomposedMatch2( + SubClassInclusionComposedOfDecomposedMatch1 parent, SubClassInclusionDecomposedMatch2 premiseMatch) { super(parent); SubsumerMatch subsumerMatch = premiseMatch.getSubsumerMatch(); @@ -81,7 +81,7 @@ public O accept(InferenceMatch.Visitor visitor) { */ public interface Visitor { - O visit(SubClassInclusionComposedEntityMatch2 inferenceMatch2); + O visit(SubClassInclusionComposedOfDecomposedMatch2 inferenceMatch2); } @@ -93,8 +93,8 @@ public interface Visitor { */ public interface Factory { - SubClassInclusionComposedEntityMatch2 getSubClassInclusionComposedEntityMatch2( - SubClassInclusionComposedEntityMatch1 parent, + SubClassInclusionComposedOfDecomposedMatch2 getSubClassInclusionComposedOfDecomposedMatch2( + SubClassInclusionComposedOfDecomposedMatch1 parent, SubClassInclusionDecomposedMatch2 premiseMatch); } diff --git a/elk-proofs/src/test/java/org/semanticweb/elk/owl/inferences/ProofTest.java b/elk-proofs/src/test/java/org/semanticweb/elk/owl/inferences/ProofTest.java index efacbf4b7..b193ed05f 100644 --- a/elk-proofs/src/test/java/org/semanticweb/elk/owl/inferences/ProofTest.java +++ b/elk-proofs/src/test/java/org/semanticweb/elk/owl/inferences/ProofTest.java @@ -97,15 +97,7 @@ public void provabilityTest() throws Exception { Reasoner reasoner = TestReasonerUtils.createTestReasoner(loader); try { - // reasoner.getTaxonomy(); - // ElkClass sub = elkFactory.getClass(new ElkFullIri("StiffNeck")); - // ElkClass sup = elkFactory - // .getClass(new ElkFullIri("PropertyOfPhenomenon")); - // - // getTestingVisitor(reasoner, ontology).subsumptionTest(sub, sup); - TracingTests tests = getProvabilityTests(reasoner); - tests.accept(getTestingVisitor(reasoner, ontology)); } finally { reasoner.shutdown(); diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/ClassInferenceConclusionVisitor.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/ClassInferenceConclusionVisitor.java index 57978500d..7334390f7 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/ClassInferenceConclusionVisitor.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/ClassInferenceConclusionVisitor.java @@ -135,7 +135,7 @@ public O visit(SubClassInclusionComposedDefinedClass inference) { } @Override - public O visit(SubClassInclusionComposedEntity inference) { + public O visit(SubClassInclusionComposedOfDecomposed inference) { return conclusionVisitor_ .visit(inference.getConclusion(conclusionFactory_)); } diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/ComposedClassInferenceVisitor.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/ComposedClassInferenceVisitor.java index 7f95bd155..5ad760ad3 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/ComposedClassInferenceVisitor.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/ComposedClassInferenceVisitor.java @@ -198,7 +198,7 @@ public Boolean visit(SubClassInclusionComposedDefinedClass inference) { } @Override - public Boolean visit(SubClassInclusionComposedEntity inference) { + public Boolean visit(SubClassInclusionComposedOfDecomposed inference) { for (int i = 0; i < visitors_.length; i++) { if (!visitors_[i].visit(inference)) return false; diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/DummyClassInferenceVisitor.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/DummyClassInferenceVisitor.java index 3e4700408..ab11a5d14 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/DummyClassInferenceVisitor.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/DummyClassInferenceVisitor.java @@ -131,7 +131,7 @@ public O visit(SubClassInclusionComposedDefinedClass inference) { } @Override - public O visit(SubClassInclusionComposedEntity inference) { + public O visit(SubClassInclusionComposedOfDecomposed inference) { return defaultVisit(inference); } diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/DummySaturationInferenceVisitor.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/DummySaturationInferenceVisitor.java index f095aa083..e714b61b0 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/DummySaturationInferenceVisitor.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/DummySaturationInferenceVisitor.java @@ -137,7 +137,7 @@ public O visit(SubClassInclusionComposedDefinedClass inference) { } @Override - public O visit(SubClassInclusionComposedEntity inference) { + public O visit(SubClassInclusionComposedOfDecomposed inference) { return defaultVisit(inference); } diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/SubClassInclusionComposedInference.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/SubClassInclusionComposedInference.java index 3e4357380..b2e057f35 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/SubClassInclusionComposedInference.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/SubClassInclusionComposedInference.java @@ -45,7 +45,7 @@ public interface SubClassInclusionComposedInference */ public static interface Visitor extends SubClassInclusionComposedDefinedClass.Visitor, - SubClassInclusionComposedEntity.Visitor, + SubClassInclusionComposedOfDecomposed.Visitor, SubClassInclusionComposedObjectIntersectionOf.Visitor, SubClassInclusionComposedObjectSomeValuesFrom.Visitor, SubClassInclusionComposedObjectUnionOf.Visitor, diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/SubClassInclusionComposedEntity.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/SubClassInclusionComposedOfDecomposed.java similarity index 85% rename from elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/SubClassInclusionComposedEntity.java rename to elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/SubClassInclusionComposedOfDecomposed.java index 71b09a203..ad1e85196 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/SubClassInclusionComposedEntity.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/inferences/SubClassInclusionComposedOfDecomposed.java @@ -26,8 +26,8 @@ */ import org.semanticweb.elk.reasoner.indexing.model.IndexedClassEntity; +import org.semanticweb.elk.reasoner.indexing.model.IndexedClassExpression; import org.semanticweb.elk.reasoner.indexing.model.IndexedContextRoot; -import org.semanticweb.elk.reasoner.indexing.model.IndexedEntity; import org.semanticweb.elk.reasoner.saturation.conclusions.model.SubClassInclusionComposed; import org.semanticweb.elk.reasoner.saturation.conclusions.model.SubClassInclusionDecomposed; import org.semanticweb.elk.reasoner.tracing.Conclusion; @@ -37,27 +37,27 @@ * A {@link ClassInference} producing a {@link SubClassInclusionComposed} from a * {@link SubClassInclusionDecomposed} with * {@link SubClassInclusionDecomposed#getSubsumer()} instance of - * {@link IndexedEntity}:
+ * {@link IndexedClassExpression}:
* *
- *  [C] ⊑ -A
+ *  [C] ⊑ -D
  * ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
- *  [C] ⊑ +A
+ *  [C] ⊑ +D
  * 
* * The parameters can be obtained as follows:
* * C = {@link #getOrigin()} = {@link #getDestination()}
- * A = {@link #getSubsumer()}
+ * D = {@link #getSubsumer()}
* * @author "Yevgeny Kazakov" * */ -public class SubClassInclusionComposedEntity - extends AbstractSubClassInclusionComposedInference { +public class SubClassInclusionComposedOfDecomposed + extends AbstractSubClassInclusionComposedInference { - public SubClassInclusionComposedEntity(IndexedContextRoot origin, - IndexedClassEntity subsumer) { + public SubClassInclusionComposedOfDecomposed(IndexedContextRoot origin, + IndexedClassExpression subsumer) { super(origin, subsumer); } @@ -103,7 +103,7 @@ public final O accept( */ public static interface Visitor { - public O visit(SubClassInclusionComposedEntity inference); + public O visit(SubClassInclusionComposedOfDecomposed inference); } diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/ConditionalRuleVisitor.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/ConditionalRuleVisitor.java index 1fcd4b026..74fbb17e0 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/ConditionalRuleVisitor.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/ConditionalRuleVisitor.java @@ -23,7 +23,6 @@ */ import org.semanticweb.elk.reasoner.indexing.model.IndexedClass; -import org.semanticweb.elk.reasoner.indexing.model.IndexedClassEntity; import org.semanticweb.elk.reasoner.indexing.model.IndexedClassExpression; import org.semanticweb.elk.reasoner.indexing.model.IndexedObjectComplementOf; import org.semanticweb.elk.reasoner.indexing.model.IndexedObjectHasSelf; @@ -111,7 +110,7 @@ public O visit(BackwardLinkFromForwardLinkRule rule, ForwardLink premise, @Override public O visit(ComposedFromDecomposedSubsumerRule rule, - IndexedClassEntity premise, ContextPremises premises, + IndexedClassExpression premise, ContextPremises premises, ClassInferenceProducer producer) { if (condition_.visit(rule, premise, premises, producer)) return visitor_.visit(rule, premise, premises, producer); diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/DelegatingRuleVisitor.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/DelegatingRuleVisitor.java index c6f0ad7fb..3bfec01fb 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/DelegatingRuleVisitor.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/DelegatingRuleVisitor.java @@ -23,15 +23,14 @@ */ import org.semanticweb.elk.reasoner.indexing.model.IndexedClass; -import org.semanticweb.elk.reasoner.indexing.model.IndexedClassEntity; import org.semanticweb.elk.reasoner.indexing.model.IndexedClassExpression; import org.semanticweb.elk.reasoner.indexing.model.IndexedObjectComplementOf; import org.semanticweb.elk.reasoner.indexing.model.IndexedObjectHasSelf; import org.semanticweb.elk.reasoner.indexing.model.IndexedObjectIntersectionOf; import org.semanticweb.elk.reasoner.indexing.model.IndexedObjectSomeValuesFrom; import org.semanticweb.elk.reasoner.saturation.conclusions.model.BackwardLink; -import org.semanticweb.elk.reasoner.saturation.conclusions.model.ContextInitialization; import org.semanticweb.elk.reasoner.saturation.conclusions.model.ClassInconsistency; +import org.semanticweb.elk.reasoner.saturation.conclusions.model.ContextInitialization; import org.semanticweb.elk.reasoner.saturation.conclusions.model.DisjointSubsumer; import org.semanticweb.elk.reasoner.saturation.conclusions.model.ForwardLink; import org.semanticweb.elk.reasoner.saturation.conclusions.model.Propagation; @@ -99,7 +98,7 @@ public O visit(BackwardLinkFromForwardLinkRule rule, ForwardLink premise, @Override public O visit(ComposedFromDecomposedSubsumerRule rule, - IndexedClassEntity premise, ContextPremises premises, + IndexedClassExpression premise, ContextPremises premises, ClassInferenceProducer producer) { return visitor_.visit(rule, premise, premises, producer); } diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/DummyRuleVisitor.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/DummyRuleVisitor.java index 009f1f3c6..207cd6fe1 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/DummyRuleVisitor.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/DummyRuleVisitor.java @@ -23,7 +23,6 @@ */ import org.semanticweb.elk.reasoner.indexing.model.IndexedClass; -import org.semanticweb.elk.reasoner.indexing.model.IndexedClassEntity; import org.semanticweb.elk.reasoner.indexing.model.IndexedClassExpression; import org.semanticweb.elk.reasoner.indexing.model.IndexedObjectComplementOf; import org.semanticweb.elk.reasoner.indexing.model.IndexedObjectHasSelf; @@ -116,7 +115,7 @@ public O visit(BackwardLinkFromForwardLinkRule rule, ForwardLink premise, @Override public O visit(ComposedFromDecomposedSubsumerRule rule, - IndexedClassEntity premise, ContextPremises premises, + IndexedClassExpression premise, ContextPremises premises, ClassInferenceProducer producer) { return defaultVisit(rule, premise, premises, producer); } diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/RuleApplicationTimerVisitor.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/RuleApplicationTimerVisitor.java index 2cb89ba33..8fb1d43f5 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/RuleApplicationTimerVisitor.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/RuleApplicationTimerVisitor.java @@ -23,7 +23,6 @@ */ import org.semanticweb.elk.reasoner.indexing.model.IndexedClass; -import org.semanticweb.elk.reasoner.indexing.model.IndexedClassEntity; import org.semanticweb.elk.reasoner.indexing.model.IndexedClassExpression; import org.semanticweb.elk.reasoner.indexing.model.IndexedObjectComplementOf; import org.semanticweb.elk.reasoner.indexing.model.IndexedObjectHasSelf; @@ -122,7 +121,7 @@ public O visit(BackwardLinkFromForwardLinkRule rule, ForwardLink premise, @Override public O visit(ComposedFromDecomposedSubsumerRule rule, - IndexedClassEntity premise, ContextPremises premises, + IndexedClassExpression premise, ContextPremises premises, ClassInferenceProducer producer) { timer_.timeComposedFromDecomposedSubsumerRule -= CachedTimeThread .getCurrentTimeMillis(); diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/RuleCounterVisitor.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/RuleCounterVisitor.java index 3d991cdb3..98dc7abfa 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/RuleCounterVisitor.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/RuleCounterVisitor.java @@ -23,7 +23,6 @@ */ import org.semanticweb.elk.reasoner.indexing.model.IndexedClass; -import org.semanticweb.elk.reasoner.indexing.model.IndexedClassEntity; import org.semanticweb.elk.reasoner.indexing.model.IndexedClassExpression; import org.semanticweb.elk.reasoner.indexing.model.IndexedObjectComplementOf; import org.semanticweb.elk.reasoner.indexing.model.IndexedObjectHasSelf; @@ -112,7 +111,7 @@ public O visit(BackwardLinkFromForwardLinkRule rule, ForwardLink premise, @Override public O visit(ComposedFromDecomposedSubsumerRule rule, - IndexedClassEntity premise, ContextPremises premises, + IndexedClassExpression premise, ContextPremises premises, ClassInferenceProducer producer) { counter_.countComposedFromDecomposedSubsumerRule++; return visitor_.visit(rule, premise, premises, producer); diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/subsumers/ComposedFromDecomposedSubsumerRule.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/subsumers/ComposedFromDecomposedSubsumerRule.java index 053dae481..5eeca49d8 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/subsumers/ComposedFromDecomposedSubsumerRule.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/subsumers/ComposedFromDecomposedSubsumerRule.java @@ -1,12 +1,12 @@ package org.semanticweb.elk.reasoner.saturation.rules.subsumers; -/* +/*- * #%L - * ELK Reasoner + * ELK Reasoner Core * $Id:$ * $HeadURL:$ * %% - * Copyright (C) 2011 - 2015 Department of Computer Science, University of Oxford + * Copyright (C) 2011 - 2024 Department of Computer Science, University of Oxford * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,23 +22,23 @@ * #L% */ -import org.semanticweb.elk.reasoner.indexing.model.IndexedClassEntity; +import org.semanticweb.elk.reasoner.indexing.model.IndexedClassExpression; import org.semanticweb.elk.reasoner.saturation.conclusions.model.SubClassInclusionComposed; import org.semanticweb.elk.reasoner.saturation.conclusions.model.SubClassInclusionDecomposed; import org.semanticweb.elk.reasoner.saturation.context.ContextPremises; -import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedEntity; +import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedOfDecomposed; import org.semanticweb.elk.reasoner.saturation.rules.ClassInferenceProducer; /** * * A {@link SubsumerDecompositionRule} producing {@link SubClassInclusionComposed} when - * processing a {@link SubClassInclusionDecomposed} for {@link IndexedClassEntity} + * processing a {@link SubClassInclusionDecomposed} for {@link IndexedClassExpression} * * @author "Yevgeny Kazakov" * */ public class ComposedFromDecomposedSubsumerRule extends - AbstractSubsumerDecompositionRule { + AbstractSubsumerDecompositionRule { private static final ComposedFromDecomposedSubsumerRule INSTANCE_ = new ComposedFromDecomposedSubsumerRule(); @@ -49,14 +49,14 @@ public String toString() { return NAME; } - public static SubsumerDecompositionRule getInstance() { + public static SubsumerDecompositionRule getInstance() { return INSTANCE_; } @Override - public void apply(IndexedClassEntity premise, ContextPremises premises, + public void apply(IndexedClassExpression premise, ContextPremises premises, ClassInferenceProducer producer) { - producer.produce(new SubClassInclusionComposedEntity(premises.getRoot(), premise)); + producer.produce(new SubClassInclusionComposedOfDecomposed(premises.getRoot(), premise)); } @Override @@ -66,7 +66,7 @@ public boolean isTracingRule() { @Override public void accept(SubsumerDecompositionRuleVisitor visitor, - IndexedClassEntity premise, ContextPremises premises, + IndexedClassExpression premise, ContextPremises premises, ClassInferenceProducer producer) { visitor.visit(this, premise, premises, producer); } diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/subsumers/SubsumerDecompositionRuleVisitor.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/subsumers/SubsumerDecompositionRuleVisitor.java index 31ddee7f8..be09ee29a 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/subsumers/SubsumerDecompositionRuleVisitor.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/subsumers/SubsumerDecompositionRuleVisitor.java @@ -23,7 +23,7 @@ */ import org.semanticweb.elk.reasoner.indexing.model.IndexedClass; -import org.semanticweb.elk.reasoner.indexing.model.IndexedClassEntity; +import org.semanticweb.elk.reasoner.indexing.model.IndexedClassExpression; import org.semanticweb.elk.reasoner.indexing.model.IndexedObjectComplementOf; import org.semanticweb.elk.reasoner.indexing.model.IndexedObjectHasSelf; import org.semanticweb.elk.reasoner.indexing.model.IndexedObjectIntersectionOf; @@ -42,7 +42,7 @@ public interface SubsumerDecompositionRuleVisitor { O visit(ComposedFromDecomposedSubsumerRule rule, - IndexedClassEntity premise, ContextPremises premises, + IndexedClassExpression premise, ContextPremises premises, ClassInferenceProducer producer); O visit(IndexedClassDecompositionRule rule, IndexedClass premise, diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/subsumers/SubsumerDecompositionVisitor.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/subsumers/SubsumerDecompositionVisitor.java index 7c5b719be..1c8763b0a 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/subsumers/SubsumerDecompositionVisitor.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/subsumers/SubsumerDecompositionVisitor.java @@ -87,6 +87,8 @@ public Void visit(IndexedIndividual element) { @Override public Void visit(IndexedObjectComplementOf element) { + ComposedFromDecomposedSubsumerRule.getInstance().accept(ruleVisitor_, + element, premises_, producer_); IndexedObjectComplementOfDecomposition.getInstance().accept( ruleVisitor_, element, premises_, producer_); return null; @@ -108,6 +110,8 @@ public Void visit(IndexedObjectSomeValuesFrom element) { @Override public Void visit(IndexedObjectHasSelf element) { + ComposedFromDecomposedSubsumerRule.getInstance().accept(ruleVisitor_, + element, premises_, producer_); IndexedObjectHasSelfDecomposition.getInstance().accept(ruleVisitor_, element, premises_, producer_); return null; @@ -115,13 +119,15 @@ public Void visit(IndexedObjectHasSelf element) { @Override public Void visit(IndexedObjectUnionOf element) { - // not supported + ComposedFromDecomposedSubsumerRule.getInstance().accept(ruleVisitor_, + element, premises_, producer_); return null; } @Override public Void visit(IndexedDataHasValue element) { - // not supported + ComposedFromDecomposedSubsumerRule.getInstance().accept(ruleVisitor_, + element, premises_, producer_); return null; } diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/tracing/TracingInferenceDummyVisitor.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/tracing/TracingInferenceDummyVisitor.java index 80e673523..df6a82812 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/tracing/TracingInferenceDummyVisitor.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/tracing/TracingInferenceDummyVisitor.java @@ -43,7 +43,7 @@ import org.semanticweb.elk.reasoner.saturation.inferences.PropagationGenerated; import org.semanticweb.elk.reasoner.saturation.inferences.SaturationInference; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedDefinedClass; -import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedEntity; +import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedOfDecomposed; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedObjectIntersectionOf; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedObjectSomeValuesFrom; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedObjectUnionOf; @@ -307,7 +307,7 @@ public O visit(SubClassInclusionComposedDefinedClass inference) { } @Override - public O visit(SubClassInclusionComposedEntity inference) { + public O visit(SubClassInclusionComposedOfDecomposed inference) { return defaultVisit(inference); } diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/tracing/TracingInferencePremiseVisitor.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/tracing/TracingInferencePremiseVisitor.java index 80b2822c1..406ad3251 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/tracing/TracingInferencePremiseVisitor.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/tracing/TracingInferencePremiseVisitor.java @@ -64,7 +64,7 @@ import org.semanticweb.elk.reasoner.saturation.inferences.ForwardLinkOfObjectSomeValuesFrom; import org.semanticweb.elk.reasoner.saturation.inferences.PropagationGenerated; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedDefinedClass; -import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedEntity; +import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedOfDecomposed; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedObjectIntersectionOf; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedObjectSomeValuesFrom; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedObjectUnionOf; @@ -378,7 +378,7 @@ public O visit(SubClassInclusionComposedDefinedClass inference) { } @Override - public O visit(SubClassInclusionComposedEntity inference) { + public O visit(SubClassInclusionComposedOfDecomposed inference) { conclusionVisitor_.visit(inference.getPremise(conclusionFactory_)); return null; } diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/tracing/TracingInferencePrinter.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/tracing/TracingInferencePrinter.java index 70c1cfebd..2a274d916 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/tracing/TracingInferencePrinter.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/tracing/TracingInferencePrinter.java @@ -59,7 +59,7 @@ import org.semanticweb.elk.reasoner.saturation.inferences.ForwardLinkOfObjectSomeValuesFrom; import org.semanticweb.elk.reasoner.saturation.inferences.PropagationGenerated; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedDefinedClass; -import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedEntity; +import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedOfDecomposed; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedObjectIntersectionOf; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedObjectSomeValuesFrom; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedObjectUnionOf; @@ -347,7 +347,7 @@ public String visit(SubClassInclusionComposedDefinedClass inference) { } @Override - public String visit(SubClassInclusionComposedEntity inference) { + public String visit(SubClassInclusionComposedOfDecomposed inference) { return String.format("%s -| %s", inference.getConclusion(factory_), inference.getPremise(factory_)); } diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/tracing/factories/ClassInferenceConclusionGettingVisitor.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/tracing/factories/ClassInferenceConclusionGettingVisitor.java index 0ac84fbfb..e7920a064 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/tracing/factories/ClassInferenceConclusionGettingVisitor.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/tracing/factories/ClassInferenceConclusionGettingVisitor.java @@ -42,7 +42,7 @@ import org.semanticweb.elk.reasoner.saturation.inferences.ForwardLinkOfObjectSomeValuesFrom; import org.semanticweb.elk.reasoner.saturation.inferences.PropagationGenerated; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedDefinedClass; -import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedEntity; +import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedOfDecomposed; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedObjectIntersectionOf; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedObjectSomeValuesFrom; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedObjectUnionOf; @@ -154,7 +154,7 @@ public ClassConclusion visit( } @Override - public ClassConclusion visit(SubClassInclusionComposedEntity inference) { + public ClassConclusion visit(SubClassInclusionComposedOfDecomposed inference) { return inference.getConclusion(conclusionFactory_); } diff --git a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/tracing/factories/ClassInferenceLocalPremiseVisitor.java b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/tracing/factories/ClassInferenceLocalPremiseVisitor.java index 8925b5114..5fead0022 100644 --- a/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/tracing/factories/ClassInferenceLocalPremiseVisitor.java +++ b/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/tracing/factories/ClassInferenceLocalPremiseVisitor.java @@ -42,7 +42,7 @@ import org.semanticweb.elk.reasoner.saturation.inferences.ForwardLinkOfObjectSomeValuesFrom; import org.semanticweb.elk.reasoner.saturation.inferences.PropagationGenerated; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedDefinedClass; -import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedEntity; +import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedOfDecomposed; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedObjectIntersectionOf; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedObjectSomeValuesFrom; import org.semanticweb.elk.reasoner.saturation.inferences.SubClassInclusionComposedObjectUnionOf; @@ -192,7 +192,7 @@ public O visit(SubClassInclusionComposedDefinedClass inference) { } @Override - public O visit(SubClassInclusionComposedEntity inference) { + public O visit(SubClassInclusionComposedOfDecomposed inference) { conclusionVisitor_.visit(inference.getPremise(conclusionFactory_)); return null; } diff --git a/elk-reasoner/src/test/java/org/semanticweb/elk/reasoner/stages/SaturationGraphValidationStage.java b/elk-reasoner/src/test/java/org/semanticweb/elk/reasoner/stages/SaturationGraphValidationStage.java index 9179197ef..fe0933617 100644 --- a/elk-reasoner/src/test/java/org/semanticweb/elk/reasoner/stages/SaturationGraphValidationStage.java +++ b/elk-reasoner/src/test/java/org/semanticweb/elk/reasoner/stages/SaturationGraphValidationStage.java @@ -32,7 +32,6 @@ import org.semanticweb.elk.reasoner.indexing.classes.DummyIndexedContextRootVisitor; import org.semanticweb.elk.reasoner.indexing.model.IndexedClass; -import org.semanticweb.elk.reasoner.indexing.model.IndexedClassEntity; import org.semanticweb.elk.reasoner.indexing.model.IndexedClassExpression; import org.semanticweb.elk.reasoner.indexing.model.IndexedClassExpressionList; import org.semanticweb.elk.reasoner.indexing.model.IndexedContextRoot; @@ -516,7 +515,7 @@ public Void visit(BackwardLinkFromForwardLinkRule rule, @Override public Void visit(ComposedFromDecomposedSubsumerRule rule, - IndexedClassEntity premise, ContextPremises premises, + IndexedClassExpression premise, ContextPremises premises, ClassInferenceProducer producer) { // nothing is stored in the rule return null; diff --git a/elk-reasoner/src/test/resources/test_input/classification/StructuralDataHasValueEquivalence.owl b/elk-reasoner/src/test/resources/test_input/classification/StructuralDataHasValueEquivalence.owl new file mode 100644 index 000000000..f7ec6018b --- /dev/null +++ b/elk-reasoner/src/test/resources/test_input/classification/StructuralDataHasValueEquivalence.owl @@ -0,0 +1,9 @@ +Prefix(: = ) +Prefix(rdf: = ) +Prefix(rdfs: = ) +Prefix(xsd: = ) +Prefix(owl: = ) +Ontology( +EquivalentClasses(:A DataHasValue(:R "1"^^xsd:integer)) +EquivalentClasses(:B DataHasValue(:R "1"^^xsd:integer)) +) \ No newline at end of file diff --git a/elk-reasoner/src/test/resources/test_input/classification/StructuralDataHasValueEquivalence.taxonomy b/elk-reasoner/src/test/resources/test_input/classification/StructuralDataHasValueEquivalence.taxonomy new file mode 100644 index 000000000..2d154d415 --- /dev/null +++ b/elk-reasoner/src/test/resources/test_input/classification/StructuralDataHasValueEquivalence.taxonomy @@ -0,0 +1,8 @@ +Prefix(: = ) +Prefix(rdf: = ) +Prefix(rdfs: = ) +Prefix(xsd: = ) +Prefix(owl: = ) +Ontology( +EquivalentClasses(:A :B) +) diff --git a/elk-reasoner/src/test/resources/test_input/classification/StructuralDataHasValueInclusion.owl b/elk-reasoner/src/test/resources/test_input/classification/StructuralDataHasValueInclusion.owl new file mode 100644 index 000000000..1dd6e3f60 --- /dev/null +++ b/elk-reasoner/src/test/resources/test_input/classification/StructuralDataHasValueInclusion.owl @@ -0,0 +1,9 @@ +Prefix(: = ) +Prefix(rdf: = ) +Prefix(rdfs: = ) +Prefix(xsd: = ) +Prefix(owl: = ) +Ontology( +SubClassOf(:A DataHasValue(:R "11"^^xsd:integer)) +SubClassOf(DataHasValue(:R "11"^^xsd:integer) :B) +) \ No newline at end of file diff --git a/elk-reasoner/src/test/resources/test_input/classification/StructuralDataHasValueInclusion.taxonomy b/elk-reasoner/src/test/resources/test_input/classification/StructuralDataHasValueInclusion.taxonomy new file mode 100644 index 000000000..e121d6df9 --- /dev/null +++ b/elk-reasoner/src/test/resources/test_input/classification/StructuralDataHasValueInclusion.taxonomy @@ -0,0 +1,8 @@ +Prefix(: = ) +Prefix(rdf: = ) +Prefix(rdfs: = ) +Prefix(xsd: = ) +Prefix(owl: = ) +Ontology( +SubClassOf(:A :B) +) diff --git a/elk-reasoner/src/test/resources/test_input/classification/StructuralDisjunctionEquivalence.owl b/elk-reasoner/src/test/resources/test_input/classification/StructuralDisjunctionEquivalence.owl new file mode 100644 index 000000000..995939f94 --- /dev/null +++ b/elk-reasoner/src/test/resources/test_input/classification/StructuralDisjunctionEquivalence.owl @@ -0,0 +1,9 @@ +Prefix(: = ) +Prefix(rdf: = ) +Prefix(rdfs: = ) +Prefix(xsd: = ) +Prefix(owl: = ) +Ontology( +EquivalentClasses(:A ObjectUnionOf(:X :Y)) +EquivalentClasses(:B ObjectUnionOf(:X :Y)) +) \ No newline at end of file diff --git a/elk-reasoner/src/test/resources/test_input/classification/StructuralDisjunctionEquivalence.taxonomy b/elk-reasoner/src/test/resources/test_input/classification/StructuralDisjunctionEquivalence.taxonomy new file mode 100644 index 000000000..fd16c3efc --- /dev/null +++ b/elk-reasoner/src/test/resources/test_input/classification/StructuralDisjunctionEquivalence.taxonomy @@ -0,0 +1,10 @@ +Prefix(: = ) +Prefix(rdf: = ) +Prefix(rdfs: = ) +Prefix(xsd: = ) +Prefix(owl: = ) +Ontology( +EquivalentClasses(:A :B) +SubClassOf(:X :A) +SubClassOf(:Y :A) +) \ No newline at end of file diff --git a/elk-reasoner/src/test/resources/test_input/classification/StructuralDisjunctionInclusion.owl b/elk-reasoner/src/test/resources/test_input/classification/StructuralDisjunctionInclusion.owl new file mode 100644 index 000000000..a593ca426 --- /dev/null +++ b/elk-reasoner/src/test/resources/test_input/classification/StructuralDisjunctionInclusion.owl @@ -0,0 +1,9 @@ +Prefix(: = ) +Prefix(rdf: = ) +Prefix(rdfs: = ) +Prefix(xsd: = ) +Prefix(owl: = ) +Ontology( +SubClassOf(:A ObjectUnionOf(:X :Y)) +SubClassOf(ObjectUnionOf(:X :Y) :B) +) \ No newline at end of file diff --git a/elk-reasoner/src/test/resources/test_input/classification/StructuralDisjunctionInclusion.taxonomy b/elk-reasoner/src/test/resources/test_input/classification/StructuralDisjunctionInclusion.taxonomy new file mode 100644 index 000000000..c74c25a6f --- /dev/null +++ b/elk-reasoner/src/test/resources/test_input/classification/StructuralDisjunctionInclusion.taxonomy @@ -0,0 +1,10 @@ +Prefix(: = ) +Prefix(rdf: = ) +Prefix(rdfs: = ) +Prefix(xsd: = ) +Prefix(owl: = ) +Ontology( +SubClassOf(:A :B) +SubClassOf(:X :B) +SubClassOf(:Y :B) +) \ No newline at end of file diff --git a/elk-reasoner/src/test/resources/test_input/classification/StructuralHasSelfEquivalence.owl b/elk-reasoner/src/test/resources/test_input/classification/StructuralHasSelfEquivalence.owl new file mode 100644 index 000000000..4d41487ac --- /dev/null +++ b/elk-reasoner/src/test/resources/test_input/classification/StructuralHasSelfEquivalence.owl @@ -0,0 +1,9 @@ +Prefix(: = ) +Prefix(rdf: = ) +Prefix(rdfs: = ) +Prefix(xsd: = ) +Prefix(owl: = ) +Ontology( +EquivalentClasses(:A ObjectHasSelf(:R)) +EquivalentClasses(:B ObjectHasSelf(:R)) +) \ No newline at end of file diff --git a/elk-reasoner/src/test/resources/test_input/classification/StructuralHasSelfEquivalence.taxonomy b/elk-reasoner/src/test/resources/test_input/classification/StructuralHasSelfEquivalence.taxonomy new file mode 100644 index 000000000..2d154d415 --- /dev/null +++ b/elk-reasoner/src/test/resources/test_input/classification/StructuralHasSelfEquivalence.taxonomy @@ -0,0 +1,8 @@ +Prefix(: = ) +Prefix(rdf: = ) +Prefix(rdfs: = ) +Prefix(xsd: = ) +Prefix(owl: = ) +Ontology( +EquivalentClasses(:A :B) +) diff --git a/elk-reasoner/src/test/resources/test_input/classification/StructuralHasSelfInclusion.owl b/elk-reasoner/src/test/resources/test_input/classification/StructuralHasSelfInclusion.owl new file mode 100644 index 000000000..3abc46666 --- /dev/null +++ b/elk-reasoner/src/test/resources/test_input/classification/StructuralHasSelfInclusion.owl @@ -0,0 +1,9 @@ +Prefix(: = ) +Prefix(rdf: = ) +Prefix(rdfs: = ) +Prefix(xsd: = ) +Prefix(owl: = ) +Ontology( +SubClassOf(:A ObjectHasSelf(:R)) +SubClassOf(ObjectHasSelf(:R) :B) +) \ No newline at end of file diff --git a/elk-reasoner/src/test/resources/test_input/classification/StructuralHasSelfInclusion.taxonomy b/elk-reasoner/src/test/resources/test_input/classification/StructuralHasSelfInclusion.taxonomy new file mode 100644 index 000000000..e121d6df9 --- /dev/null +++ b/elk-reasoner/src/test/resources/test_input/classification/StructuralHasSelfInclusion.taxonomy @@ -0,0 +1,8 @@ +Prefix(: = ) +Prefix(rdf: = ) +Prefix(rdfs: = ) +Prefix(xsd: = ) +Prefix(owl: = ) +Ontology( +SubClassOf(:A :B) +) diff --git a/elk-reasoner/src/test/resources/test_input/classification/StructuralNegationEquivalence.owl b/elk-reasoner/src/test/resources/test_input/classification/StructuralNegationEquivalence.owl new file mode 100644 index 000000000..4fe006743 --- /dev/null +++ b/elk-reasoner/src/test/resources/test_input/classification/StructuralNegationEquivalence.owl @@ -0,0 +1,9 @@ +Prefix(: = ) +Prefix(rdf: = ) +Prefix(rdfs: = ) +Prefix(xsd: = ) +Prefix(owl: = ) +Ontology( +EquivalentClasses(:B ObjectComplementOf(:A)) +EquivalentClasses(:C ObjectComplementOf(:A)) +) \ No newline at end of file diff --git a/elk-reasoner/src/test/resources/test_input/classification/StructuralNegationEquivalence.taxonomy b/elk-reasoner/src/test/resources/test_input/classification/StructuralNegationEquivalence.taxonomy new file mode 100644 index 000000000..e302e085d --- /dev/null +++ b/elk-reasoner/src/test/resources/test_input/classification/StructuralNegationEquivalence.taxonomy @@ -0,0 +1,9 @@ +Prefix(: = ) +Prefix(rdf: = ) +Prefix(rdfs: = ) +Prefix(xsd: = ) +Prefix(owl: = ) +Ontology( +Declaration(Class(:A)) +EquivalentClasses(:B :C) +) diff --git a/elk-reasoner/src/test/resources/test_input/classification/StructuralNegationInclusion.owl b/elk-reasoner/src/test/resources/test_input/classification/StructuralNegationInclusion.owl new file mode 100644 index 000000000..437cc6368 --- /dev/null +++ b/elk-reasoner/src/test/resources/test_input/classification/StructuralNegationInclusion.owl @@ -0,0 +1,9 @@ +Prefix(: = ) +Prefix(rdf: = ) +Prefix(rdfs: = ) +Prefix(xsd: = ) +Prefix(owl: = ) +Ontology( +SubClassOf(:A ObjectComplementOf(:B)) +SubClassOf(ObjectComplementOf(:B) :C) +) \ No newline at end of file diff --git a/elk-reasoner/src/test/resources/test_input/classification/StructuralNegationInclusion.taxonomy b/elk-reasoner/src/test/resources/test_input/classification/StructuralNegationInclusion.taxonomy new file mode 100644 index 000000000..7ce1d7a6c --- /dev/null +++ b/elk-reasoner/src/test/resources/test_input/classification/StructuralNegationInclusion.taxonomy @@ -0,0 +1,9 @@ +Prefix(: = ) +Prefix(rdf: = ) +Prefix(rdfs: = ) +Prefix(xsd: = ) +Prefix(owl: = ) +Ontology( +Declaration(Class(:B)) +SubClassOf(:A :C) +)