Results 1 - 10
of
15
The Computational Power and Complexity of Constraint Handling Rules
- In Second Workshop on Constraint Handling Rules, at ICLP05
, 2005
"... Constraint Handling Rules (CHR) is a high-level rule-based programming language which is increasingly used for general purposes. 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 thos ..."
Abstract
-
Cited by 47 (21 self)
- Add to MetaCart
Constraint Handling Rules (CHR) is a high-level rule-based programming language which is increasingly used for general purposes. 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 time and space complexity. We also investigate the practical relevance of this result and the constant factors involved. Finally we expand the scope of the discussion to other (declarative) programming languages.
Extending CHR with negation as absence
- Dept. of Computer Science
, 2006
"... In this exploratory paper, we introduce CHR ¬ , an extension of the CHR language with negation as absence, and we illustrate how the added expressiveness allows CHR programmers to write more declarative and concise rules. We show the difficulties of integrating negation with the conventional executi ..."
Abstract
-
Cited by 12 (11 self)
- Add to MetaCart
In this exploratory paper, we introduce CHR ¬ , an extension of the CHR language with negation as absence, and we illustrate how the added expressiveness allows CHR programmers to write more declarative and concise rules. We show the difficulties of integrating negation with the conventional execution mechanism of CHR. A formal operational semantics for CHR ¬ is presented, and its theoretical and practical implications are evaluated critically. We introduce a source-to-source transformation from CHR ¬ to regular CHR.
As time goes by: Constraint handling rules -- A survey of CHR research between 1998 and 2007
, 2009
"... Constraint Handling Rules (CHR) is a high-level programming language based on multiheaded multiset rewrite rules. Originally designed for writing user-defined constraint solvers, it is now recognized as an elegant general purpose language. CHR-related research has surged during the decade following ..."
Abstract
-
Cited by 11 (9 self)
- Add to MetaCart
Constraint Handling Rules (CHR) is a high-level programming language based on multiheaded multiset rewrite rules. Originally designed for writing user-defined constraint solvers, it is now recognized as an elegant general purpose language. CHR-related research has surged during the decade following the previous survey by Frühwirth (1998). 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 Correspondence between the Logical Algorithms Language and CHR
, 2007
"... This paper investigates the relationship between the Logical Algorithms formalism (LA) of Ganzinger and McAllester and Constraint Handling Rules (CHR). We present a translation scheme from LA to CHR rp: CHR with rule priorities and show that the metacomplexity theorem for LA can be applied to a subs ..."
Abstract
-
Cited by 6 (5 self)
- Add to MetaCart
This paper investigates the relationship between the Logical Algorithms formalism (LA) of Ganzinger and McAllester and Constraint Handling Rules (CHR). We present a translation scheme from LA to CHR rp: CHR with rule priorities and show that the metacomplexity theorem for LA can be applied to a subset of CHR rp via inverse translation. This result is compared with previous work. Inspired by the high-level implementation proposal of Ganzinger and McAllester, we demonstrate how LA programs can be compiled into CHR rules that interact with a scheduler written in CHR. This forms the first actual implementation of LA. Our implementation achieves the required complexity for the meta-complexity theorem to hold and can execute a subset of CHR rp with strong complexity bounds.
CHR for imperative host languages
- Issue of LNAI on Constraint Handling Rules
, 2008
"... Abstract. In this paper, we address the different conceptual and technical difficulties encountered when embedding CHR into an imperative host language. We argue that a tight, natural integration leads to a powerful programming language extension, intuitive to both CHR and imperative programmers. We ..."
Abstract
-
Cited by 4 (4 self)
- Add to MetaCart
Abstract. In this paper, we address the different conceptual and technical difficulties encountered when embedding CHR into an imperative host language. We argue that a tight, natural integration leads to a powerful programming language extension, intuitive to both CHR and imperative programmers. We show how to compile CHR to highly optimized imperative code. To this end, we first review the well-established CHR compilation scheme, and survey the large body of possible optimizations. We then show that this scheme, when used for compilation to imperative target languages, leads to stack overflows. We therefore introduce new optimizations that considerably improve the performance of recursive CHR programs. Rules written using tail calls are even guaranteed to run in constant space. We implemented systems for both Java and C, following the language design principles and compilation scheme presented in this paper, and show that our implementations outperform other state-of-the-art CHR compilers by several orders of magnitude. 1
Compiling Constraint Handling Rules to Java: A Reconstruction
, 2008
"... In this report, we provide a detailed description of the compilation scheme the K.U.Leuven JCHR system uses to compile CHR to efficient Java code. We start from a relatively straightforward adaptation of the traditional CHR compilation scheme for Prolog, and gradually add all its basic optimizations ..."
Abstract
-
Cited by 4 (4 self)
- Add to MetaCart
In this report, we provide a detailed description of the compilation scheme the K.U.Leuven JCHR system uses to compile CHR to efficient Java code. We start from a relatively straightforward adaptation of the traditional CHR compilation scheme for Prolog, and gradually add all its basic optimizations. Next, we show why this compilation scheme is not suited for compilation to an imperative host language such as Java. We therefore introduce a novel compilation scheme from CHR to Java that uses explicit call stack maintenance and trampoline-style compilation to guarantee that executing recursive CHR programs no longer results in call stack overflows. The empirical evaluation of the improved compilation scheme
CHR rp: Constraint Handling Rules with Rule Priorities
, 2007
"... We extend the Constraint Handling Rules language (CHR) with user-defined rule priorities. This language extension reduces the level of non-determinism that is inherent to the theoretical operational semantics of CHR, and gives a more high-level form of execution control compared to the refined opera ..."
Abstract
-
Cited by 4 (2 self)
- Add to MetaCart
We extend the Constraint Handling Rules language (CHR) with user-defined rule priorities. This language extension reduces the level of non-determinism that is inherent to the theoretical operational semantics of CHR, and gives a more high-level form of execution control compared to the refined operational semantics. We suggest some application areas. A formal operational semantics for the extended language, called CHR rp, is given and its theoretical properties are discussed. We look at some issues with CHR rp and discuss alternatives for rule priorities.
Optimizing Compilation and Computational Complexity of Constraint Handling Rules
, 2008
"... 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 extension to an existing host language. CHR systems have been implemented for nearly every Prolog system, a ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
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 extension to an existing host language. CHR systems have been implemented for nearly every Prolog system, and there are
Efficient Lazy Evaluation of Rule-Based Programs
"... Abstract—Thirty years after Forgy’s seminal dissertation, Rete remains the de facto standard matching algorithm. Despite promising research results, alternative algorithms such as TREAT and LEAPS have had little impact on modern production rule engines. Constraint Handling Rules (CHR) is a high-leve ..."
Abstract
-
Cited by 2 (2 self)
- Add to MetaCart
Abstract—Thirty years after Forgy’s seminal dissertation, Rete remains the de facto standard matching algorithm. Despite promising research results, alternative algorithms such as TREAT and LEAPS have had little impact on modern production rule engines. Constraint Handling Rules (CHR) is a high-level, declarative programming language, similar to production rules. In recent years, CHR has increasingly been used in a wide range of general-purpose applications. State-of-the-art CHR systems use LEAPS-like lazy matching, and implement a large body of novel program analyses and optimization techniques to further improve performance. While obviously related, CHR and production rules research have mostly evolved independently from each other. With this article, we aim to foster cross-fertilization of implementation techniques. We provide a lucid, comprehensive overview of CHR’s rule evaluation methodology, and survey recent contributions to the field of lazy matching. Our empirical evaluation confirms Rete-based engines would surely benefit from incorporating similar techniques and optimizations.
T.: Compiling CHR to parallel hardware
- Proceedings of the 14th international ACM SIGPLAN Symposium on Principles and Practices of Declarative Programming, ACM
, 2012
"... This paper investigates the compilation of a committed-choice rulebased language, Constraint Handling Rules (CHR), to specialized hardware circuits. The developed hardware is able to turn the intrinsic concurrency of the language into parallelism. Rules are applied by a custom executor that handles ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
This paper investigates the compilation of a committed-choice rulebased language, Constraint Handling Rules (CHR), to specialized hardware circuits. The developed hardware is able to turn the intrinsic concurrency of the language into parallelism. Rules are applied by a custom executor that handles constraints according to the best degree of parallelism the implemented CHR specification can offer. Our framework deploys the target digital circuits through the Field Programmable Gate Array (FPGA) technology, by first compiling the CHR code fragment into a low level hardware description language. We also discuss the realization of a hybrid CHR interpreter, consisting of a software component running on a general purpose processor, coupled with a hardware accelerator. The latter unburdens the processor by executing in parallel the most computational intensive CHR rules directly compiled in hardware. Finally the performance of a prototype system is evaluated by time efficiency measures.

