Automating HAZOP analysis of batch chemical plants: Part II. Algorithms and application