public static State getStateForVariable(String variable,
			VariableDependencyGraph graph) {
		State[] states = graph.getStates();
		for (int k = 0; k < states.length; k++) {
			State state = states[k];
			if (state.getName().equals(variable))
				return state;
		}
		return null;
	}