public static DynamicProof<ElkOwlInference> create(ElkReasoner reasoner, OWLAxiom entailment) throws UnsupportedEntailmentTypeException { if (reasoner == null) { return Proofs.emptyProof(); } // else final ElkOwlProof proof = new ElkOwlProof(reasoner, entailment); // If the entailment is not supported, throw the exceptions now. proof.ensureSync(); return proof; }
@Override public <C extends Context> Proof<EntailmentInference> getEvidence( final boolean atMostOne, final SaturationState<C> saturationState, final SaturationConclusion.Factory conclusionFactory) throws ElkQueryException { final Collection<Proof<EntailmentInference>> proofs = new ArrayList<Proof<EntailmentInference>>(); for (final P premise : premises_) { proofs.add(premise.getEvidence(atMostOne, saturationState, conclusionFactory)); } proofs.add(new Proof<EntailmentInference>() { @Override public Collection<? extends EntailmentInference> getInferences( final Object conclusion) { if (!getQuery().equals(conclusion)) { return Collections.emptyList(); } // else return getEntailmentInference(); } }); return Proofs.union(proofs); }
@Override public boolean isEntailed() throws ElkQueryException { if (indexed == null) { throw new ElkQueryException( "Query was not indexed: " + getQuery()); } // else final boolean result = Proofs.isDerivable(getEvidence(true), indexed.getQuery()); if (!result) { incompleteness_.log(incompleteness_ .getIncompletenessMonitorForEntailmentQuery( getOccurrenceStore(this))); } // If the query is entailed, the result is complete. return result; }
@Override public boolean isEntailed() throws ElkQueryException { if (indexed == null) { throw new ElkQueryException( "Query was not indexed: " + getQuery()); } // else final boolean result = Proofs.isDerivable(getEvidence(true), indexed.getQuery()); if (!result) { incompleteness_.log(incompleteness_ .getIncompletenessMonitorForEntailmentQuery( getOccurrenceStore(this))); } // If the query is entailed, the result is complete. return result; }
@Override public <C extends Context> Proof<EntailmentInference> getEvidence( final boolean atMostOne, final SaturationState<C> saturationState, final SaturationConclusion.Factory conclusionFactory) throws ElkQueryException { final Collection<Proof<EntailmentInference>> proofs = new ArrayList<Proof<EntailmentInference>>(); for (final P premise : premises_) { proofs.add(premise.getEvidence(atMostOne, saturationState, conclusionFactory)); } proofs.add(new Proof<EntailmentInference>() { @Override public Collection<? extends EntailmentInference> getInferences( final Object conclusion) { if (!getQuery().equals(conclusion)) { return Collections.emptyList(); } // else return getEntailmentInference(); } }); return Proofs.union(proofs); }
public static DynamicProof<ElkOwlInference> create(ElkReasoner reasoner, OWLAxiom entailment) throws UnsupportedEntailmentTypeException { if (reasoner == null) { return Proofs.emptyProof(); } // else final ElkOwlProof proof = new ElkOwlProof(reasoner, entailment); // If the entailment is not supported, throw the exceptions now. proof.ensureSync(); return proof; }
@Override public boolean isEntailed() throws ElkQueryException { if (indexed == null) { throw new ElkQueryException( "Query was not indexed: " + getQuery()); } // else final boolean result = Proofs.isDerivable(getEvidence(true), indexed.getQuery()); if (!result) { incompleteness_.log(incompleteness_ .getIncompletenessMonitorForEntailmentQuery( getOccurrenceStore(this))); } // If the query is entailed, the result is complete. return result; }
@Override public <C extends Context> Proof<EntailmentInference> getEvidence( final boolean atMostOne, final SaturationState<C> saturationState, final SaturationConclusion.Factory conclusionFactory) throws ElkQueryException { final Collection<Proof<EntailmentInference>> proofs = new ArrayList<Proof<EntailmentInference>>(); for (final P premise : premises_) { proofs.add(premise.getEvidence(atMostOne, saturationState, conclusionFactory)); } proofs.add(new Proof<EntailmentInference>() { @Override public Collection<? extends EntailmentInference> getInferences( final Object conclusion) { if (!getQuery().equals(conclusion)) { return Collections.emptyList(); } // else return getEntailmentInference(); } }); return Proofs.union(proofs); }
public static DynamicProof<ElkOwlInference> create(ElkReasoner reasoner, OWLAxiom entailment) throws UnsupportedEntailmentTypeException { if (reasoner == null) { return Proofs.emptyProof(); } // else final ElkOwlProof proof = new ElkOwlProof(reasoner, entailment); // If the entailment is not supported, throw the exceptions now. proof.ensureSync(); return proof; }
@SuppressWarnings("unchecked") @Override public Proof<EntailmentInference> getEvidence(final boolean onlyOne) throws ElkQueryException { if (indexed == null) { throw new ElkQueryException( "Query was not indexed: " + getQuery()); } // else incompleteness_.log( incompleteness_.getIncompletenessMonitorForEntailmentQuery( getOccurrenceStore(this))); final Proof<EntailmentInference> inconsistencyEvidence = new InconsistencyProofWrapper( consistencyCheckingState_.getEvidence(onlyOne)); if (consistencyCheckingState_.isInconsistent() && onlyOne) { return inconsistencyEvidence; } // else final Proof<EntailmentInference> entailmentEvidence = indexed .getEvidence(onlyOne, saturationState_, conclusionFactory_); return Proofs.union(inconsistencyEvidence, entailmentEvidence); }
@SuppressWarnings("unchecked") @Override public Proof<EntailmentInference> getEvidence(final boolean onlyOne) throws ElkQueryException { if (indexed == null) { throw new ElkQueryException( "Query was not indexed: " + getQuery()); } // else incompleteness_.log( incompleteness_.getIncompletenessMonitorForEntailmentQuery( getOccurrenceStore(this))); final Proof<EntailmentInference> inconsistencyEvidence = new InconsistencyProofWrapper( consistencyCheckingState_.getEvidence(onlyOne)); if (consistencyCheckingState_.isInconsistent() && onlyOne) { return inconsistencyEvidence; } // else final Proof<EntailmentInference> entailmentEvidence = indexed .getEvidence(onlyOne, saturationState_, conclusionFactory_); return Proofs.union(inconsistencyEvidence, entailmentEvidence); }
@SuppressWarnings("unchecked") @Override public Proof<EntailmentInference> getEvidence(final boolean onlyOne) throws ElkQueryException { if (indexed == null) { throw new ElkQueryException( "Query was not indexed: " + getQuery()); } // else incompleteness_.log( incompleteness_.getIncompletenessMonitorForEntailmentQuery( getOccurrenceStore(this))); final Proof<EntailmentInference> inconsistencyEvidence = new InconsistencyProofWrapper( consistencyCheckingState_.getEvidence(onlyOne)); if (consistencyCheckingState_.isInconsistent() && onlyOne) { return inconsistencyEvidence; } // else final Proof<EntailmentInference> entailmentEvidence = indexed .getEvidence(onlyOne, saturationState_, conclusionFactory_); return Proofs.union(inconsistencyEvidence, entailmentEvidence); }