Advertisement

Springer Nature is making Coronavirus research free. View research | View latest news | Sign up for updates

A simple and efficient boolean solver for Constraint Logic Programming

  • 46 Accesses

  • 10 Citations

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 to check access.

References

  1. 1.

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

  2. 2.

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

  3. 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.

  4. 4.

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

  5. 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.

  6. 6.

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

  7. 7.

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

  8. 8.

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

  9. 9.

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

  10. 10.

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

  11. 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.

  12. 12.

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

  13. 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.

  14. 14.

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

  15. 15.

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

  16. 16.

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

  17. 17.

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

  18. 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. 19.

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

  20. 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. 21.

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

  22. 22.

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

  23. 23.

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

  24. 24.

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

  25. 25.

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

  26. 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. 27.

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

  28. 28.

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

  29. 29.

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

  30. 30.

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

  31. 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,

  32. 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. 33.

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

  34. 34.

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

  35. 35.

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

  36. 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. 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. 38.

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

  39. 39.

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

  40. 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. 41.

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

  42. 42.

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

  43. 43.

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

Download references

Author information

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

AMS Subject Classification

  • 68N17
  • 68T20
  • 68T15
  • 03B05

Key words

  • constraint logic programming
  • boolean solver
  • implementation
  • compilation
  • logic programming
  • finite domains