refactored resolve hazards into generateInterlockLogic