Compiling constraint handling rules for efficient tabled evaluation

  • Authors:
  • Beata Sarna-Starosta;C. R. Ramakrishnan

  • Affiliations:
  • Dept. of Comp. Sci. & Engg., Michigan State University, East Lansing, MI;Dept. of Computer Science, University at Stony Brook, Stony Brook, NY

  • Venue:
  • PADL'07 Proceedings of the 9th international conference on Practical Aspects of Declarative Languages
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

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.