Compiling Constraint Handling Rules for Efficient Tabled Evaluation

Beata Sarna-Starosta, C. R. Ramakrishnan


Abstract:

Tabled resolution, which alleviates some of Prolog’s termination problems, makes it possible to create practical applications from high-level declarative specifications. Constraint Handling Rules (CHR) is an elegant framework for implementing constraint solvers from high-level specifications, and is available in many Prolog systems. However, applications combining the power of these two declarative paradigms have been impractical since traditional CHR implementations interact poorly with tabling. In this paper we present a new (set-based) semantics for CHR which enables efficient integration with tabling. The new semantics coincides with the traditional (multi-set-based) semantics for a large class of CHR programs. We describe CHRd, an implementation based on the new semantics. CHRd uses a distributed constraint store that can be directly represented in tables. Although motivated by tabling, CHRd works well also on non-tabled platforms. We present experimental results which show that, relative to traditional implementations, CHRd performs significantly better on tabled programs, and yet shows comparable results on non-tabled benchmarks.


Bibtex Entry:

@inproceedings{SR:PADL07,
author = {Beata Sarna-Starosta and  C. R. Ramakrishnan},
title = {Compiling Constraint Handling Rules for Efficient Tabled Evaluation},
booktitle = {Practical Aspects of Declarative Languages ({PADL})},
address = {Nice, France},
month = {Jan},
series = {Lecture Notes in Computer Science},
volume = {4354},
pages = {170--184},
publisher = {Springer},
year = {2007}
}


Full Paper: [pdf]


Home | Papers

C. R. Ramakrishnan
(cram@cs.sunysb.edu)