if (loopEntry.getValue() == stateLearnt)
{// Note an input corresponding to any loop in temp can be followed in the original machine, since
// a loop in temp is either due to the merge or because it was there in the first place.
inputsToMultWith.add(loopEntry.getKey());
}
SequenceSet pathsToMergedRed = data.getPathsToLearnt();
pathsToMergedRed.unite(pathsToMergedRed.crossWithSet(inputsToMultWith));// the resulting path does a "transition cover" on all transitions leaving the red state.
// Now we limit the number of elements in pathsToMerged to the value specified in the configuration.
// This will not affect the underlying graph, but it does not really matter since all
// elements in that graph are accept-states by construction of pathsToMergedRed and hence
// not be returned.
pathsToMergedRed.limitTo(original.config.getQuestionPathUnionLimit());
fanout = learnt.paths.computePathsSBetween_All(stateLearnt, engine, pathsToMergedRed);
}
SequenceSet pathsToCurrentState = fanout.get(state.mergedVertex);
if (pathsToCurrentState != null)
{
assert state.mergedVertex.getColour() != JUConstants.AMBER;
//System.out.println(pairOrig+" : "+state.mergedVertex+" inputs are "+learnt.transitionMatrix.get(state.mergedVertex).keySet());
// if a path from the merged red state to the current one can be found, update the set of questions.
pathsToCurrentState.crossWithSet(learnt.transitionMatrix.get(state.mergedVertex).keySet());
// Note that we do not care what the result of crossWithSet is - for those states which
// do not exist in the underlying graph, reject vertices will be added by the engine and
// hence will be returned when we do a .getData() on the engine.
}
}