Programming problems constitute a significant challenge for the development of tutoring systems, because they can be solved in many different ways. To help the student solve a programming problem effectively, the tutoring system must be able to cover a large space of possible solutions. If a student solution has shortcomings, the system must be able to identify the reason why that solution is not correct. In the state of the art, one of the most promising approaches to modeling knowledge for tutoring systems is the constraint-based technique. This approach uses constraints to model a space of correct solutions, rather than enumerating them. Nguyen-Thinh Le investigated the applicability of this approach to develop tutoring systems for programming with the focus on logic programming. In this book, he proposed the Weighted Constraint-based Model (WCBM) for building Intelligent Tutoring Systems. Constraint weights serve three purposes: they are used to control the process of error diagnosis, to hypothesize the student’s intention, and to prioritize feedback messages according to the severity of diagnosed errors.