for (Map.Entry<Instance, String> entry : pinNames.entrySet()) {
Instance pin = entry.getKey();
String label = entry.getValue();
if (Pin.FACTORY.isInputPin(pin)) {
expressionMap.currentCause = Instance.getComponentFor(pin);
Expression e = Expressions.variable(label);
expressionMap.put(pin.getLocation(), e);
inputNames.add(label);
} else {
outputPins.add(pin);
outputNames.add(label);
}
}
propagateComponents(expressionMap, circuit.getNonWires());
for (int iterations = 0; !expressionMap.dirtyPoints.isEmpty(); iterations++) {
if (iterations > MAX_ITERATIONS) {
throw new AnalyzeException.Circular();
}
propagateWires(expressionMap, new HashSet<Location>(expressionMap.dirtyPoints));
HashSet<Component> dirtyComponents = getDirtyComponents(circuit, expressionMap.dirtyPoints);
expressionMap.dirtyPoints.clear();
propagateComponents(expressionMap, dirtyComponents);
Expression expr = checkForCircularExpressions(expressionMap);
if (expr != null) {
throw new AnalyzeException.Circular();
}
}