Abstract
Constraint Logic Programming (CLP) defines a family of programming languages that extend Prolog to support constraint solving over certain domains. Current state-of-the-art CLP systems are based on abstract machines or language constructs that are good for certain domains and propagation algorithms but are either not sufficiently expressive or inefficient for some other domains and propagation algorithms. B-Prolog provides a construct, called action rules, for programming interactive agents such as constraint propagators. As far as constraint propagation is concerned, an agent maintains dynamically a certain level of consistency for a constraint. This paper presents constraint solvers implemented in action rules for six domains, namely, finite-domains, Boolean, trees, lists, sets, and floating-point intervals. Some of the solvers such as the finite-domain and set solvers are competitive in performance with the fastest solvers available now.
The original version of this chapter was revised: The copyright line was incorrect. This has been corrected. The Erratum to this chapter is available at DOI: 10.1007/978-0-387-35602-0_35
Chapter PDF
Similar content being viewed by others
References
A. Aggoun and N. Beldiceanu: Overview of the CHIP Compiler System, In Proc. of the 8th International Conference on Logic Programming, pp.775–789, MIT Press, 1991.
H. Ait-Kaci: Warren’s Abstract Machine, The MIT Press, 1991.
F. Azevedo and P. Barahona: Modeling Digital CIrcuits Problems with Set Constraints, Proc. Computational Logic - CL 2000, LNAI 1861, 2000.
F. Benhamou, D. McAllester, P. van Hentenryck, CLP(Intervals) Revisited, Proc. International Symposium on Logic Programming, pp. 124–138, 1994.
F. Benhamou and W.J. Older, Applying Interval Arithmetic to Real, Integer, and Boolean Constraints, Journal of Logic Programming, 1996.
M. Carlsson: Freeze, Indexing, and other Implementation Issues in the WAM, Proc. 4th International Conference on Logic Programming, 40–58, 1987.
M. Carlsson, G. Ottosson, and B. Carlson: An Open-ended Finite Domain Constraint Solver, Proc. Programming Languages and Logic Programming, pp.191206, 1997.
J.G. Cleary, Logical Arithmetic, Future Generation Computing, Vol. 2, pp. 125149, 1987.
P. Codognet and D. Diaz: Compiling Constraints in clp(FD), Journal of Logic Programming, 27 (3), pp. 185–226, 1996.
P. Codognet and D. Diaz: Boolean Constraints Solving Using clp(FD), Journal of Automatic Theorem Proving, 1996.
J. Cohen: Constraint Logic Programming Languages, Communications of ACM Vol.33, No.7, pp.52–68, 1990.
A. Colmerauer.: Equations and In-equations on Finite and Infinite Trees, Proc. of the International Conference on Fifth Generation Computer Systems (FGCS’8.4), ICOT, 85–99, 1984.
A. Colmerauer.: An Introduction to Prolog-III, Communications of ACM, Vol. 33, No. 7, 1990.
M. Dincbas, P. van Hentenryck, H. Simonis, A. Aggoun, T. Graf, and F. Berthier: The Constraint Logic Programming Language CHIP, In Proceedings of the Fifth Generation Computer Systems, pp.693–702, ICOT, 1988.
M. Dincbas, H. Simonis, P. van Hentenryck: Solving Large Combinatorial Problems in Logic Programming. Journal of Logic Programming, 8 (1), pp. 75–93, 1990.
I. Eidhammer, D. Gilbert, I. Jonassen, and M. Ratnayake: A Constraint Based Structure Description Language for Biosequences, Constraints, An International Journal, 2001.
T.W. Fruhwirth: Theory and Practice of Constraint Handling Rules, Journal of Logic Programming, Vol. 37, pp. 95–138, 1998.
C. Gervet: Interval Propagation to Reason about Sets: Definition and Implementation of a Practical Language, Constraints, An International Journal, vol. 1, pp. 191–246, 1997.
W. Harvey and P.J. Stuckey: Improving Propagation by Changing Constraint Representation, Constraints, An International Journal, to appear.
P. van Hentenryck: Constraint Satisfaction in Logic Programming. MIT Press, 1989.
P. van Hentenryck and V. Saraswat (eds.), Strategic Directions in Constraint Programming, ACM Computing Survey, Vol.28, No.4, pp.701–728, 1996.
N. Hentze and J. Jaffar: Set Constraints and Set-Based Analysis, Proc. Principle and Practice of Constraint Programming, A. Borning, ed., LNCS, pp.281–298, Springer-Verlag, 1994.
T. Hickey, Q. Ju, and M.H. Van Emden, Interval arithmetic: From principles to implementation, Journal of the ACM, Vol. 48, No. 5, pp. 1038–1068, 2001.
C. Holzbaur: Meta-structures Vs. Attribute Variables in the Context of Extensible Unification, Proc. PLLP’92, LNCS 631, pp. 260–268, 1992.
J. Jaffar, S. Michaylov, P. Stuckey and R. Yap, An Abstract Machine for CLP(R), Proc. SIGPLAN’92 Conf. on Programming Language Design 8 Implementation (PLDI), San Francisco, 1992.
J. Jaffar and M. J. Maher, Constraint Logic Programming: A Survey, Journal of Logic Programming, 1994.
R.B. Kearfott and V. Kreinovich: Applications of Interval Computations, Kluwer, 1996.
V. Kumar: Algorithms for Constraint Satisfaction Problems: A Survey. AI Magazine, 13 (1), pp. 32–44, 1992.
J.H.M Lee and T.W. Lee: A WAM-based Abstract Machine for Interval Constraint Logic Programming, Proc. IEEE International Conference on Tools with Artificial Intelligence, pp. 122–128, 1994.
A.K. Mackworth: Constraint Satisfaction, In Encyclopedia of Artificial Intelligence, John Wiley Sc Sons, 205–211, 1986.
T. Muller: Constraint Propagation in Mozart, PhD Thesis, Programming Systems Lab, Universit Saarlandes, http://www.ps.uni-sb.de/~tmueller/thesis/, 2001.
L. Pacholski and A.Podelski• Set Constraints: A Pearl in Research on Constraints, In Proc. 3rd International Conference on Constraint Programming, 1997.
J.F. Puget and M. Leconte: Beyond the Glass Box: Constraints as Objects, Proc. International Logic Programming Symposium, pp. 513–527, 1995.
J.F. Puget: Finite Set Intervals, in Proc. Workshop on Set Constraints, CP’96, 1996.
E. Shapiro: The Family of Concurrent Logic Programming Languages, ACM Comput. Surveys, vol. 21, no. 3 pp. 412–510, 1989.
E. Tsang: Foundations of Constraint Satisfaction, Academic Press, 1993.
M.G. Wallace, Practical Applications of Constraint Programming, Constraints Journal, vol.1 no.1, Kluwer, 1996.
N.F. Zhou: Parameter Passing and Control Stack Management in Prolog Implementation Revisited, ACM Transactions on Programming Languages and Systems, 18 (6), 752–779, 1996.
N.F. Zhou: A High-Level Intermediate Language and the Algorithms for Compiling Finite-Domain ConstraintsProc. Joint International Conference and Symposium on Logic Programming 70–84, MIT Press, 1998. A revised version is available from: http://www.sci.brooklyn.cuny/zhou/pappers/arule.pdf
N.F. Zhou: B-Prolog User’s Manual (Version 6.1), http://www.probp.com 2001.
N.F. Zhou and J.Schimpf: Implementation of Propagation Rules for Set Constraints Revisited, submitted for publication, 2002.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2002 IFIP International Federation for Information Processing
About this paper
Cite this paper
Zhou, NF. (2002). Implementing Constraint Solvers in B-Prolog. In: Musen, M.A., Neumann, B., Studer, R. (eds) Intelligent Information Processing. IIP 2002. IFIP — The International Federation for Information Processing, vol 93. Springer, Boston, MA. https://doi.org/10.1007/978-0-387-35602-0_22
Download citation
DOI: https://doi.org/10.1007/978-0-387-35602-0_22
Publisher Name: Springer, Boston, MA
Print ISBN: 978-1-4757-1031-1
Online ISBN: 978-0-387-35602-0
eBook Packages: Springer Book Archive