Skip to main content
Log in

A simple and efficient boolean solver for Constraint Logic Programming

  • Published:
Journal of Automated Reasoning Aims and scope Submit manuscript

Abstract

We study in this paper the use of consistency techniques and local propagation methods, originally developed for constraints over finite domains, for solving boolean constraints in Constraint Logic Programming (CLP). To this aim, we first present a boolean CLP language clp(B/FD) built upon a CLP language over finite domains clp(FD) which uses a propagation-based constraint solver. It is based on a single primitive constraint which allows the boolean solver to be encoded at a low level. The boolean solver obtained in this way is both very simple and very efficient: on average it is eight times faster than the CHIP propagation-based boolean solver, i.e. nearly an order of magnitude faster, and infinitely better than the CHIP boolean unification solver. It also performs on average several times faster than special-purpose stand-alone boolean solvers. We then present in a second time several simplifications of the above approach, leading to the design of a very simple and compact dedicated boolean solver. This solver can be implemented in a WAM-based logical engine with a minimal extension limited to four new abstract instructions. This clp(B) system provides a further factor two speedup w.r.t. clp(B/FD).

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Aït-KaciH.: Warren's Abstract Machine, A Tutorial Reconstruction, Logic Programming Series, The MIT Press, Cambridge, MA, 1991.

    Google Scholar 

  2. Benhamou, F.: Boolean algorithms in PrologIII, in A. Colmerauer and F. Benhamou (eds), Constraint Logic Programming: Selected Research, The MIT Press, 1993.

  3. BennaceurH. and PlateauG.: FASTLI: An Exact Algorithm for the Constraint Satisfaction Problem: Application to Logical Inference, Research Report, LIPN, Université Paris-Nord, Paris, France, 1991.

    Google Scholar 

  4. Bennaceur, H. and Plateau, G.: Logical inference problem in variables 0/1, in Proc. IFORS 93 Conf., Lisboa, Portugal, 1993.

  5. BeringerA., HoosH. H., and MetzgerM.: GSAT versus simulated annealing, in Proc. ECAI 94, 11th Eur. Conf. Artificial Intelligence, Amsterdam, The Netherlands, Wiley, New York, 1994.

    Google Scholar 

  6. BNR-Prolog User's Manual, Bell Northern Research, Ottawa, Canada, 1988.

  7. BockmayrA.: Logic Programming with Pseudo-Boolean Constraints, Research Report MPI-I-91–227, Max Planck Institut, Saarbrücken, Germany, 1991.

    Google Scholar 

  8. BryantR. E.: Graph based algorithms for boolean function manipulation, IEEE Trans. Comp. 35(8) (1986), 677–691.

    Google Scholar 

  9. BüttnerW. and SimonisH.: Embedding boolean expressions into logic programming, J. Symbolic Computation 4 (1987), 191–205.

    Google Scholar 

  10. CarlssonB., CarlssonM., and DiazD.: Entailment of finite domain constraints, in 11th Int. Conf. Logic Programming, Santa Margherita, Italy, The MIT Press, 1994.

    Google Scholar 

  11. CodognetP. and DiazD.: A minimal extension of the WAM for clp(FD), in 10th Int. Conf. Logic Programming, Budapest, Hungary, The MIT Press, 1993.

    Google Scholar 

  12. CodognetP. and DiazD.: Boolean constraint solving using clp(FD), in Int. Logic Programming Symp., Vancouver, BC, Canada, MIT Press, 1993.

    Google Scholar 

  13. CodognetP. and DiazD.: clp(B): Combining simplicity and efficiency in boolean constraint solving, in Programming Logic Implementation and Logic Programming, Springer-Verlag, Madrid, Spain, 1994.

    Google Scholar 

  14. Codognet, P. and Diaz, D.: Compiling constraint in clp(B), J. Logic Programming (1995), in press.

  15. ColmerauerA.: An introduction to PrologIII, Comm. ACM, 28(4) (1990), 412–418.

    Google Scholar 

  16. Corsini, M. M. and Rauzy, A.: CLP(B) Do it yourself, in GULP'93, Italian Conf. Logic programming, Gizzeria Lido, Italy, 1993.

  17. DavisM. and PutnamH.: A computing procedure for quantification theory, J. ACM 7 (1960), 201–215.

    Google Scholar 

  18. Dore, G. and Codognet, P.: A prototype compiler for Prolog with boolean constraints, in GULP'93 Italian Conf. Logic Programming, Gizzeria Lido, Italy, 1993

  19. GalloG. and UrbaniG.: Algorithms for testing the satisfiability of propositional formulae, J. Logic Programming 7 (1989), 45–61.

    Google Scholar 

  20. Gent, I. P. and Wash, T.: Towards an understanding of Hill-climbing procedures for SAT, in Proc. of AAAI 93, 11th Nat. Conf. Artificial Intelligence, AAAI Press, 1993.

  21. HaralickR. M. and ElliotG. L.: Increasing tree search efficiency for constraint satisfaction problems, Artificial Intelligence 14 (1980), 263–313.

    Google Scholar 

  22. HookerJ. N. and FedjkiC.: Branch-and-Cut Solution of Inference Problems in Propositional Logic, Research Report, Carnegie-Mellon University, Pittsburgh, PA, 1987.

    Google Scholar 

  23. Jaffar, J. and Lassez, J.-L.: Constraint logic programming, in Principle of Programming Languages, Munich, Germany, January 1987.

  24. MackworthA. K.: Consistency in networks of relations, Artificial Intelligence 8 (1977), 99–118.

    Google Scholar 

  25. MartinU. and NipkowT.: Boolean unification — the story so far, J. of Symbolic Computation, 7 (1989), 191–205.

    Google Scholar 

  26. Massat, J.-L.: Using local consistency techniques to solve boolean constraints, in A. Colmerauer and F. Benhamou (eds), Constraint Logic Programming: Selected Research, The MIT Press, 1993.

  27. Montanari, U.: Networks of constraints: Fundamental properties and application to picture processing, Information Science 7 (1974).

  28. NadelB. A.: Constraint satisfaction algorithms, Computational Intelligence 5 (1989), 188–224.

    Google Scholar 

  29. Rauzy, A.: L'Evaluation Sémantique en Calcul Propositionnel, PhD Thesis, Université Aix-Marseille II, Marseille, France, January 1989.

  30. Rauzy, A.: Adia, Technical Report, LaBRI, Université Bordeaux I, 1991.

  31. UribeT. E. and StickelM. E.: Ordered binary decision diagrams and the Davis-Putnam procedure, in J.-P.Jouannaud (ed.), Proc. CCL'94 1st Int. Conf. Constraints in Computational Logic, Springer-Verlag, Munich, Germany, LNCS 845, 1994,

    Google Scholar 

  32. Rauzy, A.: Using enumerative methods for boolean unification, in A. Colmerauer and F. Benhamou (eds), Constraint Logic Programming: Selected Research, The MIT Press, 1993.

  33. Rauzy, A.: Some Practical Results on the SAT Problem, Draft, 1993.

  34. Saraswat, V.: The category of constraint systems is Cartesian-closed, in Proc. LICS 92, Logic in Computer Science, IEEE Press, 1992.

  35. Scott, D. S.: Domains for denotational semantics, in ICALP'82, Int. Coll. Automata Languages and Programming, 1982.

  36. Selman, B. and Kautz, H. A.: An empirical study of greedy local search for satisfiability testing, in Proc. AAAI 93, 11th Nat. Conf. on Artificial Intelligence, AAAI Press, 1993.

  37. Selman, B., Levesque, H., and Mitchell, D.: A new method for solving hard satisfiability problems, in Proc. AAAI 92, 10th Nat. Conf. Artificial Intelligence, AAAI Press, 1992.

  38. Simonis, H. and Dincbas, M.: Propositional Calculus Problems in CHIP, ECRC, Technical Report TR-LP-48, 1990.

  39. vanHentenryckP.: Constraint Satisfaction in Logic Programming, Logic Programming Series, The MIT Press, Cambridge, MA, 1989.

    Google Scholar 

  40. van Hentenryck, P., Saraswat, V., and Deville, Y.: Constraint processing in cc(FD), in A. Podelski (ed.), Constraint Programming: Basics and Trends, Springer-Verlag, LNCS 910, 1995.

  41. vanHentenryckP., SimonisH., and DincbasM.: Constraint satisfaction using constraint logic programming, Artificial Intelligence, 58 (1992), 113–159.

    CAS  PubMed  Google Scholar 

  42. vanHentenryckP., DevilleY., and TengC.-M.: A generic arc-consistency algorithm and its specializations, Artificial Intelligence 57 (1992), 291–321.

    Google Scholar 

  43. Warren, D. H. D.: An Abstract Prolog Instruction Set, Technical Report 309, SRI International, Oct. 1983.

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Codognet, P., Diaz, D. A simple and efficient boolean solver for Constraint Logic Programming. J Autom Reasoning 17, 97–128 (1996). https://doi.org/10.1007/BF00247670

Download citation

  • Received:

  • Accepted:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF00247670

AMS Subject Classification

Key words

Navigation