} else {
ports = ((Actor) actor).inputPortList().iterator();
}
while (ports.hasNext()) {
IOPort port = (IOPort) ports.next();
Iterator connectedPorts = port.connectedPortList().iterator();
while (connectedPorts.hasNext()) {
IOPort otherPort = (IOPort) connectedPorts.next();
// Skip ports with the same polarity (input or output)
// as the current port.
if (port.isInput() && !otherPort.isOutput()