protected Explanation<E> computeExplanation(E entailment) throws OWLException {
        if (isLoggable()) {
            log("Computing explanation");
        }
        counter++;
                
        // We gradually expand until the entailment holds
        // and then we prune
//        EntailmentChecker<E> checker = checkerFactory.createEntailementChecker(entailment);

        // Module?
        EntailmentChecker<E> checker = checkerFactory.createEntailementChecker(entailment);

        // We should

        // Pre-check that the entailment actually holds
        if (!checker.isEntailed(module)) {
            return Explanation.getEmptyExplanation(entailment);
        }

        if(progressMonitor.isCancelled()) {
            return Explanation.getEmptyExplanation(entailment);
        }

        Set<OWLAxiom> expandedAxioms = expansionStrategy.doExpansion(module, checker, progressMonitor);

        if(progressMonitor.isCancelled()) {
            return Explanation.getEmptyExplanation(entailment);
        }


        handlePostExpansion();

        Set<OWLAxiom> expandedAxiomsModule = extractModule(expandedAxioms, checker);
        int expandedSize = expandedAxioms.size();
        final Set<OWLAxiom> justification = contractionStrategy.doPruning(expandedAxiomsModule, checker, progressMonitor);
        int contractionSize = justification.size();
        int prunningDifference = expandedSize - contractionSize;
        prunningDifferences.add(prunningDifference);


        Explanation<E> expl = new Explanation<E>(entailment, justification);


        handlePostContraction(checker, expandedAxioms, justification);

        return expl;
    }
protected Explanation < E > computeExplanation ( E entailment ) throws OWLException { if ( isLoggable ( ) ) { log ( "Computing explanation" ) ; } counter ++ ; EntailmentChecker < E > checker = checkerFactory . createEntailementChecker ( entailment ) ; if ( ! checker . isEntailed ( module ) ) { return Explanation . getEmptyExplanation ( entailment ) ; } if ( progressMonitor . isCancelled ( ) ) { return Explanation . getEmptyExplanation ( entailment ) ; } Set < OWLAxiom > expandedAxioms = expansionStrategy . doExpansion ( module , checker , progressMonitor ) ; if ( progressMonitor . isCancelled ( ) ) { return Explanation . getEmptyExplanation ( entailment ) ; } handlePostExpansion ( ) ; Set < OWLAxiom > expandedAxiomsModule = extractModule ( expandedAxioms , checker ) ; int expandedSize = expandedAxioms . size ( ) ; final Set < OWLAxiom > justification = contractionStrategy . doPruning ( expandedAxiomsModule , checker , progressMonitor ) ; int contractionSize = justification . size ( ) ; int prunningDifference = expandedSize - contractionSize ; prunningDifferences . add ( prunningDifference ) ; Explanation < E > expl = new Explanation < E > ( entailment , justification ) ; handlePostContraction ( checker , expandedAxioms , justification ) ; return expl ; }
Computes a single justification for an entailment.

@param entailment The entailment
@return The justification or an empty set if the entailment does not hold.
@throws org.semanticweb.owlapi.model.OWLException if there was a problem.