@Override public Set<Explanation<E>> getExplanations(E entailment, int limit) throws ExplanationException { try { module = extractModule(workingAxioms, checkerFactory.createEntailementChecker(entailment)); prunningDifferences.clear(); Set<Explanation<E>> explanations = new HashSet<>(); Explanation<E> expl = computeExplanation(entailment); explanations.add(expl); progressMonitor.foundExplanation(this, expl, Collections.unmodifiableSet(explanations)); if (progressMonitor.isCancelled()) { return Collections.singleton(expl); } if (expl.isEmpty()) { return Collections.emptySet(); } if (limit > 1) { constructHittingSetTree(entailment, expl, explanations, new HashSet<Set<OWLAxiom>>(), new HashSet<OWLAxiom>(), limit); } if (explanations.isEmpty()) { throw new NotEntailedException(entailment); } return explanations; } catch (OWLException e) { throw new ExplanationException(e); } }