@Override
	public final void evaluate() {

		/*
		 * TODO Decouple evaluation of block and evaluation of next blocks so at
		 * first only all blocks at first level are evaluated and then they call
		 * evaluate on their next hops.
		 */

		if (!wasAlreadyEvaluated()) {
			LOG.debug("Evaluate compound block " + getBlockID());

			// copy values from outer inputs to internal ones
			for (String s : inputList()) {
				internalInput(s).setSignalValue(input(s).getSignalValue());
				internalInput(s).propagateOutput();
			}

			// call evaluate for all children
			for (Output o : internalInputsList) {
				for (Input nextHop : o.listNextHops()) {
					nextHop.getOwnerBlock().evaluate();
				}
			}

			// set outer outputs to internal values
			for (String s : outputList()) {
				output(s).setSignalValue(internalOutput(s).getSignalValue());
			}

			propagateBlockOutputs();

			hasBeenEvaluated();

			evaluateNextHops();
		}
	}