protected void handleLateTermination(Set<Set<OWLAxiom>> allMups, Set<Set<OWLAxiom>> satPaths, Set<OWLAxiom> currentPathContents, boolean earlyTermination) throws OWLException { if (!earlyTermination) { // Generate a new node - i.e. a new justification set Set<OWLAxiom> newMUPS = getSOSForInconsistentClass(getCurrentClass()); if (!newMUPS.isEmpty()) { // We have a new justification set, and a new node if (!allMups.contains(newMUPS)) { // Entirely new justification set allMups.add(newMUPS); constructHittingSetTree(newMUPS, allMups, satPaths, currentPathContents); } } else { // End of current path - add it to the list of paths satPaths.add(new HashSet<>(currentPathContents)); } } } }
protected AbstractOWLDebugger(OWLOntologyManager owlOntologyManager, OWLOntology ontology) { this.owlOntologyManager = owlOntologyManager; this.ontology = ontology; mergeImportsClosure(); }
public Set<Set<OWLAxiom>> getAllSOSForIncosistentClass(OWLClassExpression cls) throws OWLException { Set<OWLAxiom> firstMups = getSOSForIncosistentClass(cls); if (firstMups.isEmpty()) { return Collections.emptySet(); } Set<Set<OWLAxiom>> allMups = new HashSet<Set<OWLAxiom>>(); allMups.add(firstMups); Set<Set<OWLAxiom>> satPaths = new HashSet<Set<OWLAxiom>>(); Set<OWLAxiom> currentPathContents = new HashSet<OWLAxiom>(); constructHittingSetTree(firstMups, allMups, satPaths, currentPathContents); return allMups; }
@Override public Set<Set<OWLAxiom>> getAllSOSForInconsistentClass(OWLClassExpression cls) throws OWLException { Set<OWLAxiom> firstMups = getSOSForInconsistentClass(cls); if (firstMups.isEmpty()) { return Collections.emptySet(); } Set<Set<OWLAxiom>> allMups = new HashSet<>(); allMups.add(firstMups); Set<Set<OWLAxiom>> satPaths = new HashSet<>(); Set<OWLAxiom> currentPathContents = new HashSet<>(); constructHittingSetTree(firstMups, allMups, satPaths, currentPathContents); return allMups; }
Set<OWLAxiom> newMUPS = getSOSForIncosistentClass(getCurrentClass()); constructHittingSetTree(newMUPS, allMups, satPaths, currentPathContents);
handleLateTermination(allMups, satPaths, currentPathContents, earlyTermination);
@Override public Set<Set<OWLAxiom>> getAllSOSForInconsistentClass(OWLClassExpression cls) throws OWLException { Set<OWLAxiom> firstMups = getSOSForInconsistentClass(cls); if (firstMups.isEmpty()) { return Collections.emptySet(); } Set<Set<OWLAxiom>> allMups = new HashSet<>(); allMups.add(firstMups); Set<Set<OWLAxiom>> satPaths = new HashSet<>(); Set<OWLAxiom> currentPathContents = new HashSet<>(); constructHittingSetTree(firstMups, allMups, satPaths, currentPathContents); return allMups; }
handleLateTermination(allMups, satPaths, currentPathContents, earlyTermination);
protected void handleLateTermination(Set<Set<OWLAxiom>> allMups, Set<Set<OWLAxiom>> satPaths, Set<OWLAxiom> currentPathContents, boolean earlyTermination) throws OWLException { if (!earlyTermination) { // Generate a new node - i.e. a new justification set Set<OWLAxiom> newMUPS = getSOSForInconsistentClass(getCurrentClass()); if (!newMUPS.isEmpty()) { // We have a new justification set, and a new node if (!allMups.contains(newMUPS)) { // Entirely new justification set allMups.add(newMUPS); constructHittingSetTree(newMUPS, allMups, satPaths, currentPathContents); } } else { // End of current path - add it to the list of paths satPaths.add(new HashSet<>(currentPathContents)); } } } }
@Override public Set<Set<OWLAxiom>> getAllSOSForInconsistentClass(OWLClassExpression cls) throws OWLException { Set<OWLAxiom> firstMups = getSOSForInconsistentClass(cls); if (firstMups.isEmpty()) { return Collections.emptySet(); } Set<Set<OWLAxiom>> allMups = new HashSet<>(); allMups.add(firstMups); Set<Set<OWLAxiom>> satPaths = new HashSet<>(); Set<OWLAxiom> currentPathContents = new HashSet<>(); constructHittingSetTree(firstMups, allMups, satPaths, currentPathContents); return allMups; }
/** * Instantiates a new abstract owl debugger. * * @param owlOntologyManager the owl ontology manager * @param ontology the ontology */ protected AbstractOWLDebugger(OWLOntologyManager owlOntologyManager, OWLOntology ontology) { man = checkNotNull(owlOntologyManager, "owlOntologyManager cannot be null"); this.ontology = checkNotNull(ontology, "ontology cannot be null"); df = man.getOWLDataFactory(); mergeImportsClosure(); }
handleLateTermination(allMups, satPaths, currentPathContents, earlyTermination);
protected void handleLateTermination(Set<Set<OWLAxiom>> allMups, Set<Set<OWLAxiom>> satPaths, Set<OWLAxiom> currentPathContents, boolean earlyTermination) throws OWLException { if (!earlyTermination) { // Generate a new node - i.e. a new justification set Set<OWLAxiom> newMUPS = getSOSForInconsistentClass(getCurrentClass()); if (!newMUPS.isEmpty()) { // We have a new justification set, and a new node if (!allMups.contains(newMUPS)) { // Entirely new justification set allMups.add(newMUPS); constructHittingSetTree(newMUPS, allMups, satPaths, currentPathContents); } } else { // End of current path - add it to the list of paths satPaths.add(new HashSet<>(currentPathContents)); } } } }
@Override public Set<Set<OWLAxiom>> getAllSOSForInconsistentClass(OWLClassExpression cls) throws OWLException { Set<OWLAxiom> firstMups = getSOSForInconsistentClass(cls); if (firstMups.isEmpty()) { return Collections.emptySet(); } Set<Set<OWLAxiom>> allMups = new HashSet<>(); allMups.add(firstMups); Set<Set<OWLAxiom>> satPaths = new HashSet<>(); Set<OWLAxiom> currentPathContents = new HashSet<>(); constructHittingSetTree(firstMups, allMups, satPaths, currentPathContents); return allMups; }
/** * Instantiates a new abstract owl debugger. * * @param owlOntologyManager the owl ontology manager * @param ontology the ontology */ protected AbstractOWLDebugger(OWLOntologyManager owlOntologyManager, OWLOntology ontology) { man = checkNotNull(owlOntologyManager, "owlOntologyManager cannot be null"); this.ontology = checkNotNull(ontology, "ontology cannot be null"); df = man.getOWLDataFactory(); mergeImportsClosure(); }
handleLateTermination(allMups, satPaths, currentPathContents, earlyTermination);
protected void handleLateTermination(Set<Set<OWLAxiom>> allMups, Set<Set<OWLAxiom>> satPaths, Set<OWLAxiom> currentPathContents, boolean earlyTermination) throws OWLException { if (!earlyTermination) { // Generate a new node - i.e. a new justification set Set<OWLAxiom> newMUPS = getSOSForInconsistentClass(getCurrentClass()); if (!newMUPS.isEmpty()) { // We have a new justification set, and a new node if (!allMups.contains(newMUPS)) { // Entirely new justification set allMups.add(newMUPS); constructHittingSetTree(newMUPS, allMups, satPaths, currentPathContents); } } else { // End of current path - add it to the list of paths satPaths.add(new HashSet<>(currentPathContents)); } } } }
/** * Instantiates a new abstract owl debugger. * * @param owlOntologyManager the owl ontology manager * @param ontology the ontology */ protected AbstractOWLDebugger(OWLOntologyManager owlOntologyManager, OWLOntology ontology) { man = checkNotNull(owlOntologyManager, "owlOntologyManager cannot be null"); this.ontology = checkNotNull(ontology, "ontology cannot be null"); df = man.getOWLDataFactory(); mergeImportsClosure(); }
/** * Instantiates a new abstract owl debugger. * * @param owlOntologyManager the owl ontology manager * @param ontology the ontology */ protected AbstractOWLDebugger(OWLOntologyManager owlOntologyManager, OWLOntology ontology) { man = checkNotNull(owlOntologyManager, "owlOntologyManager cannot be null"); this.ontology = checkNotNull(ontology, "ontology cannot be null"); df = man.getOWLDataFactory(); mergeImportsClosure(); }