Compiling Constraint Handling Rules into Prolog with Attributed Variables

  • Christian Holzbaur
  • Thom Frühwirth
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1702)


We introduce the most recent and advanced implementation of constraint handling rules (CHR) in a logic programming language, which improves both on previous implementations (in terms of completeness, flexibility and efficiency) and on the principles that should guide such a Prolog implementation consisting of a runtime system and a compiler. The runtime system utilizes attributed variables for the realization of the constraint store with efficient retrieval and update mechanisms. Rules describing the interactions between constraints are compiled into Prolog clauses by a multi-phase compiler, the core of which comprises a small number of compact code generating templates in the form of definite clause grammar rules.


Logic and constraint programming Implementation and compilation methods 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Banatre, J.-P., Coutant, A., Le Metayer, D.: A Parallel Machine for Multiset Transformation and its Programming Style. Future Generation Computer Systems 4, 133–144 (1988)CrossRefGoogle Scholar
  2. 2.
    Benhamou, F., Older, W.J.: Bell Northern Research, Applying interval arithmetic to Integer and Boolean constraints, Technical Report (June 1992)Google Scholar
  3. 3.
    Brisset, P., et al.: ECLiPSe 4.0 User Manual, IC-Parc at Imperial College, London (July 1998)Google Scholar
  4. 4.
    Carlsson, M., Widen, J.: Sicstus Prolog Users Manual, Release 3#0, Swedish Institute of Computer Science, SICS/R-88/88007C (1995)Google Scholar
  5. 5.
    Diaz, D., Codognet, P.: A Minimal Extension of the WAM for clp(FD). In: Warren, D.S. (ed.) Proceedings of the Tenth International Conference on Logic Programming, pp. 774–790. The MIT Press, Budapest (1993)Google Scholar
  6. 6.
    Dincbas, M., et al.: The Constraint Logic Programming Language CHIP. Fifth Generation Computer Systems, Tokyo, Japan (December 1988)Google Scholar
  7. 7.
    Debray, S., Kannan, S., Paithane, M.: Weighted Decision Trees. In: Apt, K.R. (ed.) Logic Programming - Proceedings of the Joint International Conference and Symposium on Logic Programming, pp. 654–668. MIT Press, Cambridge (1992)Google Scholar
  8. 8.
    Debray, S.K.: QD-Janus: A Sequential Implementation of Janus in Prolog. Software—Practice and Experience 23(12), 1337–1360 (1993)CrossRefGoogle Scholar
  9. 9.
    Frühwirth, T., Brisset, P.: High-Level Implementations of Constraint Handling Rules, Technical Report ECRC-95-20, ECRC Munich, Germany (June 1995)Google Scholar
  10. 10.
    Frühwirth, T., Brisset, P.: Chapter on Constraint Handling Rules, in ECL iPSe 3.5.1 Extensions User Manual, ECRC Munich, Germany (December 1995)Google Scholar
  11. 11.
    Frühwirth, T., Abdennadher, S., Meuss, H.: Confluence and Semantics of Constraint Simplification Rules. Constraint Journal. Kluwer Academic Publishers, Dordrecht (to appear)Google Scholar
  12. 12.
    Frühwirth, T.: Theory and Practice of Constraint Handling Rules, Special Issue on Constraint Logic Programming. In: Stuckey, P., Marriot, K. (eds.) Journal of Logic Programming, October 1998, vol. 37(1-3), pp. 95–138 (1998)Google Scholar
  13. 13.
    Hentenryck, P., van, S.H., Dincbas, M.: Constraint Satisfaction Using Constraint Logic Programming. Artificial Intelligence 58(1-3), 113–159 (1992)zbMATHCrossRefMathSciNetGoogle Scholar
  14. 14.
    Herbig, B.: Eine homogene Implementierungsebene für einen hybriden Wissens repräsentationsformalismus, Master Thesis, in German. University of Kaiserslautern, Germany (April 1993)Google Scholar
  15. 15.
    Holzbaur, C.: Specification of Constraint Based Inference Mechanisms through Extended Unification, Department of Medical Cybernetics and Artificial Intelligence, University of Vienna, Dissertation (1990)Google Scholar
  16. 16.
    Holzbaur, C.: Metastructures vs. Attributed Variables in the Context of Extensible Unification. In: Bruynooghe, M., Wirsing, M. (eds.) PLILP 1992. LNCS, vol. 631, pp. 260–268. Springer, Heidelberg (1992)CrossRefGoogle Scholar
  17. 17.
    Holzbaur, C.: Extensible Unification as Basis for the Implementation of CLP Languages. In: Baader, F., et al. (eds.) Proceedings of the Sixth International Workshop on Unification, Boston University, MA, pp. 56–60 (1993) TR-93-004Google Scholar
  18. 18.
    Holzbaur, C., Frühwirth, T.: Constraint Handling Rules Reference Manual, for SICStus Prolog. In: Österreichisches Forschungsinstitut für Artificial Intelligence, Vienna, Austria (March 1998) TR-98-01Google Scholar
  19. 19.
    Holzbaur, C., Frühwirth, T.: Compiling Constraint Handling Rules (CHR). In: Third ERCIM/Compulog Network Workshop on Constraints, CWI Amsterdam, The Netherlands (September 1998)Google Scholar
  20. 20.
    Holzbaur, C., Frühwirth, T.: Join Evaluation Schemata for Constraint Handling Rules. In: 13th Workshop Logische Programmierung WLP 1998, TU Vienna, Austria (September 1998)Google Scholar
  21. 21.
    le Huitouze, S.: A new data structure for implementing extensions to Prolog. In: Deransart, P., Maluszunski, J. (eds.) Programming Language Implementation and Logic Programming, pp. 136–150. Springer, Heidelberg (1990)CrossRefGoogle Scholar
  22. 22.
    Jaffar, J., Maher, M.J.: Constraint Logic Programming: A Survey. Journal of Logic Programming 9(20), 503–581 (1994)CrossRefMathSciNetGoogle Scholar
  23. 23.
    Maher, M.J.: Logic Semantics for a Class of Committed-Choice Programs. In: Fourth Intl. Conf. on Logic Programming, Melbourne, Australia, pp. 858–876. MIT Press, CambridgeGoogle Scholar
  24. 24.
    Marriott, K., Stuckey, J.P.: Programming with Constraints. MIT Press, USA (March 1998)Google Scholar
  25. 25.
    Naish, L.: Prolog control rules. In: Proceedings of the Ninth International Joint Conference on Artificial Intelligence, Los Angeles, California, September 1985, pp. 720–722 (1985)Google Scholar
  26. 26.
    Neumerkel, U.: Extensible unification by metastructures. In: Proc. of Metaprogramming in Logic (META 1990), Leuven, Belgium (1990)Google Scholar
  27. 27.
    Sahlin, D.: An Automatic Partial Evaluator for Full Prolog. Swedish Institute of Computer Science (1991)Google Scholar
  28. 28.
    Saraswat, V.A.: Concurrent Constraint Programming. MIT Press, Cambridge (1993)Google Scholar
  29. 29.
    Shapiro, E.: The Family of Concurrent Logic Programming Languages. ACM Computing Surveys 21(3), 413–510 (1989)CrossRefGoogle Scholar
  30. 30.
    Shen, K.: The Extended CHR Implementation, chapter in ECL iPSe 4.0 Library Manual, IC-Parc at Imperial College, London (July 1998)Google Scholar
  31. 31.
    Sidebottom, G.A.: A Language for Optimizing Constraint Propagation. Simon Fraser University, Canada (1993)Google Scholar
  32. 32.
    Smolka, G., Treinen, R.: DFKI Oz Documentation Series, DFKI, Saarbrücken, Germany (1994)Google Scholar
  33. 33.
    Ueda, K., Chikayama, T.: Concurrent Prolog Compiler on Top of Prolog. In: Symposium on Logic Programming, pp. 119–127. The Computer Society Press (1985)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1999

Authors and Affiliations

  • Christian Holzbaur
    • 1
  • Thom Frühwirth
    • 2
  1. 1.Department of Medical Cybernetics and Artificial IntelligenceUniversity of ViennaViennaAustria
  2. 2.Department of Computer ScienceLudwig-Maximilians-UniversityMunichGermany

Personalised recommendations