@Override public void initialize(final Expressivity expressivity) { _mergeList.clear(); _mnx.add(null); // add a null entry so Branch._branch _index will match with the _index in this array assert _abox.size() == 1 : "This strategy can only be used with originally empty ABoxes"; _blocking = BlockingFactory.createBlocking(expressivity); final Individual root = _abox.getIndIterator().next(); applyUniversalRestrictions(root); _selfRule.apply(root); _mayNeedExpanding.add(root); _abox.setBranchIndex(1); _abox.getStats()._treeDepth = 1; _abox.setChanged(true); _abox.setComplete(false); _abox.setInitialized(true); }
@Override public void initialize(final Expressivity expressivity) { _mergeList.clear(); _mnx.add(null); // add a null entry so Branch._branch _index will match with the _index in this array assert _abox.size() == 1 : "This strategy can only be used with originally empty ABoxes"; _blocking = BlockingFactory.createBlocking(expressivity); final Individual root = _abox.getIndIterator().next(); applyUniversalRestrictions(root); _selfRule.apply(root); _mayNeedExpanding.add(root); _abox.setBranchIndex(1); _abox.getStats()._treeDepth = 1; _abox.setChanged(true); _abox.setComplete(false); _abox.setInitialized(true); }
private boolean processIndividuals() { final IndividualIterator i = _KB.getABox().getIndIterator(); while (i.hasNext()) { final Individual ind = i.next(); final ATermAppl nominal = ATermUtils.makeValue(ind.getName()); for (final ATermAppl term : ind.getTypes()) { if (term.equals(nominal)) continue; if (!isEL(term)) return false; } } return true; }
private boolean processIndividuals() { final IndividualIterator i = _KB.getABox().getIndIterator(); while (i.hasNext()) { final Individual ind = i.next(); final ATermAppl nominal = ATermUtils.makeValue(ind.getName()); for (final ATermAppl term : ind.getTypes()) { if (term.equals(nominal)) continue; if (!isEL(term)) return false; } } return true; }
/** * Choose a completion strategy based on the expressivity of the KB. The _abox given is not necessarily the ABox that belongs to this KB but can be a * derivative. * * @return the completion strategy choosen */ @Override public CompletionStrategy chooseStrategy(final ABox abox, final Expressivity expressivity) { if (null == abox || null == expressivity) return null; final boolean conceptSatisfiability = abox.size() == 1 && new IndividualIterator(abox).next().isConceptRoot(); // We don't need to use rules _strategy if we are checking concept satisfiability unless // there are nominals because then rules may affect concept satisfiability and we need // to use _rules _strategy if (getRules().size() > 0 && (expressivity.hasNominal() || !conceptSatisfiability)) return new ContinuousRulesStrategy(abox); final boolean fullDatatypeReasoning = OpenlletOptions.USE_FULL_DATATYPE_REASONING && (expressivity.hasCardinalityD() || expressivity.hasKeys()); if (!fullDatatypeReasoning) if (conceptSatisfiability && !expressivity.hasNominal()) return new EmptySRIQStrategy(abox); return new SROIQStrategy(abox); }
/** * Choose a completion strategy based on the expressivity of the KB. The _abox given is not necessarily the ABox that belongs to this KB but can be a * derivative. * * @return the completion strategy choosen */ @Override public CompletionStrategy chooseStrategy(final ABox abox, final Expressivity expressivity) { if (null == abox || null == expressivity) return null; final boolean conceptSatisfiability = abox.size() == 1 && new IndividualIterator(abox).next().isConceptRoot(); // We don't need to use rules _strategy if we are checking concept satisfiability unless // there are nominals because then rules may affect concept satisfiability and we need // to use _rules _strategy if (getRules().size() > 0 && (expressivity.hasNominal() || !conceptSatisfiability)) return new ContinuousRulesStrategy(abox); final boolean fullDatatypeReasoning = OpenlletOptions.USE_FULL_DATATYPE_REASONING && (expressivity.hasCardinalityD() || expressivity.hasKeys()); if (!fullDatatypeReasoning) if (conceptSatisfiability && !expressivity.hasNominal()) return new EmptySRIQStrategy(abox); return new SROIQStrategy(abox); }