This project will develop a cognitive model addressing human learning in the domain of computer programming. Building on prior research and additional psychological studies to be carried out, the comprehension of instructional text is formulated as a problem solving process in which the goal is to construct mental models of domain entities, process principles, and problem solving heuristics. New concepts introduced in these texts may be given meaning by explaining their relation to examples presented in instruction. One major goal of this project will be to model differences among learners in the self-explanation of examples. Specifically, preliminary studies show that learners differ in the way that they explain examples to themselves, and these differences have significant correlations with subsequent programming performance. Another major goal will be to study and develop a model whereby learners reflect on their problem solving and generate new strategies. Both of these areas have received little study in cognitive science. Our results should be important to the psychology of learning in complex formal domains, the acquisition and modification of knowledge in machine learning, and instructional research.