Back to Search
Start Over
CHR for Imperative Host Languages.
- Source :
- Constraint Handling Rules (9783540922421); 2008, p161-212, 52p
- Publication Year :
- 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 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. [ABSTRACT FROM AUTHOR]
Details
- Language :
- English
- ISBNs :
- 9783540922421
- Database :
- Complementary Index
- Journal :
- Constraint Handling Rules (9783540922421)
- Publication Type :
- Book
- Accession number :
- 76728487
- Full Text :
- https://doi.org/10.1007/978-3-540-92243-8_7