/** * @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; }
/** * @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; }
/** * @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; }
/** * @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; }
/** * @param ax axiom * @param type type * @return true iff the axiom AX is a tautology wrt given type */ public boolean isTautology(OWLAxiom ax, ModuleType type) { boolean topLocality = type == ModuleType.TOP; sig = new Signature(ax.signature()); sig.setLocality(topLocality); // axiom is a tautology if it is local wrt its own signature boolean toReturn = checker.local(ax); if (type != ModuleType.STAR || !toReturn) { return toReturn; } // here it is STAR case and AX is local wrt BOT sig.setLocality(!topLocality); return checker.local(ax); }
/** * 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 ax axiom * @param type type * @return true iff the axiom AX is a tautology wrt given type */ public boolean isTautology(OWLAxiom ax, ModuleType type) { boolean topLocality = type == ModuleType.TOP; sig = new Signature(ax.signature()); sig.setLocality(topLocality); // axiom is a tautology if it is local wrt its own signature boolean toReturn = checker.local(ax); if (type != ModuleType.STAR || !toReturn) { return toReturn; } // here it is STAR case and AX is local wrt BOT sig.setLocality(!topLocality); return checker.local(ax); }
/** * 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); } } }
/** * 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); } } }
/** * 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 ax axiom * @param type type * @return true iff the axiom AX is a tautology wrt given type */ public boolean isTautology(OWLAxiom ax, ModuleType type) { boolean topLocality = type == ModuleType.TOP; sig = new Signature(ax.signature()); sig.setLocality(topLocality); // axiom is a tautology if it is local wrt its own signature boolean toReturn = checker.local(ax); if (type != ModuleType.STAR || !toReturn) { return toReturn; } // here it is STAR case and AX is local wrt BOT sig.setLocality(!topLocality); return checker.local(ax); }
/** * @param ax axiom * @param type type * @return true iff the axiom AX is a tautology wrt given type */ public boolean isTautology(OWLAxiom ax, ModuleType type) { boolean topLocality = type == ModuleType.TOP; sig = new Signature(ax.signature()); sig.setLocality(topLocality); // axiom is a tautology if it is local wrt its own signature boolean toReturn = checker.local(ax); if (type != ModuleType.STAR || !toReturn) { return toReturn; } // here it is STAR case and AX is local wrt BOT sig.setLocality(!topLocality); return checker.local(ax); }
/** * @param signature the signature to use * @param moduletype the module type * @return a set of axioms that corresponds to the atom with the id INDEX */ public Set<OWLAxiom> getNonLocal(Stream<OWLEntity> signature, ModuleType moduletype) { // init signature Signature sig = new Signature(signature); sig.setLocality(false); // do check modularizer.getLocalityChecker().setSignatureValue(sig); Set<OWLAxiom> result = new HashSet<>(); for (AxiomWrapper p : axioms) { if (!modularizer.getLocalityChecker().local(p.getAxiom())) { result.add(p.getAxiom()); } } return result; }
/** * @param signature the signature to use * @param moduletype the module type * @return a set of axioms that corresponds to the atom with the id INDEX */ public Set<OWLAxiom> getNonLocal(Stream<OWLEntity> signature, ModuleType moduletype) { // init signature Signature sig = new Signature(signature); sig.setLocality(false); // do check modularizer.getLocalityChecker().setSignatureValue(sig); Set<OWLAxiom> result = new HashSet<>(); for (AxiomWrapper p : axioms) { if (!modularizer.getLocalityChecker().local(p.getAxiom())) { result.add(p.getAxiom()); } } return result; }
/** * @param signature * signature * @param useSemantic * useSemantic * @param type * type * @param r * reasoner * @return a set of axioms that corresponds to the atom with the id INDEX */ @PortedFrom(file = "Kernel.h", name = "getNonLocal") public Set<AxiomWrapper> getNonLocal(List<Expression> signature, boolean useSemantic, ModuleType type, OWLReasoner r) { // init signature Signature sig = new Signature(); sig.setLocality(type == ModuleType.TOP); signature.stream().filter(p -> p instanceof NamedEntity).map(p -> ((NamedEntity) p).getEntity()).forEach( sig::add); // do check LocalityChecker lc = getModExtractor(useSemantic, r).getModularizer().getLocalityChecker(); lc.setSignatureValue(sig); result.clear(); add(result, getOntology().getAxioms().stream().filter(p -> !lc.local(p.getAxiom()))); return result; }
/** * @param signature the signature to use * @param moduletype the module type * @return a set of axioms that corresponds to the atom with the id INDEX */ public Set<OWLAxiom> getNonLocal(Stream<OWLEntity> signature, ModuleType moduletype) { // init signature Signature sig = new Signature(signature); sig.setLocality(false); // do check modularizer.getLocalityChecker().setSignatureValue(sig); Set<OWLAxiom> result = new HashSet<>(); for (AxiomWrapper p : axioms) { if (!modularizer.getLocalityChecker().local(p.getAxiom())) { result.add(p.getAxiom()); } } return result; }
/** * @param signature the signature to use * @param moduletype the module type * @return a set of axioms that corresponds to the atom with the id INDEX */ public Set<OWLAxiom> getNonLocal(Stream<OWLEntity> signature, ModuleType moduletype) { // init signature Signature sig = new Signature(signature); sig.setLocality(false); // do check modularizer.getLocalityChecker().setSignatureValue(sig); Set<OWLAxiom> result = new HashSet<>(); for (AxiomWrapper p : axioms) { if (!modularizer.getLocalityChecker().local(p.getAxiom())) { result.add(p.getAxiom()); } } return result; }