Constraint Handling Rules (CHR) is a declarative programming language extension introduced in 1991 by Thom Frühwirth. Originally designed for developing (prototypes of) constraint programming systems, CHR is increasingly used as a high-level general-purpose programming language. Typical application domains of CHR are abduction, multi-agent systems, natural language processing, compilation, scheduling, spatial-temporal reasoning, testing and verification, and type systems.
Although CHR is Turing complete, it is not commonly used as a programming language in its own right. Rather, it is used to extend a host language with constraints. Current host languages include Prolog, Java and Haskell. Prolog is by far the most popular host language and CHR is included in many Prolog implementations, including SICStus and SWI-Prolog.
A CHR program, sometimes called a constraint handler, is a sequence of guarded rules for simplification, propagation, and "simpagation" (a mix of simplification and propagation) of conjunctions of constraints. The CHR constraint store is a multi-set. In contrast to Prolog, the rules are multi-headed and are executed in a committed-choice manner using a forward chaining algorithm.
Read more about Constraint Handling Rules: Confluence, Example Program
Famous quotes containing the words constraint, handling and/or rules:
“In America a woman loses her independence for ever in the bonds of matrimony. While there is less constraint on girls there than anywhere else, a wife submits to stricter obligations. For the former, her fathers house is a home of freedom and pleasure; for the latter, her husbands is almost a cloister.”
—Alexis de Tocqueville (18051859)
“Madam, a circulating library in a town is as an evergreen tree of diabolical knowledge; it blossoms through the year. And depend on it ... that they who are so fond of handling the leaves, will long for the fruit at last.”
—Richard Brinsley Sheridan (17511816)
“When I hear the hypercritical quarreling about grammar and style, the position of the particles, etc., etc., stretching or contracting every speaker to certain rules of theirs ... I see that they forget that the first requisite and rule is that expression shall be vital and natural, as much as the voice of a brute or an interjection: first of all, mother tongue; and last of all, artificial or father tongue. Essentially your truest poetic sentence is as free and lawless as a lambs bleat.”
—Henry David Thoreau (18171862)