// for each input pin, check if there is a path in the graph to an output pin
// (actually to the "master output", which all outputs connect to).
// If there is, the input is not clocked. Otherwise, it is.
for (int i = 0; i < inputPinsInfo.length; i++)
isInputClocked[i] = !graph.pathExists(inputPinsInfo[i], outputPinsInfo);
// for each output pin, check if there is a path in the graph from any input pin
// (actually from the "master input", which connects to all inputs) to this output pin.
// If there is, the output is not clocked. Otherwise, it is.
for (int i = 0; i < outputPinsInfo.length; i++)