/** * 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); }
continue; if (n.isConceptRoot()) applyUniversalRestrictions(n);
continue; if (n.isConceptRoot()) applyUniversalRestrictions(n);