@Override public Void visit( final OwlThingInconsistencyEntailsOntologyInconsistency entailmentInference) { final ClassInconsistency conclusion = entailmentInference.getReason(); final Matcher matcher = new Matcher(reasoner_.getProof(), elkFactory_, inferenceFactory_); matcher.trace(conclusion, elkFactory_.getOwlThing()); inferenceFactory_.getElkClassInclusionHierarchy( elkFactory_.getOwlThing(), elkFactory_.getOwlNothing()); return null; }
@Override public Void visit( final OwlThingInconsistencyEntailsOntologyInconsistency entailmentInference) { final ClassInconsistency conclusion = entailmentInference.getReason(); final Matcher matcher = new Matcher(reasoner_.getProof(), elkFactory_, inferenceFactory_); matcher.trace(conclusion, elkFactory_.getOwlThing()); inferenceFactory_.getElkClassInclusionHierarchy( elkFactory_.getOwlThing(), elkFactory_.getOwlNothing()); return null; }
@Override public Void visit( final OwlThingInconsistencyEntailsOntologyInconsistency entailmentInference) { final ClassInconsistency conclusion = entailmentInference.getReason(); final Matcher matcher = new Matcher(reasoner_.getProof(), elkFactory_, inferenceFactory_); matcher.trace(conclusion, elkFactory_.getOwlThing()); inferenceFactory_.getElkClassInclusionHierarchy( elkFactory_.getOwlThing(), elkFactory_.getOwlNothing()); return null; }
public static void checkTracingCompleteness(ElkClassExpression subClass, ElkClassExpression superClass, final Reasoner reasoner) throws ElkException { final Collection<Conclusion> conclusions = getDerivedConclusionsForSubsumption( subClass, superClass, reasoner); if (conclusions.isEmpty()) { fail(subClass + " ⊑ " + superClass + " not provable!"); } final TracingProof proof = reasoner.getProof(); final AtomicInteger conclusionCount = new AtomicInteger(0); TracingInference.Visitor<Boolean> counter = new DummyInferenceChecker() { @Override protected Boolean defaultVisit(TracingInference inference) { conclusionCount.incrementAndGet(); return true; } }; TestTraceUnwinder explorer = new TestTraceUnwinder(proof, UNTRACED_LISTENER); for (final Conclusion conclusion : conclusions) { explorer.accept(conclusion, counter); } }
@Override public Void visit( final DerivedClassInclusionEntailsSubClassOfAxiom entailmentInference) { final SubClassInclusionComposed conclusion = entailmentInference .getReason(); final ElkClassExpression subClass = entailmentInference.getConclusion() .getAxiom().getSubClassExpression(); final ElkClassExpression superClass = entailmentInference .getConclusion().getAxiom().getSuperClassExpression(); final Matcher matcher = new Matcher(reasoner_.getProof(), elkFactory_, inferenceFactory_); matcher.trace(conclusion, subClass, superClass); return null; }
@Override public Void visit( final DerivedClassInclusionEntailsSubClassOfAxiom entailmentInference) { final SubClassInclusionComposed conclusion = entailmentInference .getReason(); final ElkClassExpression subClass = entailmentInference.getConclusion() .getAxiom().getSubClassExpression(); final ElkClassExpression superClass = entailmentInference .getConclusion().getAxiom().getSuperClassExpression(); final Matcher matcher = new Matcher(reasoner_.getProof(), elkFactory_, inferenceFactory_); matcher.trace(conclusion, subClass, superClass); return null; }
@Override public Void visit( final DerivedClassInclusionEntailsSubClassOfAxiom entailmentInference) { final SubClassInclusionComposed conclusion = entailmentInference .getReason(); final ElkClassExpression subClass = entailmentInference.getConclusion() .getAxiom().getSubClassExpression(); final ElkClassExpression superClass = entailmentInference .getConclusion().getAxiom().getSuperClassExpression(); final Matcher matcher = new Matcher(reasoner_.getProof(), elkFactory_, inferenceFactory_); matcher.trace(conclusion, subClass, superClass); return null; }
@Override public Void visit( final DerivedClassInclusionEntailsClassAssertionAxiom entailmentInference) { final SubClassInclusionComposed conclusion = entailmentInference .getReason(); final ElkIndividual instance = entailmentInference.getConclusion() .getAxiom().getIndividual(); final ElkClassExpression nominal = elkFactory_.getObjectOneOf(instance); final ElkClassExpression type = entailmentInference.getConclusion() .getAxiom().getClassExpression(); final Matcher matcher = new Matcher(reasoner_.getProof(), elkFactory_, inferenceFactory_); matcher.trace(conclusion, nominal, type); inferenceFactory_.getElkClassAssertionOfClassInclusion(instance, type); return null; }
@Override public Void visit( final DerivedClassInclusionEntailsClassAssertionAxiom entailmentInference) { final SubClassInclusionComposed conclusion = entailmentInference .getReason(); final ElkIndividual instance = entailmentInference.getConclusion() .getAxiom().getIndividual(); final ElkClassExpression nominal = elkFactory_.getObjectOneOf(instance); final ElkClassExpression type = entailmentInference.getConclusion() .getAxiom().getClassExpression(); final Matcher matcher = new Matcher(reasoner_.getProof(), elkFactory_, inferenceFactory_); matcher.trace(conclusion, nominal, type); inferenceFactory_.getElkClassAssertionOfClassInclusion(instance, type); return null; }
@Override public Void visit( final SubClassInconsistencyEntailsSubClassOfAxiom entailmentInference) { final ClassInconsistency conclusion = entailmentInference.getReason(); final ElkClassExpression subClass = entailmentInference.getConclusion() .getAxiom().getSubClassExpression(); final ElkClassExpression superClass = entailmentInference .getConclusion().getAxiom().getSuperClassExpression(); final Matcher matcher = new Matcher(reasoner_.getProof(), elkFactory_, inferenceFactory_); matcher.trace(conclusion, subClass); inferenceFactory_.getElkClassInclusionOwlNothing(superClass); inferenceFactory_.getElkClassInclusionHierarchy(subClass, elkFactory_.getOwlNothing(), superClass); return null; }
@Override public Void visit( final DerivedClassInclusionEntailsClassAssertionAxiom entailmentInference) { final SubClassInclusionComposed conclusion = entailmentInference .getReason(); final ElkIndividual instance = entailmentInference.getConclusion() .getAxiom().getIndividual(); final ElkClassExpression nominal = elkFactory_.getObjectOneOf(instance); final ElkClassExpression type = entailmentInference.getConclusion() .getAxiom().getClassExpression(); final Matcher matcher = new Matcher(reasoner_.getProof(), elkFactory_, inferenceFactory_); matcher.trace(conclusion, nominal, type); inferenceFactory_.getElkClassAssertionOfClassInclusion(instance, type); return null; }
@Override public Void visit( final DerivedClassInclusionEntailsObjectPropertyDomainAxiom entailmentInference) { final SubClassInclusionComposed conclusion = entailmentInference .getReason(); final ElkObjectPropertyExpression property = entailmentInference .getConclusion().getAxiom().getProperty(); final ElkClassExpression domain = entailmentInference.getConclusion() .getAxiom().getDomain(); final ElkClassExpression subClass = elkFactory_ .getObjectSomeValuesFrom(property, elkFactory_.getOwlThing()); final Matcher matcher = new Matcher(reasoner_.getProof(), elkFactory_, inferenceFactory_); matcher.trace(conclusion, subClass, domain); inferenceFactory_.getElkObjectPropertyDomainOfClassInclusion(property, domain); return null; }
@Override public Void visit( final SubClassInconsistencyEntailsSubClassOfAxiom entailmentInference) { final ClassInconsistency conclusion = entailmentInference.getReason(); final ElkClassExpression subClass = entailmentInference.getConclusion() .getAxiom().getSubClassExpression(); final ElkClassExpression superClass = entailmentInference .getConclusion().getAxiom().getSuperClassExpression(); final Matcher matcher = new Matcher(reasoner_.getProof(), elkFactory_, inferenceFactory_); matcher.trace(conclusion, subClass); inferenceFactory_.getElkClassInclusionOwlNothing(superClass); inferenceFactory_.getElkClassInclusionHierarchy(subClass, elkFactory_.getOwlNothing(), superClass); return null; }
@Override public Void visit( final SubClassInconsistencyEntailsSubClassOfAxiom entailmentInference) { final ClassInconsistency conclusion = entailmentInference.getReason(); final ElkClassExpression subClass = entailmentInference.getConclusion() .getAxiom().getSubClassExpression(); final ElkClassExpression superClass = entailmentInference .getConclusion().getAxiom().getSuperClassExpression(); final Matcher matcher = new Matcher(reasoner_.getProof(), elkFactory_, inferenceFactory_); matcher.trace(conclusion, subClass); inferenceFactory_.getElkClassInclusionOwlNothing(superClass); inferenceFactory_.getElkClassInclusionHierarchy(subClass, elkFactory_.getOwlNothing(), superClass); return null; }
@Override public Void visit( final DerivedClassInclusionEntailsObjectPropertyDomainAxiom entailmentInference) { final SubClassInclusionComposed conclusion = entailmentInference .getReason(); final ElkObjectPropertyExpression property = entailmentInference .getConclusion().getAxiom().getProperty(); final ElkClassExpression domain = entailmentInference.getConclusion() .getAxiom().getDomain(); final ElkClassExpression subClass = elkFactory_ .getObjectSomeValuesFrom(property, elkFactory_.getOwlThing()); final Matcher matcher = new Matcher(reasoner_.getProof(), elkFactory_, inferenceFactory_); matcher.trace(conclusion, subClass, domain); inferenceFactory_.getElkObjectPropertyDomainOfClassInclusion(property, domain); return null; }
@Override public Void visit( final DerivedClassInclusionEntailsObjectPropertyDomainAxiom entailmentInference) { final SubClassInclusionComposed conclusion = entailmentInference .getReason(); final ElkObjectPropertyExpression property = entailmentInference .getConclusion().getAxiom().getProperty(); final ElkClassExpression domain = entailmentInference.getConclusion() .getAxiom().getDomain(); final ElkClassExpression subClass = elkFactory_ .getObjectSomeValuesFrom(property, elkFactory_.getOwlThing()); final Matcher matcher = new Matcher(reasoner_.getProof(), elkFactory_, inferenceFactory_); matcher.trace(conclusion, subClass, domain); inferenceFactory_.getElkObjectPropertyDomainOfClassInclusion(property, domain); return null; }
@Override public Void visit( final TopObjectPropertyInBottomEntailsOntologyInconsistency entailmentInference) { final SubPropertyChain conclusion = entailmentInference.getReason(); final Matcher matcher = new Matcher(reasoner_.getProof(), elkFactory_, inferenceFactory_); matcher.trace(conclusion, elkFactory_.getOwlTopObjectProperty(), elkFactory_.getOwlBottomObjectProperty()); inferenceFactory_.getElkClassInclusionOwlTopObjectProperty(); inferenceFactory_.getElkClassInclusionExistentialOfObjectHasSelf( elkFactory_.getOwlThing(), elkFactory_.getOwlTopObjectProperty()); inferenceFactory_.getElkClassInclusionExistentialComposition( Arrays.asList(elkFactory_.getOwlThing(), elkFactory_.getOwlThing()), Arrays.asList(elkFactory_.getOwlTopObjectProperty()), elkFactory_.getOwlBottomObjectProperty()); inferenceFactory_.getElkClassInclusionOwlBottomObjectProperty(); inferenceFactory_.getElkClassInclusionHierarchy( elkFactory_.getOwlThing(), elkFactory_.getObjectSomeValuesFrom( elkFactory_.getOwlBottomObjectProperty(), elkFactory_.getOwlThing()), elkFactory_.getOwlNothing()); return null; }
@Override public Void visit( final DerivedClassInclusionEntailsObjectPropertyAssertionAxiom entailmentInference) { final SubClassInclusionComposed conclusion = entailmentInference .getReason(); final ElkIndividual subject = entailmentInference.getConclusion() .getAxiom().getSubject(); final ElkObjectPropertyExpression property = entailmentInference .getConclusion().getAxiom().getProperty(); final ElkIndividual object = entailmentInference.getConclusion() .getAxiom().getObject(); final ElkClassExpression subClass = elkFactory_.getObjectOneOf(subject); final ElkClassExpression superClass = elkFactory_ .getObjectSomeValuesFrom(property, elkFactory_.getObjectOneOf(object)); final Matcher matcher = new Matcher(reasoner_.getProof(), elkFactory_, inferenceFactory_); matcher.trace(conclusion, subClass, superClass); inferenceFactory_.getElkObjectPropertyAssertionOfClassInclusion(subject, property, object); return null; }
@Override public Void visit( final DerivedClassInclusionEntailsObjectPropertyAssertionAxiom entailmentInference) { final SubClassInclusionComposed conclusion = entailmentInference .getReason(); final ElkIndividual subject = entailmentInference.getConclusion() .getAxiom().getSubject(); final ElkObjectPropertyExpression property = entailmentInference .getConclusion().getAxiom().getProperty(); final ElkIndividual object = entailmentInference.getConclusion() .getAxiom().getObject(); final ElkClassExpression subClass = elkFactory_.getObjectOneOf(subject); final ElkClassExpression superClass = elkFactory_ .getObjectSomeValuesFrom(property, elkFactory_.getObjectOneOf(object)); final Matcher matcher = new Matcher(reasoner_.getProof(), elkFactory_, inferenceFactory_); matcher.trace(conclusion, subClass, superClass); inferenceFactory_.getElkObjectPropertyAssertionOfClassInclusion(subject, property, object); return null; }
@Override public Void visit( final DerivedClassInclusionEntailsObjectPropertyAssertionAxiom entailmentInference) { final SubClassInclusionComposed conclusion = entailmentInference .getReason(); final ElkIndividual subject = entailmentInference.getConclusion() .getAxiom().getSubject(); final ElkObjectPropertyExpression property = entailmentInference .getConclusion().getAxiom().getProperty(); final ElkIndividual object = entailmentInference.getConclusion() .getAxiom().getObject(); final ElkClassExpression subClass = elkFactory_.getObjectOneOf(subject); final ElkClassExpression superClass = elkFactory_ .getObjectSomeValuesFrom(property, elkFactory_.getObjectOneOf(object)); final Matcher matcher = new Matcher(reasoner_.getProof(), elkFactory_, inferenceFactory_); matcher.trace(conclusion, subClass, superClass); inferenceFactory_.getElkObjectPropertyAssertionOfClassInclusion(subject, property, object); return null; }