This article introduces CHR++, an implementation of CHR (Constraint Handling Rules) in C++. CHR++ has been designed to be efficient, user-friendly, and to make it easier to model problems of NP (Non-deterministic Polynomial time) complexity class thanks to the support of don’t know non-determinism. CHR++ conforms to the refined semantics of CHR and provides a high-level syntax similar to the historical CHR implementations in Prolog. It is a powerful system that incorporates many of the high-level optimisations known to date. Like implementations made on top of Prolog, it handles don’t know non-determinism through support for the CHR extension. CHR++ is the first non-Prolog CHR system that natively supports don’t know non-determinism. It makes it easier to model constrained decision or optimisation problems and shows a significant gain in efficiency compared with CHR Prolog systems. It equals or exceeds the fastest CHR systems in Java and C, but is able to tackle a whole class of problems unattainable by those systems.
Read full abstract