A Theory of Abstraction for Diagnosis of Discrete-Event Systems