Thom FrühwirthCambridge University Press, 7/9/2009EAN 9780521877763, ISBN10: 0521877768Hardcover, 320 pages, 24.7 x 17.4 x 2.2 cmLanguage: EnglishConstraint Handling Rules (CHR) is both a theoretical formalism based on logic and a practical programming language based on rules. This book, written by the creator of CHR, describes the theory of CHR and how to use it in practice. It is supported by a website containing teaching materials, online demos, and free downloads of the language. After a basic tutorial, the author describes in detail the CHR language and discusses guaranteed properties of CHR programs. The author then compares CHR with other formalisms and languages and illustrates how it can capture their essential features. Finally, larger programs are introduced and analyzed in detail. The book is ideal for graduate students and lecturers, and for more experienced programmers and researchers, who can use it for self-study. Exercises with selected solutions, and bibliographic remarks are included at the ends of chapters. The book is the definitive reference on the subject.PrefacePart I. CHR Tutorial1. Getting started2. My first CHR programsPart II. The CHR Language3. Syntax and semantics4. Properties of CHR5. Program analysis6. Rule-based and graph-based formalisms in CHRPart III. CHR Programs and Applications7. My first CHR programs, revisited for analysis8. Finite domain constraint solvers9. Infinite domain constraint solvers10. Union-find algorithmBibliographyList of figuresList of illustrationsIndex.'This is a great book illustrating both the simplicity and power of Constraint Handling Rules, the purest form of rule based programming I know.' Professor Peter J. Stuckey, University of Melbourne, and National ICT Australia