Modified critical edges calculation as well as test case generation