A Method for Logic-Based Fault Diagnosis