Constraint logic programming: Difference between revisions

Content deleted Content added
m Undid revision 398620267 by 82.124.185.151 (talk)
Yobot (talk | contribs)
m WP:CHECKWIKI error fixes + general fixes using AWB (7536)
Line 72:
 
===Finite domains===
{{see also|Constraint satisfaction problem}}
The third class of constraints used in constraint logic programming is that of finite domains. Values of variables are in this case taken from a finite ___domain, often that of [[integer number]]s. For each variable, a different ___domain can be specified: <code>X::[1..5]</code> for example means that the value of <code>X</code> is between <code>1</code> and <code>5</code>. The ___domain of a variable can also be given by enumerating all values a variable can take; therefore, the above ___domain declaration can be also written <code>X::[1,2,3,4,5]</code>. This second way of specifying a ___domain allows for domains that are not composed of integers, such as <code>X::[george,mary,john]</code>. If the ___domain of a variable is not specified, it is assumed to be the set of integers representable in the language. A group of variables can be given the same ___domain using a declaration like <code>[X,Y,Z]::[1..5]</code>.
 
Line 243:
*[[GNU Prolog]]
*[[SWI-Prolog]]
*[[Oz (programming_languageprogramming language)| Distributed Oz Mozart]]
 
{{DEFAULTSORT:Constraint Logic Programming}}
[[Category:Logic programming]]
[[Category:Constraint satisfaction]]