# The computational power and complexity of constraint handling rules

@article{Sneyers2009TheCP, title={The computational power and complexity of constraint handling rules}, author={Jon Sneyers and Tom Schrijvers and Bart Demoen}, journal={ACM Trans. Program. Lang. Syst.}, year={2009}, volume={31}, pages={8:1-8:42} }

Constraint Handling Rules (CHR) is a high-level rule-based programming language which is increasingly used for general-purpose programming. We introduce the CHR machine, a model of computation based on the operational semantics of CHR. Its computational power and time complexity properties are compared to those of the well-understood Turing machine and Random Access Memory machine. This allows us to prove the interesting result that every algorithm can be implemented in CHR with the best known…

## Figures and Tables from this paper

## 81 Citations

Generalized CHR Machines

- Computer Science

This paper investigates three generalizations of CHR machines: CHR machines with an instantiated operational semantics, non-deterministic CHR machines, and self-modifying CHR machines.

Constraint Handling Rules

- Computer ScienceICLP
- 2008

This tutorial shows how to use CHR for solving their problems quickly and elegantly and makes the attendants aware of CHR's strengths as a programming language, and teaches them when and how to apply CHR for small to medium sized problems.

On the Expressive Power of Multiple Heads in CHR

- Computer ScienceTOCL
- 2012

This article analyzes the Turing completeness of CHR and provides a formal proof for the claim that multiple heads augment the expressive power of the CHR language, and shows that, under some stronger assumptions, considering an increasing number of atoms in the head of a rule augments the expressivePower of the language.

As time goes by: Constraint Handling Rules

- Computer ScienceTheory and Practice of Logic Programming
- 2009

Covering more than 180 publications, this new survey provides an overview of recent results in a wide range of research areas, from semantics and analysis to systems, extensions, and applications.

Optimizing Compilation and Computational Complexity of Constraint Handling Rules

- Computer ScienceICLP
- 2009

Constraint Handling Rules [1,2] is a high-level programming language extension based on multi-headed committed-choice multiset rewrite rules. It can be used as a stand-alone language or as an…

A new approach to termination analysis of Constraint Handling Rules

- Computer Science
- 2007

A new approach to termination analysis of CHR is presented which is applicable to a much larger class of CHR programs and successfully tested the condition on a benchmark of programs, using a prototype analyser.

Expressiveness of Multiple Heads in CHR

- Computer ScienceSOFSEM
- 2009

It is proved that multiple heads augment the expressive power of the CHR language, and it is obtained that CHR can be encoded neither in (constraint) logic programming nor in pure Prolog.

The Correspondence Between the Logical Algorithms Language and CHR

- Computer ScienceICLP
- 2007

This paper presents a translation scheme from LA to CHRrp: CHR with rule priorities and shows that the meta-complexity theorem for LA can be applied to a subset ofCHRrp via inverse translation and achieves the complexity required for the metacomplexity theorem to hold.

Linear-Logic Based Analysis of Constraint Handling Rules with Disjunction

- Computer ScienceTOCL
- 2013

Two linear-logic semantics for CHR∨ that differ in the reasoning domain for which they are instrumental are developed and it is shown how to apply the linear- logic semantics to decide program properties and to reason about operational equivalence ofCHR∨ programs.

## References

SHOWING 1-10 OF 80 REFERENCES

Generalized CHR Machines

- Computer Science

This paper investigates three generalizations of CHR machines: CHR machines with an instantiated operational semantics, non-deterministic CHR machines, and self-modifying CHR machines.

As time goes by: Constraint Handling Rules

- Computer ScienceTheory and Practice of Logic Programming
- 2009

Covering more than 180 publications, this new survey provides an overview of recent results in a wide range of research areas, from semantics and analysis to systems, extensions, and applications.

The Refined Operational Semantics of Constraint Handling Rules

- Computer ScienceICLP
- 2004

This paper formally defines this refined operational semantics of CHRs and proves it implements the theoretical operational semantics, and shows how to create a (partial) confluence checker capable of detecting programs which are confluent under this semantics, but not under the theoretical Operational semantics.

Optimizing compilation of constraint handling rules in HAL

- Computer ScienceTheory and Practice of Logic Programming
- 2005

This paper shows how to use different kinds of information in the compilation of CHRs to obtain access efficiency, and a better translation of the CHR rules into the underlying language, which in this case is HAL.

Optimizing Compilation of Constraint Handling Rules

- Computer ScienceICLP
- 2001

This paper discusses the optimizing compilation of Constraint Handling Rules (CHRs), and shows how to analyze CHR programs to determine information about functional dependencies, symmetries and other kinds of information supporting optimizations.

The Correspondence Between the Logical Algorithms Language and CHR

- Computer ScienceICLP
- 2007

This paper presents a translation scheme from LA to CHRrp: CHR with rule priorities and shows that the meta-complexity theorem for LA can be applied to a subset ofCHRrp via inverse translation and achieves the complexity required for the metacomplexity theorem to hold.

Compiling Constraint Handling Rules into Prolog with Attributed Variables

- Computer SciencePPDP
- 1999

We introduce the most recent and advanced implementation of constraint handling rules (CHR) in a logic programming language, which improves both on previous implementations (in terms of completeness,…

Optimal union-find in Constraint Handling Rules

- Computer ScienceTheory and Practice of Logic Programming
- 2006

It is shown that it is also possible to write the classic union-find algorithm and variants in CHR, and the time complexity of these programs match the almost-linear complexity of the best known imperative implementations.

Automatic implication checking for CHR constraint solvers

- Computer Science
- 2005

This work presents a method for automatic implication checking between constraints of CHR solvers using a trailing mechanism and shows the soundness of the method and its completeness for a restricted class of canonical solver as well as for specific existing non-canonicalCHR solvers.