Diagnosis of CHIP Programs Using Type Information