/** * register an axiom * * @param ax axiom */ private void registerAx(AxiomWrapper ax) { ax.signature().forEach(a -> base.computeIfAbsent(a, x -> new HashSet<>()).add(ax)); // check whether the axiom is non-local checkNonLocal(ax, false); checkNonLocal(ax, true); ++nRegistered; }
/** * allow the checker to preprocess an ontology if necessary * * @param axioms list of wrapped axioms */ public void preprocessOntology(Collection<AxiomWrapper> axioms) { checker.preprocessOntology(axioms); sigIndex.clear(); sigIndex.preprocessOntology(axioms); workQueue = new ArrayDeque<>(axioms.size()); nChecks += 2 * axioms.size(); }
/** * process an axiom wrt its Used status * * @param ax the axiom to process */ public void processAx(AxiomWrapper ax) { if (ax.isUsed()) { registerAx(ax); } else { unregisterAx(ax); } }
/** * build a module traversing axioms by a signature */ private void extractModuleQueue() { // init queue with a sig workQueue.addAll(sig.getSignature()); // add all the axioms that are non-local wrt given value of a // top-locality addNonLocal(sigIndex.getNonLocal(sig.topCLocal()), true); // main cycle while (!workQueue.isEmpty()) { // for all the axioms that contains entity in their signature Collection<AxiomWrapper> axioms = sigIndex.getAxioms(workQueue.poll()); addNonLocal(axioms, false); } }
/** * @param c the clocality checker */ public Modularizer(LocalityChecker c) { checker = c; sig = c.getSignature(); sigIndex = new SigIndex(checker); }
/** * build a module traversing axioms by a signature */ private void extractModuleQueue() { // init queue with a sig workQueue.addAll(sig.getSignature()); // add all the axioms that are non-local wrt given value of a // top-locality addNonLocal(sigIndex.getNonLocal(sig.topCLocal()), true); // main cycle while (!workQueue.isEmpty()) { // for all the axioms that contains entity in their signature Collection<AxiomWrapper> axioms = sigIndex.getAxioms(workQueue.poll()); addNonLocal(axioms, false); } }
/** * @param c the clocality checker */ public Modularizer(LocalityChecker c) { checker = c; sig = c.getSignature(); sigIndex = new SigIndex(checker); }
/** * process an axiom wrt its Used status * * @param ax the axiom to process */ public void processAx(AxiomWrapper ax) { if (ax.isUsed()) { registerAx(ax); } else { unregisterAx(ax); } }
/** * allow the checker to preprocess an ontology if necessary * * @param axioms list of wrapped axioms */ public void preprocessOntology(Collection<AxiomWrapper> axioms) { checker.preprocessOntology(axioms); sigIndex.clear(); sigIndex.preprocessOntology(axioms); workQueue = new ArrayDeque<>(axioms.size()); nChecks += 2 * axioms.size(); }
/** * build a module traversing axioms by a signature */ private void extractModuleQueue() { // init queue with a sig workQueue.addAll(sig.getSignature()); // add all the axioms that are non-local wrt given value of a // top-locality addNonLocal(sigIndex.getNonLocal(sig.topCLocal()), true); // main cycle while (!workQueue.isEmpty()) { // for all the axioms that contains entity in their signature Collection<AxiomWrapper> axioms = sigIndex.getAxioms(workQueue.poll()); addNonLocal(axioms, false); } }
/** * @param c the clocality checker */ public Modularizer(LocalityChecker c) { checker = c; sig = c.getSignature(); sigIndex = new SigIndex(checker); }
/** * register an axiom * * @param ax axiom */ private void registerAx(AxiomWrapper ax) { ax.signature().forEach(a -> base.computeIfAbsent(a, x -> new HashSet<>()).add(ax)); // check whether the axiom is non-local checkNonLocal(ax, false); checkNonLocal(ax, true); ++nRegistered; }
/** * process an axiom wrt its Used status * * @param ax the axiom to process */ public void processAx(AxiomWrapper ax) { if (ax.isUsed()) { registerAx(ax); } else { unregisterAx(ax); } }
/** * allow the checker to preprocess an ontology if necessary * * @param axioms list of wrapped axioms */ public void preprocessOntology(Collection<AxiomWrapper> axioms) { checker.preprocessOntology(axioms); sigIndex.clear(); sigIndex.preprocessOntology(axioms); workQueue = new ArrayDeque<>(axioms.size()); nChecks += 2 * axioms.size(); }
/** * build a module traversing axioms by a signature */ private void extractModuleQueue() { // init queue with a sig workQueue.addAll(sig.getSignature()); // add all the axioms that are non-local wrt given value of a // top-locality addNonLocal(sigIndex.getNonLocal(sig.topCLocal()), true); // main cycle while (!workQueue.isEmpty()) { // for all the axioms that contains entity in their signature Collection<AxiomWrapper> axioms = sigIndex.getAxioms(workQueue.poll()); addNonLocal(axioms, false); } }
/** * @param c the clocality checker */ public Modularizer(LocalityChecker c) { checker = c; sig = c.getSignature(); sigIndex = new SigIndex(checker); }
/** * register an axiom * * @param ax axiom */ private void registerAx(AxiomWrapper ax) { ax.signature().forEach(a -> base.computeIfAbsent(a, x -> new HashSet<>()).add(ax)); // check whether the axiom is non-local checkNonLocal(ax, false); checkNonLocal(ax, true); ++nRegistered; }
/** * process an axiom wrt its Used status * * @param ax the axiom to process */ public void processAx(AxiomWrapper ax) { if (ax.isUsed()) { registerAx(ax); } else { unregisterAx(ax); } }
/** * allow the checker to preprocess an ontology if necessary * * @param axioms list of wrapped axioms */ public void preprocessOntology(Collection<AxiomWrapper> axioms) { checker.preprocessOntology(axioms); sigIndex.clear(); sigIndex.preprocessOntology(axioms); workQueue = new ArrayDeque<>(axioms.size()); nChecks += 2 * axioms.size(); }
/** * register an axiom * * @param ax axiom */ private void registerAx(AxiomWrapper ax) { ax.signature().forEach(a -> base.computeIfAbsent(a, x -> new HashSet<>()).add(ax)); // check whether the axiom is non-local checkNonLocal(ax, false); checkNonLocal(ax, true); ++nRegistered; }