@Override public boolean holds(final IndexedContextRoot root) { final Context context = saturationState_.getContext(root); return context == null || !context.isInitialized() || !context.isSaturated(); } };
@Override public boolean holds(final IndexedContextRoot root) { final Context context = saturationState_.getContext(root); return context == null || !context.isInitialized() || !context.isSaturated(); } };
@Override public boolean holds(final IndexedContextRoot root) { final Context context = saturationState_.getContext(root); return context == null || !context.isInitialized() || !context.isSaturated(); } };
/** * Removes from {@link #toDoEntities_} the entities which no longer occur in * the ontology or for the context is already saturated (thus consistency is * already checked) * * @return the number of the remaining entries in {@link #toDoEntities_} */ private int pruneToDo() { int size = 0; Iterator<IndexedClassEntity> itr = toDoEntities_.iterator(); while (itr.hasNext()) { IndexedClassEntity next = itr.next(); if (!next.occurs()) { itr.remove(); continue; } // else Context context = saturationState_.getContext(next); if (context != null && context.isSaturated()) { itr.remove(); } else { size++; } } return size; }
/** * Removes from {@link #toDoEntities_} the entities which no longer occur in * the ontology or for the context is already saturated (thus consistency is * already checked) * * @return the number of the remaining entries in {@link #toDoEntities_} */ private int pruneToDo() { int size = 0; Iterator<IndexedClassEntity> itr = toDoEntities_.iterator(); while (itr.hasNext()) { IndexedClassEntity next = itr.next(); if (!next.occurs()) { itr.remove(); continue; } // else Context context = saturationState_.getContext(next); if (context != null && context.isSaturated()) { itr.remove(); } else { size++; } } return size; }
/** * Removes from {@link #toDoEntities_} the entities which no longer occur in * the ontology or for the context is already saturated (thus consistency is * already checked) * * @return the number of the remaining entries in {@link #toDoEntities_} */ private int pruneToDo() { int size = 0; Iterator<IndexedClassEntity> itr = toDoEntities_.iterator(); while (itr.hasNext()) { IndexedClassEntity next = itr.next(); if (!next.occurs()) { itr.remove(); continue; } // else Context context = saturationState_.getContext(next); if (context != null && context.isSaturated()) { itr.remove(); } else { size++; } } return size; }
@Override public void produce(ClassInference inference) { Context sourceContext = state_.getContext(inference.getTraceRoot()); if (sourceContext == null || !sourceContext.isSaturated()) { super.produce(inference); } }
@Override public void produce(ClassInference inference) { Context sourceContext = state_.getContext(inference.getTraceRoot()); if (sourceContext == null || !sourceContext.isSaturated()) { super.produce(inference); } }
@Override public void produce(ClassInference inference) { Context sourceContext = state_.getContext(inference.getTraceRoot()); if (sourceContext == null || !sourceContext.isSaturated()) { super.produce(inference); } }
@Override public void execute() throws ElkException { for (IndexedClassExpression ice : classes_) { Context context = saturationState_.getContext(ice); if (context == null) { continue; } if (context.isSaturated() && nonSaturated_.contains(context)) { LOGGER_.error("{}: context IS saturated but contained in the not saturated queue" + context); } if (!context.isSaturated() && !nonSaturated_.contains(context)) { LOGGER_.error( "{}: context is NOT saturated and NOT contained in the not saturated queue", context); } } } }
@Override protected Boolean defaultVisit(ClassConclusion conclusion) { Context originContext = state_.getContext(conclusion.getTraceRoot()); if (originContext.isInitialized() && originContext.isSaturated()) { LOGGER_.error("{}: adding conclusion {} to saturated context {}", contextRef_, conclusion, get().containsConclusion(conclusion) ? "(it is already there)" : ""); } return true; }
@Override protected Boolean defaultVisit(ClassConclusion conclusion) { Context originContext = state_.getContext(conclusion.getTraceRoot()); if (originContext.isInitialized() && originContext.isSaturated()) { LOGGER_.error("{}: adding conclusion {} to saturated context {}", contextRef_, conclusion, get().containsConclusion(conclusion) ? "(it is already there)" : ""); } return true; }
@Override protected Boolean defaultVisit(ClassConclusion conclusion) { Context originContext = state_.getContext(conclusion.getTraceRoot()); if (originContext.isInitialized() && originContext.isSaturated()) { LOGGER_.error("{}: adding conclusion {} to saturated context {}", contextRef_, conclusion, get().containsConclusion(conclusion) ? "(it is already there)" : ""); } return true; }
|| !context.isSaturated()) {
|| !context.isSaturated()) {
|| !context.isSaturated()) {
|| !context.isSaturated()) {
|| !context.isSaturated()) {
|| !context.isSaturated()) {
@Override public void execute() throws ElkException { // check roots for all contexts now for (Context context : reasoner_.saturationState.getContexts()) { if (!context.getComposedSubsumers().contains(context.getRoot())) { LOGGER_.error(context.getRoot() + (context.isSaturated() ? " [saturated]" : " [modified]") + ": not a subsumer of itself"); } ClassInference inference = context.takeToDo(); if (inference != null) { LOGGER_.error(context.getRoot() + ": non-empty TODO: " + inference); } } }