Diagnosing Distributed Systems Modeled by Communicating Finite State Machines