/** * @param ax axiom * @return true iff an AXiom is non-local */ private boolean isNonLocal(AxiomWrapper ax) { boolean b = !checker.local(ax.getAxiom()); ++nChecks; if (b) { ++nNonLocal; } return b; }
protected Signature getSignature() { return localityChecker.getSignature(); } }
/** * @param n cardinality * @param r role * @param c filler * @return true iff (<= n R.C) is topEq */ private boolean isMaxTopEquivalent(@SuppressWarnings("unused") int n, OWLPropertyExpression r, OWLPropertyRange c) { return localityChecker.isBotEquivalent(r) || localityChecker.isBotEquivalent(c); }
/** * add axiom AX to the non-local set with top-locality value TOP * * @param ax axiom * @param top top or bottom */ private void checkNonLocal(AxiomWrapper ax, boolean top) { emptySig.setLocality(top); checker.setSignatureValue(emptySig); if (!checker.local(ax.getAxiom())) { if (top) { topNonLocal.add(ax); } else { bottomNonLocal.add(ax); } } }
/** * non-empty Concept/Data expression * * @param c class * @return true iff C^I is non-empty */ private boolean isBotDistinct(OWLObject c) { // TOP is non-empty if (localityChecker.isTopEquivalent(c)) { return true; } // built-in DT are non-empty // FIXME!! that's it for now return c instanceof OWLDatatype; }
/** * extract module wrt SIGNATURE and TYPE from the set of axioms * * @param axioms axiom * @param signature signature * @param type type */ public void extract(List<AxiomWrapper> axioms, Signature signature, ModuleType type) { boolean topLocality = type == ModuleType.TOP; sig = new Signature(signature.getSignature().stream()); checker.setSignatureValue(sig); sig.setLocality(topLocality); extractModule(axioms); if (type != ModuleType.STAR) { return; } // here there is a star: do the cycle until stabilization int size; do { size = module.size(); List<AxiomWrapper> oldModule = new ArrayList<>(module); topLocality = !topLocality; sig = new Signature(signature.getSignature().stream()); checker.setSignatureValue(sig); sig.setLocality(topLocality); extractModule(oldModule); } while (size != module.size()); }
/** * 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(); }
/** * add axiom AX to the non-local set with top-locality value TOP * * @param ax axiom * @param top top or bottom */ private void checkNonLocal(AxiomWrapper ax, boolean top) { emptySig.setLocality(top); checker.setSignatureValue(emptySig); if (!checker.local(ax.getAxiom())) { if (top) { topNonLocal.add(ax); } else { bottomNonLocal.add(ax); } } }
/** * non-empty Concept/Data expression * * @param c class * @return true iff C^I is non-empty */ private boolean isBotDistinct(OWLObject c) { // TOP is non-empty if (localityChecker.isTopEquivalent(c)) { return true; } // built-in DT are non-empty // FIXME!! that's it for now return c instanceof OWLDatatype; }
/** * extract module wrt SIGNATURE and TYPE from the set of axioms * * @param axioms axiom * @param signature signature * @param type type */ public void extract(List<AxiomWrapper> axioms, Signature signature, ModuleType type) { boolean topLocality = type == ModuleType.TOP; sig = new Signature(signature.getSignature().stream()); checker.setSignatureValue(sig); sig.setLocality(topLocality); extractModule(axioms); if (type != ModuleType.STAR) { return; } // here there is a star: do the cycle until stabilization int size; do { size = module.size(); List<AxiomWrapper> oldModule = new ArrayList<>(module); topLocality = !topLocality; sig = new Signature(signature.getSignature().stream()); checker.setSignatureValue(sig); sig.setLocality(topLocality); extractModule(oldModule); } while (size != module.size()); }
/** * 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(); }
/** * add axiom AX to the non-local set with top-locality value TOP * * @param ax axiom * @param top top or bottom */ private void checkNonLocal(AxiomWrapper ax, boolean top) { emptySig.setLocality(top); checker.setSignatureValue(emptySig); if (!checker.local(ax.getAxiom())) { if (top) { topNonLocal.add(ax); } else { bottomNonLocal.add(ax); } } }
/** * @param n cardinality * @param r role * @param c filler * @return true iff (<= n R.C) is topEq */ private boolean isMaxTopEquivalent(@SuppressWarnings("unused") int n, OWLPropertyExpression r, OWLPropertyRange c) { return localityChecker.isBotEquivalent(r) || localityChecker.isBotEquivalent(c); }
/** * non-empty Concept/Data expression * * @param c class * @return true iff C^I is non-empty */ private boolean isBotDistinct(OWLObject c) { // TOP is non-empty if (localityChecker.isTopEquivalent(c)) { return true; } // built-in DT are non-empty // FIXME!! that's it for now return c instanceof OWLDatatype; }
/** * @param ax axiom * @return true iff an AXiom is non-local */ private boolean isNonLocal(AxiomWrapper ax) { boolean b = !checker.local(ax.getAxiom()); ++nChecks; if (b) { ++nNonLocal; } return b; }
protected Signature getSignature() { return localityChecker.getSignature(); } }
/** * extract module wrt SIGNATURE and TYPE from the set of axioms * * @param axioms axiom * @param signature signature * @param type type */ public void extract(List<AxiomWrapper> axioms, Signature signature, ModuleType type) { boolean topLocality = type == ModuleType.TOP; sig = new Signature(signature.getSignature().stream()); checker.setSignatureValue(sig); sig.setLocality(topLocality); extractModule(axioms); if (type != ModuleType.STAR) { return; } // here there is a star: do the cycle until stabilization int size; do { size = module.size(); List<AxiomWrapper> oldModule = new ArrayList<>(module); topLocality = !topLocality; sig = new Signature(signature.getSignature().stream()); checker.setSignatureValue(sig); sig.setLocality(topLocality); extractModule(oldModule); } while (size != module.size()); }
/** * 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(); }
/** * add axiom AX to the non-local set with top-locality value TOP * * @param ax axiom * @param top top or bottom */ private void checkNonLocal(AxiomWrapper ax, boolean top) { emptySig.setLocality(top); checker.setSignatureValue(emptySig); if (!checker.local(ax.getAxiom())) { if (top) { topNonLocal.add(ax); } else { bottomNonLocal.add(ax); } } }
/** * @param n cardinality * @param r role * @param c filler * @return true iff (<= n R.C) is topEq */ private boolean isMaxTopEquivalent(@SuppressWarnings("unused") int n, OWLPropertyExpression r, OWLPropertyRange c) { return localityChecker.isBotEquivalent(r) || localityChecker.isBotEquivalent(c); }