Valuable code and exercises about the book "Constraint Handling Rules (2009)" by Thom Frühwirth.
Note that most of the examples in this book cannot work directly in SWI-Prolog (e.g. incomplete code, lacking necessary rules and built-ins, not compatible with Prolog flattening style, using different operation semantics, bugs, etc). The major purpose of this repository is to make them work, followed by some experiments and extensions.
- Chapter 2: My first CHR programs
- Chapter 6: Rule-based and graph-based formalisms in CHR
- Chapter 8: Finite domain constraint solvers
- Boolean algebra and propositional logic
- Consistency techniques
- Arc consistency
- Finite domain
- Path consistency
- Temporal reasoning
- Arc consistency
- Sudoku (try-most-constrained-field-first)
- Chapter 9: Infinite domain constraint solvers
- Linear polynomial equation solving
- Description logic
- Rational trees
- Feature terms
- Chapter 10: Union-find algorithm