Abstract
We present a new constraint solver over finite domains, freely available as library(clpfd) in SWI-Prolog. Our solver has several unique features, which we describe in this paper: Reasoning over arbitrarily large integers, always terminating propagation, and a domain-specific language that concisely expresses the full semantics of constraint reification. The library is entirely written in Prolog and can be easily ported to other Prolog systems that support attributed variables. The constraint solver is fast enough for teaching and research purposes and is already being used in courses at several universities in France, Germany, Italy, Austria and other countries.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Jaffar, J., Lassez, J.-L.: Constraint Logic Programming. In: POPL, pp. 111–119 (1987)
Diaz, D., Codognet, P.: Design and Implementation of the GNU Prolog System. Journal of Functional and Logic Programming 6 (2001)
Wallace, M., Novello, S., Schimpf, J.: ECLiPSe: A Platform for Constraint Logic Programming. Technical Report (1997)
Carlsson, M., Ottosson, G., Carlson, B.: An Open-Ended Finite Domain Constraint Solver. In: Hartel, P.H., Kuchen, H. (eds.) PLILP 1997. LNCS, vol. 1292, pp. 191–206. Springer, Heidelberg (1997)
Zhou, N.F., Nagasawa, I.: An Efficient Finite-domain Constraint Solver in Beta-Prolog. Journal of Japanese Society for Artificial Intelligence 9 (1994)
Gent, I.P., Walsh, T.: CSPLib: A Benchmark Library for Constraints. In: Proceedings of the 5th Int. Conf. PPCP (1999)
Wielemaker, J.: An Overview of the SWI-Prolog Programming Environment. In: Proceedings of the 13th International Workshop on LP Environments (2003)
da Silva, A.F., Santos Costa, V.: The Design and Implementation of the YAP Compiler: An Optimizing Compiler for Logic Programming Languages. In: Etalle, S., Truszczyński, M. (eds.) ICLP 2006. LNCS, vol. 4079, pp. 461–462. Springer, Heidelberg (2006)
Apt, K.R., Zoeteweij, P.: An Analysis of Arithmetic Constraints on Integer Intervals. Constraints 4 (2007)
Holzbaur, C.: OFAI CLP(Q,R) Manual, TR (1995)
Pritchard, P., Gries, D.: The Seven-Eleven Problem, TR (1994)
Demoen, B.: Dynamic attributes, their hProlog implementation, and a first evaluation. Technical Report (2002)
Burckel, S., Hoarau, S., Mesnard, F., Neumerkel, U.: cTI: Bottom-Up Termination Inference for Logic Programs. In: WLP 15 (2000)
Bentley, J.: Little languages. Communications of the ACM 29(8), 711–721 (1986)
Codognet, P., Diaz, D.: Compiling Constraints in clp(FD). Journal of Logic Programming 27(3) (1996)
Mernik, M., Heering, J., Sloane, A.M.: When and how to develop domain-specific languages. ACM Comput. Surv. 37(4), 316–344 (2005)
Johnson, S.C., Lesk, M.E.: Language development tools. Bell System Technical Journal 56(6), 2155–2176 (1987)
Schulte, C., Tack, G.: Perfect Derived Propagators. CoRR entry (2008)
Diaz, D., Codognet, P.: Design and Implementation of the GNU Prolog System. Journal of Functional and Logic Programming (JFLP)Â 2001(6) (2001)
Zhou, N.-F.: Programming Finite-Domain Constraint Propagators in Action Rules. Theory and Practice of Logic Programming 6(5), 483–508 (2006)
Frühwirth, T.: Theory and Practice of Constraint Handling Rules. Special Issue on Constraint Logic Programming, J. of Logic Programming 37(1-3) (1998)
Frisch, A.M., Stuckey, P.J.: The Proper Treatment of Undefinedness in Constraint Languages. In: Gent, I.P. (ed.) CP 2009. LNCS, vol. 5732, pp. 367–382. Springer, Heidelberg (2009)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Triska, M. (2012). The Finite Domain Constraint Solver of SWI-Prolog. In: Schrijvers, T., Thiemann, P. (eds) Functional and Logic Programming. FLOPS 2012. Lecture Notes in Computer Science, vol 7294. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-29822-6_24
Download citation
DOI: https://doi.org/10.1007/978-3-642-29822-6_24
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-29821-9
Online ISBN: 978-3-642-29822-6
eBook Packages: Computer ScienceComputer Science (R0)