A Knowledge-Based System for Failure Identification Based on the HMG Method