About CHR

The more you CHR, the better you are.

Constraint Handling Rules (CHR) is both a versatile theoretical formalism based on logic and an efficient practical high-level programming language based on rules and constraints.

Procedural knowledge is often expressed by if-then rules, events and actions are related by reaction rules, change is expressed by update rules. Algorithms are often specified using inference rules, rewrite rules, transition rules, sequents, proof rules, or logical axioms. All these kinds of rules can be directly written in CHR. The clean logical semantics of CHR facilitates non-trivial program analysis and transformation. About a dozen implementations of CHR exist in Prolog, Haskell, Java, Javascript and C. Some of them allow to apply millions of rules per second. CHR is also available as WebCHR for online experimentation with more than 40 example programs. More than 200 academic and industrial projects worldwide use CHR, and about 2000 research papers reference it.

…one of the most powerful multiset rewriting languages. Professor Kazunori Ueda, Waseda University, Japan, and Norio Kato in »Programming Logical Links«
…a powerful, highly optimized, lazy rule engine […] consistently outperforms Rete-based systems. Peter Van Weert, K.U. Leuven, Belgium, in »Efficient Lazy Evaluation of Rule-Based Programs«
… [Concurrent CHR in Haskell] exhibits significant speed up in most problems when executed on multi-core systems. Members of the National University of Singapore at the Concurrent Constraint Handling Rules Home Page
Since CHR seems to subsume most of the other formalisms that have been related to it, it has the potential to become a lingua franca, a hub which collects and dispenses research efforts from and to the various related fields. Jon Sneyers, K.U. Leuven, Belgium, in »Optimizing Compilation and Complexity of CHR«