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).
Similar content being viewed by others
References
Aït-KaciH.: Warren's Abstract Machine, A Tutorial Reconstruction, Logic Programming Series, The MIT Press, Cambridge, MA, 1991.
Benhamou, F.: Boolean algorithms in PrologIII, in A. Colmerauer and F. Benhamou (eds), Constraint Logic Programming: Selected Research, The MIT Press, 1993.
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.
Bennaceur, H. and Plateau, G.: Logical inference problem in variables 0/1, in Proc. IFORS 93 Conf., Lisboa, Portugal, 1993.
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.
BNR-Prolog User's Manual, Bell Northern Research, Ottawa, Canada, 1988.
BockmayrA.: Logic Programming with Pseudo-Boolean Constraints, Research Report MPI-I-91–227, Max Planck Institut, Saarbrücken, Germany, 1991.
BryantR. E.: Graph based algorithms for boolean function manipulation, IEEE Trans. Comp. 35(8) (1986), 677–691.
BüttnerW. and SimonisH.: Embedding boolean expressions into logic programming, J. Symbolic Computation 4 (1987), 191–205.
CarlssonB., CarlssonM., and DiazD.: Entailment of finite domain constraints, in 11th Int. Conf. Logic Programming, Santa Margherita, Italy, The MIT Press, 1994.
CodognetP. and DiazD.: A minimal extension of the WAM for clp(FD), in 10th Int. Conf. Logic Programming, Budapest, Hungary, The MIT Press, 1993.
CodognetP. and DiazD.: Boolean constraint solving using clp(FD), in Int. Logic Programming Symp., Vancouver, BC, Canada, MIT Press, 1993.
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.
Codognet, P. and Diaz, D.: Compiling constraint in clp(B), J. Logic Programming (1995), in press.
ColmerauerA.: An introduction to PrologIII, Comm. ACM, 28(4) (1990), 412–418.
Corsini, M. M. and Rauzy, A.: CLP(B) Do it yourself, in GULP'93, Italian Conf. Logic programming, Gizzeria Lido, Italy, 1993.
DavisM. and PutnamH.: A computing procedure for quantification theory, J. ACM 7 (1960), 201–215.
Dore, G. and Codognet, P.: A prototype compiler for Prolog with boolean constraints, in GULP'93 Italian Conf. Logic Programming, Gizzeria Lido, Italy, 1993
GalloG. and UrbaniG.: Algorithms for testing the satisfiability of propositional formulae, J. Logic Programming 7 (1989), 45–61.
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.
HaralickR. M. and ElliotG. L.: Increasing tree search efficiency for constraint satisfaction problems, Artificial Intelligence 14 (1980), 263–313.
HookerJ. N. and FedjkiC.: Branch-and-Cut Solution of Inference Problems in Propositional Logic, Research Report, Carnegie-Mellon University, Pittsburgh, PA, 1987.
Jaffar, J. and Lassez, J.-L.: Constraint logic programming, in Principle of Programming Languages, Munich, Germany, January 1987.
MackworthA. K.: Consistency in networks of relations, Artificial Intelligence 8 (1977), 99–118.
MartinU. and NipkowT.: Boolean unification — the story so far, J. of Symbolic Computation, 7 (1989), 191–205.
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.
Montanari, U.: Networks of constraints: Fundamental properties and application to picture processing, Information Science 7 (1974).
NadelB. A.: Constraint satisfaction algorithms, Computational Intelligence 5 (1989), 188–224.
Rauzy, A.: L'Evaluation Sémantique en Calcul Propositionnel, PhD Thesis, Université Aix-Marseille II, Marseille, France, January 1989.
Rauzy, A.: Adia, Technical Report, LaBRI, Université Bordeaux I, 1991.
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,
Rauzy, A.: Using enumerative methods for boolean unification, in A. Colmerauer and F. Benhamou (eds), Constraint Logic Programming: Selected Research, The MIT Press, 1993.
Rauzy, A.: Some Practical Results on the SAT Problem, Draft, 1993.
Saraswat, V.: The category of constraint systems is Cartesian-closed, in Proc. LICS 92, Logic in Computer Science, IEEE Press, 1992.
Scott, D. S.: Domains for denotational semantics, in ICALP'82, Int. Coll. Automata Languages and Programming, 1982.
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.
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.
Simonis, H. and Dincbas, M.: Propositional Calculus Problems in CHIP, ECRC, Technical Report TR-LP-48, 1990.
vanHentenryckP.: Constraint Satisfaction in Logic Programming, Logic Programming Series, The MIT Press, Cambridge, MA, 1989.
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.
vanHentenryckP., SimonisH., and DincbasM.: Constraint satisfaction using constraint logic programming, Artificial Intelligence, 58 (1992), 113–159.
vanHentenryckP., DevilleY., and TengC.-M.: A generic arc-consistency algorithm and its specializations, Artificial Intelligence 57 (1992), 291–321.
Warren, D. H. D.: An Abstract Prolog Instruction Set, Technical Report 309, SRI International, Oct. 1983.
Author information
Authors and Affiliations
Rights 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
Received:
Accepted:
Issue Date:
DOI: https://doi.org/10.1007/BF00247670