Results 1 - 10
of
11
The Refined Operational Semantics of Constraint Handling Rules
- IN 20TH INTERNATIONAL CONFERENCE ON LOGIC PROGRAMMING (ICLP’04
, 2004
"... Constraint Handling Rules (CHRs) are a high-level rulebased programming language commonly used to write constraint solvers. The theoretical operational semantics for CHRs is highly non-deterministic and relies on writing confluent programs to have a meaningful behaviour. Implementations of CHRs use ..."
Abstract
-
Cited by 41 (3 self)
- Add to MetaCart
Constraint Handling Rules (CHRs) are a high-level rulebased programming language commonly used to write constraint solvers. The theoretical operational semantics for CHRs is highly non-deterministic and relies on writing confluent programs to have a meaningful behaviour. Implementations of CHRs use an operational semantics which is considerably finer than the theoretical operational semantics, but is still nondeterministic (from the user's perspective). This paper formally defines this refined operational semantics and proves it implements the theoretical operational semantics. It also 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. This supports the use of new idioms in CHR programs.
Abstract Interpretation for Constraint Handling Rules
- In Proceedings of the 7th Intl. Conference on Principles and Practice of Declarative Programming (PPDP’05
, 2005
"... Program analysis is essential for the optimized compilation of Constraint Handling Rules (CHRs) as well as the inference of behavioral properties such as confluence and termination. Up to now all program analyses for CHRs have been developed in an ad hoc fashion. In this work we bring the general pr ..."
Abstract
-
Cited by 25 (15 self)
- Add to MetaCart
Program analysis is essential for the optimized compilation of Constraint Handling Rules (CHRs) as well as the inference of behavioral properties such as confluence and termination. Up to now all program analyses for CHRs have been developed in an ad hoc fashion. In this work we bring the general program analysis methodology of abstract interpretation to CHRs: we formulate an abstract interpretation framework over the call-based operational semantics of CHRs. The abstract interpretation framework is non-obvious since it needs to handle the highly non-deterministic execution of CHRs. The use of the framework is illustrated with two instantiations: the CHR-specific late storage analysis and the more generally known groundness analysis. In addition, we discuss optimizations based on these analyses and present experimental results. Categories and Subject Descriptors D.3.2 [Programming Languages]: Language Classifications—Constraint and logic languages; F.3.2 [Logics and
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.
Antimonotony-based Delay Avoidance for CHR
, 2004
"... We present an optimisation for Constraint Handling Rules (CHR) that reduces the amount of variables a constraint delays on. This optimisation reduces the overhead of delaying on variables as well as the needless reawakening of delayed constraint. A correctness proof of the optimisation based on the ..."
Abstract
-
Cited by 8 (6 self)
- Add to MetaCart
We present an optimisation for Constraint Handling Rules (CHR) that reduces the amount of variables a constraint delays on. This optimisation reduces the overhead of delaying on variables as well as the needless reawakening of delayed constraint. A correctness proof of the optimisation based on the refined operational semantics establishes the validity of the optimisation and sheds light on possible extensions as well as related optimisations. The delay avoidance optimisation shows good speedups for some programs and no noticable slowdown for others.
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
Modular CHR with ask and tell
- In Schrijvers et al
"... Abstract. In this paper, we introduce a modular version of the Constraint Handling Rules language CHR, called CHRat for modular CHR with ask and tell. Any constraint defined in a CHRat component can be reused both in rules and guards in another CHRat component to define new constraint solvers. Unlik ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
Abstract. In this paper, we introduce a modular version of the Constraint Handling Rules language CHR, called CHRat for modular CHR with ask and tell. Any constraint defined in a CHRat component can be reused both in rules and guards in another CHRat component to define new constraint solvers. Unlike previous work on modular CHR, our approach is completely general as it does not rely on an automatic derivation of conditions for checking entailment in guards, but on a programming discipline for defining both satisfiability (tell) and entailment (ask) checks by CHRat rules for each constraint. We define the operational and declarative semantics of CHRat, provide a transformation of CHRat components to flat CHR programs, and prove the preservation of the semantics. We then provide examples of the modularization of classical CHR constraint solvers. 1
Compiling ask constraints
- Proceedings of the 20th International Conference on Logic Programming, LNCS
, 2004
"... Abstract. In this paper we investigate how to extend a generic constraint solver that provides not only tell constraints (by adding the constraint to the store) but also ask tests (by checking whether the constraint is entailed by the store), with general ask constraints. Ask constraints are importa ..."
Abstract
-
Cited by 2 (1 self)
- Add to MetaCart
Abstract. In this paper we investigate how to extend a generic constraint solver that provides not only tell constraints (by adding the constraint to the store) but also ask tests (by checking whether the constraint is entailed by the store), with general ask constraints. Ask constraints are important for implementing constraint implication, extensible solvers using dynamic scheduling and reification. While the ask-test must be implemented by the solver writer, the compiler can extend this to provide ask behaviour for complex combinations of constraints, including constraints from multiple solvers. We illustrate the use of this approach within the HAL system. 1
Using CHRs to generate functional test cases for the Java Card Virtual Machine
, 1725
"... Publication interne n˚1725 — Juin 2005 — 17 pages Abstract: Functional testing based on a formal specification consists in deriving test cases from a formal model to detect faults within an implementation. In our work, we investigate the use of Constraint Handling Rules (CHRs) to automate functional ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
Publication interne n˚1725 — Juin 2005 — 17 pages Abstract: Functional testing based on a formal specification consists in deriving test cases from a formal model to detect faults within an implementation. In our work, we investigate the use of Constraint Handling Rules (CHRs) to automate functional test cases generation based on a formal model. Our case study is a model of the Java Card Virtual Machine (JCVM) specification written in a subset of the Coq language. In this paper we define an automated translation from this model into CHRs in order to generate test cases for the JCVM. We also propose several test purposes based on rewriting rules coverage and automatic non-conformity detection. The key point of our approach resides in the use of deep guards to model faithfully the semantic of our formal model of the JCVM. Finally, we propose an overall functional test case generation approach based on CHRs that could be applied to other formal models. Key-words: test case generation, functional testing, constraint solving, rewriting rules,
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.

