We hypothesize that two important functions of declarative knowledge in learning is to enable the learner to detect and to correct errors. W e describe psychologically plausible mechanisms for both functions. The mechanisms are implemented in a computational model which learns cognitive skills in three different domains, illustrating the cognitive function of abstract principles, concrete facts, and tutoring messages in skill acquisition.