/** * Process all pending {@link ClassInference}s of the given {@link Context} * * @param context * the active {@link Context} with unprocessed * {@link ClassInference}s */ void process(Context context) { activeContext_.set(context); // at this point workerLocalTodo_ must be empty workerLocalTodo_.setActiveRoot(context.getRoot()); for (;;) { ClassInference inference = workerLocalTodo_.poll(); if (inference == null) { inference = context.takeToDo(); if (inference == null) return; } LOGGER_.trace("{}: processing inference {}", context, inference); inference.accept(inferenceProcessor_); } }
/** * Process all pending {@link ClassInference}s of the given {@link Context} * * @param context * the active {@link Context} with unprocessed * {@link ClassInference}s */ void process(Context context) { activeContext_.set(context); // at this point workerLocalTodo_ must be empty workerLocalTodo_.setActiveRoot(context.getRoot()); for (;;) { ClassInference inference = workerLocalTodo_.poll(); if (inference == null) { inference = context.takeToDo(); if (inference == null) return; } LOGGER_.trace("{}: processing inference {}", context, inference); inference.accept(inferenceProcessor_); } }
/** * Process all pending {@link ClassInference}s of the given {@link Context} * * @param context * the active {@link Context} with unprocessed * {@link ClassInference}s */ void process(Context context) { activeContext_.set(context); // at this point workerLocalTodo_ must be empty workerLocalTodo_.setActiveRoot(context.getRoot()); for (;;) { ClassInference inference = workerLocalTodo_.poll(); if (inference == null) { inference = context.takeToDo(); if (inference == null) return; } LOGGER_.trace("{}: processing inference {}", context, inference); inference.accept(inferenceProcessor_); } }
@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); } } }