Abstract
In this paper, we describe Nicolog, a language with capabilities similar to recently developed constraint logic programming (CLP) languages such as CLP(BNR), clp(FD), and cc(FD). Central to Nicolog are projection constraints (PCs), a sublanguage for compiling and optimizing constraint propagation in numeric and Boolean domains. PCs are an interesting generalization of the indexical constraints introduced in cc(FD) and also found in clp(FD). Nicolog compiles a very general class of built-in constraints into equivalent sets of PCs, allowing an arbitrary mixture of integer (easily extensible to real) and Boolean operations. Nicolog also lets the user program PCs directly, making it possible to implement new sophisticated propagation procedures. We show that PCs are a simple, efficient, and flexible way to implement most of the propagation procedures possible in other FD CLP systems. These include procedures for cardinality, constructive disjunction, implication, and mixed Boolean/numeric constraints. Empirical results with a simple prototype Nicolog implementation based on the WAM architecture show it can solve hard problems with speed comparable to the fastest existing CLP systems.
Similar content being viewed by others
References
Aggoun, A. and Beldiceanu, N.: Overview of the CHIP compiler system, in Proc. 8th Int. Conf. Logic Programming, Paris, 1991, pp. 775–789.
Aït-Kaci, H.: Warren's Abstract Machine: A Tutorial Reconstruction, MIT Press, Cambridge, MA, 1991.
Benhamou, F. and Older, W. J.: Applying Interval Arithmetic to Integer and Boolean Constraints, Technical Report, Bell Northern Res. (June 1992).
Codognet, P. and Diaz, D.: Boolean constraint solving in clp(FD), in Proc. the International Logic Programming Symposium, MIT Press, Cambridge, MA, 1993.
Colmerauer, A.: An introduction to prolog III, Commun. ACM 33(7) (1990), 69–90.
Croft, H., Falconer, K., and Guy, R.: Unsolved Problems in Geometry, Springer, New York, 1991.
Dechter, R. and Pearl, J.: Tree clustering for constraint networks, Artificial Intelligence 38 (1989), 353–366.
Diaz, D. and Codognet, P.: A minimal extension of the WAM for clp(FD), in Proc. Int. Conf. Logic Programming, MIT Press, Cambridge, MA, 1993.
Dincbas, M., Simonis, H., and Hentenryck, P. V.: Solving large combinatorial problems in logic programming, J. Logic Programming 8 (1990), 75–93.
Freuder, E. C.: A sufficient condition for backtrack-free search, J. ACM 29(1) (1982), 24–32.
Freuder, E. C.. A sufficient condition for backtrack-bounded search, J. ACM 32(4) (1985), 755–761.
Graf, T., Van Hentenryck, P., Pradelles, C., and Zimmer, L.: Simulation of hybrid circuits in constraint logic programming, in Proc. Int. Joint Conf. Artificial Intelligence, Detroit, 1989.
Haralick, R. M. and Elliot, G. L.: Increasing tree search efficiency for constraint satisfaction problems, Artificial Intelligence 8 (1980), 263–313.
Havens, W. S.: Intelligent backtracking in the Echidna constraint logic programming system, Int. J. Expert. Systems 54(4) (1992), 319–343.
Havens, W. S., Sidebottom, S., Sidebottom, G., Jones, J., and Ovans, R.: Echidna: a constraint logic programming shell, in Proc. Pacific Rim Int. Conf. Artificial Intelligence, Seoul, Korea, 1992, pp. 165–171.
Heintze, N. C., Michaylov, S., and Stuckey, P. J.: CLP(R) and some electrical engineering problems, in Proc. 4th Int. Conf. Logic Programming, MIT Press, Melbourne, 1987, pp. 657–703.
Jaffar, J. and Lassez, J.-L.: Constraint logic programming, in Proc. 14th ACM Symp. Principles of Programming Languages, Munich, 1987, pp. 111–119.
Jaffar, J. and Michaylov, S.: Methodology and implementation of a CLP system, in Proc. 4th Int. Conf. Logic Programming, Melbourne, Australia, 1987, pp. 111–119.
Lassez, C., McAloon, K., and Yap, R.: Constraint logic programming in options trading, IEEE Expert 4(2) (1987), 11–18.
Lloyd, J. W.: Foundations of logic programming, in D. W. Loveland (ed.), Symbolic Computation, Springer, New York, 1984.
Mackworth, A. K.: Consistency in networks of relations, Artificial Intelligence 8 (1977), 99–118.
Nadel, B. A. and Lin, J.: Automobile transmission design: constraint satisfaction formulation and Prolog implementation, Expert Systems: Research and Applications 6(4) (1993), 484–559.
Older, W. and Vellino, A.: Extending Prolog with constraint arithmetic on real intervals, in Proc. Canadian Conf. Computer and Electrical Engineering, Ottawa, 1990.
Sakai, K. and Aiba, A.: CAL: a theoretical background of constraint logic programming and its applications, J. Symbolic Computation 8(6) (1989), 589–603.
San Miguel Aquir, A.: How to use symmetries in Boolean constraint solving, in Proc. Eur. Conf. Artificial Intelligence, 1992.
Sidebottom, G.: A language for optimizing constraint propagation, PhD Thesis, Simon Fraser University, 1993.
Sidebottom, G. and Havens, W. S.: Hierarchical arc consistency for disjoint real intervals in constraint logic programming, Computational Intelligence 8(4) (1992), 601–623.
Simonis, H.: Test generation using the constraint logic programming language CHIP, in Proc. 6th Int. Conf. Logic Programming, Lisbon, Portugal, 1989, pp. 101–112.
Van Hentenryck, P.: Constraint Satisfaction in Logic Programming, MIT Press, Cambridge, MA, 1989.
Van Hentenryck, P. and Deville, Y.: The cardinality operator: A new logic connective for constraint logic programming, in Proc. Int. Conf. Logic Programming, MIT Press, Paris, France, 1991.
Van Hentenryck, P., Saraswat, V., and Deville, Y.: Constraint Processing in cc(FD), Technical Report, Brown University, 1991.
Van Hentenryck, P., Saraswat, V., and Deville, Y.: Design, Implementation, and Evaluation of the Constraint Language cc(FD), Technical Report, Brown University, 1993.
Warren, D. H. D.: An Abstract Prolog Instruction Set, Technical Note 309, SRI International, 1983.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Sidebottom, G., Havens, W.S. Nicolog: A simple yet powerful cc(FD) language. J Autom Reasoning 17, 371–403 (1996). https://doi.org/10.1007/BF00283135
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF00283135