skip to main content
10.1145/1248648.1248653acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article

A concurrent constraint handling rules implementation in Haskell with software transactional memory

Published:16 January 2007Publication History

ABSTRACT

Constraint Handling Rules (CHR) is a concurrent committed-choice constraint logic programming language to describe transformations (rewritings) among multi-sets of constraints (atomic formulae). CHR is widely used in a range of applications spanning from type system design to artificial intelligence. However, none of the existing CHR implementations we are aware of exploits concurrency or parallelism explicitly. We give a concurrent CHR implementation using GHC (Glasgow Haskell Compiler) with support for Software Transactional Memory. We achieve some significant performance improvements compared to a single-threaded CHR implementation. We obtain a further speed-up, in some cases nearly close to the optimum of 100%, when running programs under under a dual-core processor architecture. Our results show that CHR can be implemented efficiently on a multi-core architecture.

References

  1. S. Abdennadher. Operational semantics and confluence of constraint propagation rules. In Proc. of CP'97, LNCS, pages 252--266. Springer-Verlag, 1997.Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Common CHR implementations, http://www.cs.kuleuven.ac.be/~dtai/projects/CHR.Google ScholarGoogle Scholar
  3. G. J. Duck, P. J. Stuckey, M. J. García de la Banda, and C. Holzbaur. The Refined Operational Semantics of Constraint Handling Rules. In Proc of ICLP'04, pages 90--104, 2004.Google ScholarGoogle Scholar
  4. G. J. Duck, P. J. Stuckey, and M. Sulzmann. Observable confluence for constraint handling rules. Technical Report CW 452, Katholieke Universteit Leuven, 2006. Proc. of CHR 2006, Third Workshop on Constraint Handling Rules.Google ScholarGoogle Scholar
  5. T. Frühwirth. Constraint handling rules. In Constraint Programming: Basics and Trends, LNCS. Springer-Verlag, 1995.Google ScholarGoogle Scholar
  6. T. Frühwirth. Parallelizing union-find in Constraint Handling Rules using confluence analysis. In Proc. of ICLP '05, volume 3668 of LNCS, pages 113--127. Springer-Verlag, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. T. Frühwirth. Constraint handling rules: the story so far. In Proc. of PPDP '06, pages 13--14. ACM Press, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Glasgow haskell compiler home page, http://www.haskell.org/ghc/.Google ScholarGoogle Scholar
  9. T. Harris, S. Marlow, S. Peyton Jones, and M. Herlihy. Composable memory transactions. In Proc. of PPoPP '05, pages 48--60. ACM Press, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. S. Peyton Jones, editor. Haskell 98 Language and Libraries: The Revised Report. Cambridge University Press, 2003.Google ScholarGoogle Scholar

Index Terms

  1. A concurrent constraint handling rules implementation in Haskell with software transactional memory

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Conferences
          DAMP '07: Proceedings of the 2007 workshop on Declarative aspects of multicore programming
          January 2007
          49 pages
          ISBN:9781595936905
          DOI:10.1145/1248648

          Copyright © 2007 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 16 January 2007

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • Article

          Upcoming Conference

          POPL '25

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader