@Override public Set<Role> getProperSubRoles() { return SetUtils.difference(_subRoles, _superRoles); }
@Override public Set<Role> getProperSubRoles() { return SetUtils.difference(_subRoles, _superRoles); }
@Override public Collection<? extends AtomVariable> getBindableVars(final Collection<AtomVariable> bound) { if (!isApplicable(bound)) return Collections.emptySet(); return SetUtils.difference(VariableUtils.getVars(_atom), bound); }
@Override public Collection<? extends AtomVariable> getBindableVars(final Collection<AtomVariable> bound) { if (!isApplicable(bound)) return Collections.emptySet(); return SetUtils.difference(VariableUtils.getVars(_atom), bound); }
final Set<OWLEntity> addedEntities = SetUtils.difference(module, previousModule); previousModule = new HashSet<>(module); final Set<OWLAxiom> testLocal = new HashSet<>();
final Set<OWLEntity> addedEntities = SetUtils.difference(module, previousModule); previousModule = new HashSet<>(module); final Set<OWLAxiom> testLocal = new HashSet<>();
final Set<OWLEntity> addedEntities = SetUtils.difference(module, previousModule); previousModule = new HashSet<>(module); final Set<OWLAxiom> testLocal = new HashSet<>();
private Set<OWLAxiom> getReasonerExplanation(final OWLClassExpression unsatClass) { final OpenlletReasoner reasoner = getReasoner(); reasoner.getKB().prepare(); // satisfiable if there is an undefined entity boolean sat = !getDefinitionTracker().isDefined(unsatClass); if (!sat) sat = isSatisfiable(reasoner, unsatClass, true); else _logger.fine(() -> "Undefined entity in " + unsatClass); if (sat) return Collections.emptySet(); else { final Set<OWLAxiom> explanation = convertExplanation(reasoner.getKB().getExplanationSet()); _logger.fine(() -> "Explanation " + explanation); final Set<OWLAxiom> prunedExplanation = pruneExplanation(unsatClass, explanation, true); final int prunedAxiomCount = explanation.size() - prunedExplanation.size(); if (_logger.isLoggable(Level.FINE) && prunedAxiomCount > 0) { _logger.fine("Pruned " + prunedAxiomCount + " axioms from the explanation: " + SetUtils.difference(explanation, prunedExplanation)); _logger.fine("New explanation " + prunedExplanation); } return prunedExplanation; } }
private Set<OWLAxiom> getReasonerExplanation(final OWLClassExpression unsatClass) { final OpenlletReasoner reasoner = getReasoner(); reasoner.getKB().prepare(); // satisfiable if there is an undefined entity boolean sat = !getDefinitionTracker().isDefined(unsatClass); if (!sat) sat = isSatisfiable(reasoner, unsatClass, true); else _logger.fine(() -> "Undefined entity in " + unsatClass); if (sat) return Collections.emptySet(); else { final Set<OWLAxiom> explanation = convertExplanation(reasoner.getKB().getExplanationSet()); _logger.fine(() -> "Explanation " + explanation); final Set<OWLAxiom> prunedExplanation = pruneExplanation(unsatClass, explanation, true); final int prunedAxiomCount = explanation.size() - prunedExplanation.size(); if (_logger.isLoggable(Level.FINE) && prunedAxiomCount > 0) { _logger.fine("Pruned " + prunedAxiomCount + " axioms from the explanation: " + SetUtils.difference(explanation, prunedExplanation)); _logger.fine("New explanation " + prunedExplanation); } return prunedExplanation; } }
private Set<OWLAxiom> getReasonerExplanation(final OWLClassExpression unsatClass) { final OpenlletReasoner reasoner = getReasoner(); reasoner.getKB().prepare(); // satisfiable if there is an undefined entity boolean sat = !getDefinitionTracker().isDefined(unsatClass); if (!sat) sat = isSatisfiable(reasoner, unsatClass, true); else _logger.fine(() -> "Undefined entity in " + unsatClass); if (sat) return Collections.emptySet(); else { final Set<OWLAxiom> explanation = convertExplanation(reasoner.getKB().getExplanationSet()); _logger.fine(() -> "Explanation " + explanation); final Set<OWLAxiom> prunedExplanation = pruneExplanation(unsatClass, explanation, true); final int prunedAxiomCount = explanation.size() - prunedExplanation.size(); if (_logger.isLoggable(Level.FINE) && prunedAxiomCount > 0) { _logger.fine("Pruned " + prunedAxiomCount + " axioms from the explanation: " + SetUtils.difference(explanation, prunedExplanation)); _logger.fine("New explanation " + prunedExplanation); } return prunedExplanation; } }
final Set<OWLEntity> addedEntities = SetUtils.difference(module, previousModule); previousModule = new HashSet<>(module); final Set<OWLAxiom> testLocal = new HashSet<>();