University of Leeds SCHOOL OF COMPUTER STUDIES RESEARCH REPORT SERIES Report 97.03 Finite Domain Solvers Compared Using Self Referential Quizzes by Antonio Fern?andez1 & Pat Hill January 1997 1Dpto . Lenguajes y Ciencias de la Computaci?on , Universidad de M?alaga , 29071 Teatinos , M?alaga , Spain Abstract Currently there appears to be no impartial set of guidelines for choosing an appropriate constraint language for solving a specific constraint satisfaction problem . A wrong choice can cause disastrous solutions , not only relative to efficient performances , but also with respect to the code clarity of the solution , which can be important for future modifications . In this paper we make a comparative study between a significant set of constraint logic programming languages in the setting of finite domains . The chosen benchmarks consist of some unusual puzzles incorporating difficult and interesting aspects of constraint solving . By providing different solver implementations over the boolean domain , we compare different constraint languages for both expressiveness and efficiency . Furthermore , to evaluate the boolean domain , an alternative more compact representation than the boolean solution is also studied . The aim is to highlight the limitations of each language and to provide some guidelines for a correct language election for a constraint satisfaction problem . 1 Introduction Constraint Logic Programming -LRB- CLP -RRB- has shown to be a very active field of research in the last years , with many real-life applications -LSB- WAL 96 -RSB- . This paradigm is more than an extension of Logic Programming -LRB- LP -RRB- ; keeping LP ` s declarativeness but adding the capacity for propagating constraints on specific domains . Among the usual constraints domains , the Finite Domain -LRB- FD -RRB- -LSB- vHE 89 -RSB- constitutes an adequate framework for solving discrete constraint satisfaction problems and perhaps , actually , inside FD , the boolean domain is one of the widely most studied , as for instance in -LSB- BAR 96 , COD 95 -RSB- , because many practical problems involve constraints in 0/1 variables -LRB- boolean variables -RRB- . In this paper we make a comparative study which is an independent and objective assessment of the relative merits of CLP over the finite domains . Constraint Logic Languages with FD solvers have been shown to be very useful for many real world discrete problems . Traditionally , these languages have provided high-level predicates -LRB- constraints -RRB- for performing specialised tasks very efficiently . In some cases , their implementation is hidden and , for this reason , such solvers are called black boxes . An alternative approach , called the glass box approach , allows the user to control the constraint solver at a more detailed level -LSB- vHE 94 -RSB- . We consider here two black box constraint languages -LRB- ECLiPSe -LSB- AGG 95 , BRI 95 -RSB- and Oz -LSB- SMO 95 -RSB- -RRB- and two glass box languages -LRB- clp -LRB- FD -RRB- -LSB- COD 96 , DIA 94 -RSB- and CHR -LSB- FRU 94 , BRI 95 -RSB- -RRB- , comparing both their expressiveness and their efficiency . We chose these particular languages since all provide support for FD and boolean constraints , were free and easy to obtain and are being very popular within the logic constraint community . In addition , ECLiPSe includes all the traditional finite domain constraints that are now becoming available in many logic programming languages . Oz is a new language combining functions with relations so has the potential for extra expressiveness in the constraint solver . clp -LRB- FD -RRB- and CHR were chosen since they illustrate two very different glass box solvers which we felt should be compared . A number of traditional benchmark programs , such as n-queens , magic square , cryptarithmetic , linear equations , the five house puzzle , the car sequencing , etc , have been studied and have solutions implemented in different languages over the FD . However , most of the comparison work has been done by the language implementers themselves . Moreover , these benchmarks have been used in the development as well as the assessment of the languages so that such tests may be biased . The main puzzle , called a Self-Referential Quiz -LRB- SRQ -RRB- , used for the comparative work here , is one of a new class of puzzles first described in -LSB- HEN 96a -RSB- where they were expressed as a satisfiability problem with a solution in Oz . These SRQs are particularly appropriate for our comparative work since they incorporate a number of aspects that challenge the expressiveness and efficiency of the constraint solvers . The particular SRQ we used has ten questions , each with a possible five options as answers but where exactly one option is true and the rest false -LRB- Figure 1 -RRB- . Most constraint problems can not be solved by constraint propagation alone and , at some 1 point in finding a solution , choice points have to be created . It is observed in -LSB- vHE 89 -RSB- that such nondeterministic constraints should be stated last so as to delay making a choice as long as possible , minimising the number of choice points . Assuming this strategy , the number of choice points created provides an idea of the constraint propagation done and , hence , of the efficiency of the solution . The SRQ used for the main comparative work has few choice points . So , to examine the effect of having a larger number of choice points , we also solved the Self-Referential Aptitude Test -LRB- SRAT -RRB- -LSB- HEN 96b -RSB- which is an SRQ but requiring more choice-points . It is well known that the choice of representation can have a dramatic effect on the efficiency of the solution of a problem . Therefore , for each puzzle , two different representations were used . The first uses the boolean domain and represents each option for each question directly as a boolean variable , requiring fifty such variables . The second requires the finite domain f1 ; 2 ; 3 ; 4 ; 5g and uses an approach similar to the usual representation for the n-queens problem . This representation requires just ten variables to represent the solution . The contributions of the paper are as follows . The main contribution is to compare the expressive power and efficiency of four popular but very different FD solvers . This can help the best choice of an appropriate language for a particular problem . The second contribution is to contrast the boolean representation with a more compact FD representation showing how the change of representation affects the results . In addition to these contributions , this study provides insights into where further research in the development of new CLP languages should be directed . The rest of the paper is organised as follows : Section 2 describes the original approach to solve the SRQ and a new approach , similar to the well-known FD solution to the n-queens . In Section 3 , by focusing on small components of the SRQ and SRAT , a study is made of the expressiveness of the different solvers . Section 4 provides the implementation results of different solvers based on the original idea shown in -LSB- HEN 96a -RSB- and on the new approach described here . A short conclusion and a discussion of future research end this paper . 1 . The first question whose answer is A is -LRB- A -RRB- 4 -LRB- B -RRB- 3 -LRB- C -RRB- 2 -LRB- D -RRB- 1 -LRB- E -RRB- none of the above 2 . The only two consecutive questions with identical answers are -LRB- A -RRB- 3 and 4 -LRB- B -RRB- 4 and 5 -LRB- C -RRB- 5 and 6 -LRB- D -RRB- 6 and 7 -LRB- E -RRB- 7 and 8 3 . The next question with answer A is -LRB- A -RRB- 4 -LRB- B -RRB- 5 -LRB- C -RRB- 6 -LRB- D -RRB- 7 -LRB- E -RRB- 8 4 . The first even numbered question with answer B is -LRB- A -RRB- 2 -LRB- B -RRB- 4 -LRB- C -RRB- 6 -LRB- D -RRB- 8 -LRB- E -RRB- 10 5 . The only odd numbered question with answer C is -LRB- A -RRB- 1 -LRB- B -RRB- 3 -LRB- C -RRB- 5 -LRB- D -RRB- 7 -LRB- E -RRB- 9 6 . A question with answer D -LRB- A -RRB- comes before this one , but not after this one -LRB- B -RRB- comes after this one , but not before this one -LRB- C -RRB- comes before and after this one -LRB- D -RRB- does not occur at all -LRB- E -RRB- none of the above 7 . The last question whose answer is E is -LRB- A -RRB- 5 -LRB- B -RRB- 6 -LRB- C -RRB- 7 -LRB- D -RRB- 8 -LRB- E -RRB- 9 8 . The number of questions whose answers are consonants is -LRB- A -RRB- 7 -LRB- B -RRB- 6 -LRB- C -RRB- 5 -LRB- D -RRB- 4 -LRB- E -RRB- 3 9 . The number of questions whose answers are vowels is -LRB- A -RRB- -LRB- B -RRB- 1 -LRB- C -RRB- 2 -LRB- D -RRB- 3 -LRB- E -RRB- 4 10 . The answer to this question is -LRB- A -RRB- A -LRB- B -RRB- B -LRB- C -RRB- C -LRB- D -RRB- D -LRB- E -RRB- E Figure 1 : The puzzle SRQ 2 A1 ? A4 ^ : A1 ^ : A2 ^ : A3 ; A6 ? BeforeD ^ : AfterD B1 ? A3 ^ : A1 ^ : A2 ; B6 ? : BeforeD ^ AfterD C1 ? A2 ^ : A1 ; C6 ? BeforeD ^ AfterD D1 ? A1 ; D6 ? P i2f1 : : :10 g Di = ; E1 ? : A1 ^ : A2 ^ : A3 ^ : A4 ; E6 ? D6 A2 ? -LRB- A3 ? A4 -RRB- ^ -LRB- B3 ? B4 -RRB- ^ -LRB- C3 ? C4 -RRB- ^ -LRB- D3 ? D4 -RRB- ^ -LRB- E3 ? E4 -RRB- ; A7 ? E5 ^ : E6 ^ : E7 ^ : E8 ^ : E9 ^ : E10 ; B2 ? -LRB- A4 ? A5 -RRB- ^ -LRB- B4 ? B5 -RRB- ^ -LRB- C4 ? C5 -RRB- ^ -LRB- D4 ? D5 -RRB- ^ -LRB- E4 ? E5 -RRB- ; B7 ? E6 ^ : E7 ^ : E8 ^ : E9 ^ : E10 ; C2 ? -LRB- A5 ? A6 -RRB- ^ -LRB- B5 ? B6 -RRB- ^ -LRB- C5 ? C6 -RRB- ^ -LRB- D5 ? D6 -RRB- ^ -LRB- E5 ? E6 -RRB- ; C7 ? E7 ^ : E8 ^ : E9 ^ : E10 ; D2 ? -LRB- A6 ? A7 -RRB- ^ -LRB- B6 ? B7 -RRB- ^ -LRB- C6 ? C7 -RRB- ^ -LRB- D6 ? D7 -RRB- ^ -LRB- E6 ? E7 -RRB- ; D7 ? E8 ^ : E9 ^ : E10 ; E2 ? -LRB- A7 ? A8 -RRB- ^ -LRB- B7 ? B8 -RRB- ^ -LRB- C7 ? C8 -RRB- ^ -LRB- D7 ? D8 -RRB- ^ -LRB- E7 ? E8 -RRB- ; E7 ? E9 ^ : E10 ; A3 ? A4 ; A8 ? P i2f1 : : :10 g Bi + Ci + Di = 7 ; B3 ? A5 ^ : A4 ; B8 ? P i2f1 : : :10 g Bi + Ci + Di = 6 ; C3 ? A6 ^ : A4 ^ : A5 ; C8 ? P i2f1 : : :10 g Bi + Ci + Di = 5 ; D3 ? A7 ^ : A4 ^ : A5 ^ : A6 ; D8 ? P i2f1 : : :10 g Bi + Ci + Di = 4 ; E3 ? A8 ^ : A4 ^ : A5 ^ : A6 ^ : A7 ; E8 ? P i2f1 : : :10 g Bi + Ci + Di = 3 ; A4 ? B2 ; A9 ? P i2f1 : : :10 g Ai + Ei = ; B4 ? B4 ^ : B2 ; B9 ? P i2f1 : : :10 g Ai + Ei = 1 ; C4 ? B6 ^ : B2 ^ : B4 ; C9 ? P i2f1 : : :10 g Ai + Ei = 2 ; D4 ? B8 ^ : B2 ^ : B4 ^ : B6 ; D9 ? P i2f1 : : :10 g Ai + Ei = 3 ; E4 ? B10 ^ : B2 ^ : B4 ^ : B6 ^ : B8 ; E9 ? P i2f1 : : :10 g Ai + Ei = 4 ; A5 ? C1 ^ : C3 ^ : C5 ^ : C7 ^ : C9 ; B5 ? : C1 ^ C3 ^ : C5 ^ : C7 ^ : C9 ; C5 ? : C1 ^ : C3 ^ C5 ^ : C7 ^ : C9 ; D5 ? : C1 ^ : C3 ^ : C5 ^ C7 ^ : C9 ; E5 ? : C1 ^ : C3 ^ : C5 ^ : C7 ^ C9 ; Figure 2 : SRQ as a Satisfiability Problem using 50 variables 2 Self referential puzzles : description 2.1 The original idea The ` Self-Referential Aptitude Test ' -LRB- SRAT -RRB- was described in -LSB- HEN 96a -RSB- . The SRAT contains 20 quiz questions with 5 alternatives each , almost all of them which refer to the quiz itself . The problem consists in finding a correct solution for each question . The constraints in SRAT are so strong that they lead to a unique solution almost deterministically -LRB- a single choice-point was enough -RRB- . For that reason , the ` Self-Referential Quiz ' -LRB- SRQ -RRB- shown in Figure 1 was devised -LSB- HEN 96a -RSB- . As it contains only ten questions , the search for a solution requires more choice-points . Figure 2 shows the formulation of the SRQ as satisfiability problem . Each question has five option , and each of these options is expressed as a logical formula using the connectives : conjunction , disjunction , negation and equivalence . There are 50 boolean variables lij -LRB- i 2 f1 . . . 10g and j 2 fA ; B ; C ; D ; Eg -RRB- where lij has the value true if the answer to question i is j and false otherwise . Thus we call this formulation the 50 variables solution . Note than in Figure 2 only 9 of the questions have a formulation . Question 10 is redundant and does not contribute to the solution . The additional variable BeforeD is defined to have the truth value of D1 _ D2 _ D3 _ D4 _ D5 , and AfterD is defined to have the truth value of D7 _ D8 _ D9 _ D10 . Only one alternative may be true for each question . Thus , in addition to the rules in Figure 2 , we also have the constraints Aj + Bj + Cj + Dj + Ej = 1 -LRB- j 2 f1 : : : 10g -RRB- -LRB- 1 -RRB- 3 The problem consists in finding an assignment of the variables Ai ; Bi ; Ci ; Di and Ei -LRB- i 2 f1 : : : 10g -RRB- to truth values such that formula -LRB- 1 -RRB- and all the formulas in Figure 2 hold . This formulation was translated to an Oz program -LRB- using 50 boolean variables -RRB- in -LSB- HEN 96a -RSB- . In Figure 4 the table to the left shows the solution to SRQ by this approach . Each column corresponds to an option in the puzzle and each row to a question . Cells contain the truth value of each option for the question of its row in the puzzle . -LRB- Q1 = 1 -RRB- ? -LRB- Q4 = 1 -RRB- ^ V i2f1 ; 2 ; 3g -LRB- Qi < > 1 -RRB- ; -LRB- Q6 = 1 -RRB- ? BeforeQ4 ^ : AfterQ4 ; -LRB- Q1 = 2 -RRB- ? -LRB- Q3 = 1 -RRB- ^ V i2f1 ; 2g -LRB- Qi < > 1 -RRB- ; -LRB- Q6 = 2 -RRB- ? : BeforeQ4 ^ AfterQ4 ; -LRB- Q1 = 3 -RRB- ? -LRB- Q2 = 1 -RRB- ^ -LRB- Q1 < > 1 -RRB- ; -LRB- Q6 = 3 -RRB- ? BeforeQ4 ^ AfterQ4 ; -LRB- Q1 = 4 -RRB- ? -LRB- Q1 = 1 -RRB- ; -LRB- ? -RRB- -LRB- Q6 = 4 -RRB- ? V i2f1 : : :10 g -LRB- Qi < > 4 -RRB- ; -LRB- Q1 = 5 -RRB- ? V i2f1 ; 2 ; 3 ; 4g -LRB- Qi < > 1 -RRB- ; -LRB- Q6 = 5 -RRB- ? -LRB- Q6 = 4 -RRB- ; -LRB- ? -RRB- -LRB- Q2 = 1 -RRB- ? -LRB- Q3 = Q4 -RRB- ; -LRB- Q7 = 1 -RRB- ? -LRB- Q5 = 5 -RRB- ^ V i2f6 : : :10 g -LRB- Qi < > 5 -RRB- ; -LRB- Q2 = 2 -RRB- ? -LRB- Q4 = Q5 -RRB- ; -LRB- Q7 = 2 -RRB- ? -LRB- Q6 = 5 -RRB- ^ V i2f7 : : :10 g -LRB- Qi < > 5 -RRB- ; -LRB- Q2 = 3 -RRB- ? -LRB- Q5 = Q6 -RRB- ; -LRB- Q7 = 3 -RRB- ? -LRB- Q7 = 5 -RRB- ^ V i2f8 : : :10 g -LRB- Qi < > 5 -RRB- ; -LRB- ? -RRB- -LRB- Q2 = 4 -RRB- ? -LRB- Q6 = Q7 -RRB- ; -LRB- Q7 = 4 -RRB- ? -LRB- Q8 = 5 -RRB- ^ V i2f9 : : :10 g -LRB- Qi < > 5 -RRB- ; -LRB- Q2 = 5 -RRB- ? -LRB- Q7 = Q8 -RRB- ; -LRB- Q7 = 5 -RRB- ? -LRB- Q9 = 5 -RRB- ^ -LRB- Q10 < > 5 -RRB- ; -LRB- Q3 = 1 -RRB- ? -LRB- Q4 = 1 -RRB- ; -LRB- Q8 = 1 -RRB- ? P i2f1 : : :10 g BCDi = 7 ; -LRB- Q3 = 2 -RRB- ? -LRB- Q5 = 1 -RRB- ^ -LRB- Q4 < > 1 -RRB- ; -LRB- Q8 = 2 -RRB- ? P i2f1 : : :10 g BCDi = 6 ; -LRB- Q3 = 3 -RRB- ? -LRB- Q6 = 1 -RRB- ^ V i2f4 ; 5g -LRB- Qi < > 1 -RRB- ; -LRB- Q8 = 3 -RRB- ? P i2f1 : : :10 g BCDi = 5 ; -LRB- Q3 = 4 -RRB- ? -LRB- Q7 = 1 -RRB- ^ V i2f4 ; 5 ; 6g -LRB- Qi < > 1 -RRB- ; -LRB- Q8 = 4 -RRB- ? P i2f1 : : :10 g BCDi = 4 ; -LRB- Q3 = 5 -RRB- ? -LRB- Q8 = 1 -RRB- ^ V i2f4 ; 5 ; 6 ; 7g -LRB- Qi < > 1 -RRB- ; -LRB- Q8 = 5 -RRB- ? P i2f1 : : :10 g BCDi = 3 ; -LRB- Q4 = 1 -RRB- ? -LRB- Q2 = 2 -RRB- ; -LRB- Q9 = 1 -RRB- ? P i2f1 : : :10 g AEi = ; -LRB- Q4 = 2 -RRB- ? -LRB- Q4 = 2 -RRB- ^ -LRB- Q2 < > 2 -RRB- ; -LRB- Q9 = 2 -RRB- ? P i2f1 : : :10 g AEi = 1 ; -LRB- Q4 = 3 -RRB- ? -LRB- Q6 = 2 -RRB- ^ V i2f2 ; 4g -LRB- Qi < > 2 -RRB- ; -LRB- Q9 = 3 -RRB- ? P i2f1 : : :10 g AEi = 2 ; -LRB- Q4 = 4 -RRB- ? -LRB- Q8 = 2 -RRB- ^ V i2f2 ; 4 ; 6g -LRB- Qi < > 2 -RRB- ; -LRB- Q9 = 4 -RRB- ? P i2f1 : : :10 g AEi = 3 ; -LRB- Q4 = 5 -RRB- ? -LRB- Q10 = 2 -RRB- ^ V i2f2 ; 4 ; 6 ; 8g -LRB- Qi < > 2 -RRB- ; -LRB- Q9 = 5 -RRB- ? P i2f1 : : :10 g AEi = 4 ; -LRB- Q5 = 1 -RRB- ? -LRB- Q1 = 3 -RRB- ^ V i2f3 ; 5 ; 7 ; 9g -LRB- Qi < > 3 -RRB- ; -LRB- Q5 = 2 -RRB- ? -LRB- Q3 = 3 -RRB- ^ V i2f1 ; 5 ; 7 ; 9g -LRB- Qi < > 3 -RRB- ; -LRB- Q5 = 3 -RRB- ? -LRB- Q5 = 3 -RRB- ^ V i2f1 ; 3 ; 7 ; 9g -LRB- Qi < > 3 -RRB- ; -LRB- Q5 = 4 -RRB- ? -LRB- Q7 = 3 -RRB- ^ V i2f1 ; 3 ; 5 ; 9g -LRB- Qi < > 3 -RRB- ; -LRB- Q5 = 5 -RRB- ? -LRB- Q9 = 3 -RRB- ^ V i2f1 ; 3 ; 5 ; 7g -LRB- Qi < > 3 -RRB- ; Figure 3 : SRQ as a Satisfiability Problem using 10 variables 2.2 An alternative approach The clausal formulation in Figure 2 has 50 boolean variables : one for each answer option for each question . A more compact representation would have a single variable for each question and assign the code for the correct answer for that question to the variable -LRB- in the style of the usual representation for the n-queens problem -RRB- . For that reason , a formulation for SRQ involving only 10 FD variables , which we call the 10 variables solution and shown in Figure 3 , is studied here . There is exactly one variable for each question : each variable is element of the domain 1 . .5 where each domain value corresponds to an option in each question . A FD variable Qi -LRB- i 2 f1 : : : 10g -RRB- states that the answer to the question i is the option j , for j 2 fA ; B ; C ; D ; Eg , if Qi is equal to the position of j in the list -LSB- A ; B ; C ; D ; E -RSB- . For example , if Q6 is 2 , then the answer to the sixth question is B. With this formulation the problem consists 4 A B C D E Q 1 1 3 2 1 1 3 1 2 4 1 2 5 1 1 6 1 2 7 1 5 8 1 2 9 1 5 10 1 4 Figure 4 : Solutions to SRQ using 50 and 10 variables in finding a value for each of the Qi in the domain 1 . .5 such that all formulas in Figure 3 hold . The additional variable BCDi -LRB- in the formula for question 8 -RRB- is 1 if Qi 2 f2 ; 3 ; 4g and otherwise and AEi -LRB- in the formula for question 9 -RRB- is 1 if Qi 2 f1 ; 5g and otherwise -LRB- i 2 f1 : : : 10g -RRB- . The variable BeforeQ4 has the truth value of W i2f1 : : :5 g -LRB- Qi = 4 -RRB- , and AfterQ4 has the truth value of W i2f7 : : :10 g -LRB- Qi = 4 -RRB- ; The table to the right in Figure 4 shows the solution by this approach . Each row corresponds to a question . Each cell contains the number associated with the correct option in the question for that row . The translation of the formulation in the Figure 3 to a constraint program creates three constraints , marked with -LRB- * -RRB- , which constraint a FD variable to have more than one value at the same time . These constraints are obviously inconsistent . Thus the solver is able to prune the search space before any choices are made , removing inconsistent values from the domain of the variables . This may expose further inconsistent values for other variables . The process therefore iterates until all such inconsistencies are removed . This a-priori pruning in the search , which is a well-known procedure in CLP , reduces the number of choice points used in finding a solution and hence improves the constraint propagation . The 10 variables solution uses a form of meta-constraints , that is , constraints over constraints . This means that the constraint logical connectives are applied on constraint expressions where a constraint expression is either an arithmetic constraint -LRB- in the way of Qi = n -RRB- or a combination of constraint expressions using the logical FD connectives . This is a powerful constraint form to use in the solving of real-life problems . 3 Comparing the expressiveness of the solvers Comparisons between different programming languages often just consider the efficiency . However , in this section we contrast the expressiveness of the four chosen languages : clp -LRB- FD -RRB- , ECLiPSe , Oz and CHR by implementing the 50 and 10 variables solutions to the SRQ in each of these languages . In Subsection 3.1 the clp -LRB- FD -RRB- , ECLiPSe and Oz solvers are described . The CHR solvers are considered separately in Subsection 3.3 since the CHR language is so flexible that CHR solutions can be written in each of the styles of the other languages . In particular , solvers to the puzzle have been written in CHR using the clp -LRB- FD -RRB- , ECLiPSe and Oz solvers as models . For the same reason , in Subsection 3.2 we compare only the clp -LRB- FD -RRB- , ECLiPSe and Oz languages . 3.1 Describing the solvers Oz The Oz solutions are closest to the SRQ formulations shown in Figures 2 and 3 . The 50 - variables solver uses a reified constraint form to express the clauses of Figure 2 . Constraints in reified form means that their fulfilment is reflected back into a FD variable . For example , X = -LRB- Y + Z > : V -RRB- constrains X to 1 as soon as the inequation is known to be true and to 5 as soon as the inequation is known to be false . On the other hand , constraining X to 1 imposes the inequation , and constraining X to imposes its negation . For instance , the clausal formula relative to the variable A6 in Figure 2 is written as follows BeforeD = D :1 + D :2 + D :3 + D :4 + D :5 AfterD = D :7 + D :8 + D :9 + D :10 A :6 = BeforeD ? ~ AfterD -LRB- 2 -RRB- The arithmetic Oz propagators ? ; + and ~ were redefined as the boolean propagators conjunction , disjunction and negation . The 10-variables solver uses meta-constraints combined with reified constraints . For instance , the first logical formula relative to the variable Q6 in Figure 3 is expressed in the following way BeforeQ4 = -LRB- -LRB- Q1 = : 4 -RRB- + -LRB- Q2 = : 4 -RRB- + -LRB- Q3 = : 4 -RRB- + -LRB- Q4 = : 4 -RRB- + -LRB- Q5 = : 4 -RRB- -RRB- AfterQ4 = -LRB- -LRB- Q7 = : 4 -RRB- + -LRB- Q8 = : 4 -RRB- + -LRB- Q9 = : 4 -RRB- + -LRB- Q10 = : 4 -RRB- -RRB- -LRB- Q6 = : 1 -RRB- = -LRB- BeforeQ4 ? ~ AfterQ4 -RRB- -LRB- 3 -RRB- Note that = : is the equivalence propagator . ECLiPSe . The main difference between the ECLiPSe and Oz solvers is that ECLiPSe does not admit a reified constraint form . For that reason , solvers with both 50 and 10 variables were written using meta-constraints . For instance , the 50-variables solver codes the formula relative to the variable A6 in Figure 2 as follows -LRB- BeforeD # = 1 -RRB- # , -LRB- D1 # = 1 -RRB- # n = -LRB- D2 # = 1 -RRB- # n = -LRB- D3 # = 1 -RRB- # n = -LRB- D4 # = 1 -RRB- # n = -LRB- D5 # = 1 -RRB- ; -LRB- AfterD # = 1 -RRB- # , -LRB- D7 # = 1 -RRB- # n = -LRB- D8 # = 1 -RRB- # n = -LRB- D9 # = 1 -RRB- # n = -LRB- D10 # = 1 -RRB- , -LRB- A6 # = 1 -RRB- # , -LRB- BeforeD # = 1 -RRB- # = n -LRB- AfterD # = 0 -RRB- # = n and # n = are conjunction and disjunction propagators respectively , and # , is the equivalence propagator between constraint expressions whereas # = is the arithmetic equivalence propagator between rational terms2 . In a similar way , the 10-variables solver writes the formula relative to the variable Q6 in Figure 3 as follows -LRB- BeforeQ4 # = 1 -RRB- # , -LRB- Q1 # = 4 -RRB- # n = -LRB- Q2 # = 4 -RRB- # n = -LRB- Q3 # = 4 -RRB- # n = -LRB- Q4 # = 4 -RRB- # n = -LRB- Q5 # = 4 -RRB- ; -LRB- AfterQ4 # = 1 -RRB- # , -LRB- Q7 # = 4 -RRB- # n = -LRB- Q8 # = 4 -RRB- # n = -LRB- Q9 # = 4 -RRB- # n = -LRB- Q10 # = 4 -RRB- ; -LRB- Q6 # = 1 -RRB- # , -LRB- BeforeQ4 # = 1 -RRB- # = n -LRB- AfterQ4 # = 0 -RRB- -LRB- 4 -RRB- clp -LRB- FD -RRB- . The 50-variables solution shows little resemblance to the clausal formulation of SRQ in Figure 2 because the code is closer to traditional Prolog style . For instance , the logical formula relative to the variable A6 in Figure 2 is written as follows : or -LRB- D1 , D2 , DD12 -RRB- , or -LRB- D3 , D4 , DD34 -RRB- , or -LRB- DD12 , DD34 , DD1234 -RRB- , or -LRB- DD1234 , D5 , BeforeD -RRB- , or -LRB- D7 , D8 , DD78 -RRB- , or -LRB- D9 , D10 , DD910 -RRB- , or -LRB- DD78 , DD910 , AfterD -RRB- , not -LRB- AfterD , AfterDn -RRB- , and -LRB- BeforeD , AfterDn , A6 -RRB- -LRB- 5 -RRB- which is far from the clarity of the Oz solution . The predicates or = 3 ; and = 3 and not = 2 are disjunction , conjunction and negation propagators respectively . Implementing a 10-variables solution in clp -LRB- FD -RRB- highlights certain problem with the lack of expressiveness . This limitation appears when we try to express meta-constraints . For example 2A rational term is a term constructed from integers and integer domain variables using the arithmetic operations + ; ? ; ? and = . 6 the following constraint expresses that the variable BeforeQ4 in Figure 3 has the truth value of W i2f1 : : :5 g -LRB- Qi = 4 -RRB- -LRB- BeforeQ4 = 1 -RRB- , -LRB- Q1 = 4 -RRB- _ -LRB- Q2 = 4 -RRB- _ -LRB- Q3 = 4 -RRB- _ -LRB- Q4 = 4 -RRB- _ -LRB- Q5 = 4 -RRB- -LRB- 6 -RRB- Note that the problem consists of detecting when a constraint -LRB- BeforeQ4 = 1 -RRB- is now true -LRB- ie . it is said that it is entailed by the current store -RRB- . In pure CLP this problem does not arise since the only operation available on a constraint is an addition -LRB- tell -RRB- to the current store and there is no meta-operation on constraints , ie . constraints on constraints like -LRB- BeforeQ4 = 1 -RRB- -RRB- -LRB- Q1 = 4 -RRB- . However , for real applications it is very important to be able to reason on the result of a constraint in the store -LRB- e.g if BeforeQ4 = 1 then I want to tell Q1 = 4 -RRB- . The main problem is to detect when -LRB- ie . as soon as -RRB- the constraint is entailed . In -LSB- CAR 94 -RSB- is shown how to express directly that kind of constraints in the FD with X in r constraint by the entailment of FD constraints , but this is not implemented . However , this can be done in clp -LRB- FD -RRB- by means of user functions written in C . These functions accept ranges or terms as argument . For instance for writing the constraint -LRB- 6 -RRB- we use calls to the predicate x = a , b0 = 3 . The semantics of a call x = a , b0 -LRB- X ; A ; B -RRB- is : X = A iff B is true -LRB- i.e. B = 1 -RRB- . This predicate is defined in the same way as in the magic square 's solution given in -LSB- COD 96 -RSB- : x = a , b0 -LRB- X ; A ; B -RRB- : ? B in X To B0 -LRB- dom -LRB- X -RRB- ; A -RRB- ; X in B To X0 -LRB- val -LRB- B -RRB- ; A -RRB- : where X To B03 and B To X04 are user functions coded in C. Then , the constraint -LRB- 6 -RRB- is expressed as follows : x = a , b0 -LRB- BeforeQ4 ; 1 ; B1 -RRB- ; x = a , b0 -LRB- Q1 ; 4 ; B2 -RRB- ; x = a , b0 -LRB- Q2 ; 4 ; B3 -RRB- ; x = a , b0 -LRB- Q3 ; 4 ; B4 -RRB- ; x = a , b0 -LRB- Q4 ; 4 ; B5 -RRB- ; x = a , b0 -LRB- Q5 ; 4 ; B6 -RRB- ; or -LRB- B2 ; B3 ; B23 -RRB- ; or -LRB- B4 ; B5 ; B45 -RRB- ; or -LRB- B23 ; B45 ; B2345 -RRB- ; or -LRB- B2345 ; B6 ; B1 -RRB- The inclusion of C code means that the program is not fully declarative . Moreover , just for this one constraint , nine additional boolean variables -LRB- B1 , B2 , B3 , B4 , B5 , B6 , B23 , B45 , B2345 -RRB- are necessary , complicating the code . These extra variables are required for the writing of one constraint for question 6 in Figure 3 . Since the SRQ puzzle contains 50 options , expressed in a similar syntax to the constraint -LRB- 6 -RRB- , the total number of extra FD variables needed for the solution is quite high . In larger puzzles the number of variables might be unmanageable . Because of this limitation , we did not implement a 10-variables solver in clp -LRB- FD -RRB- . Another possible solution to the limitations of clp -LRB- FD -RRB- could be found in the CCP -LRB- Concurrent Constraint Programming -RRB- framework -LSB- SAR 93 -RSB- . This allows for a new operation called Ask and that is really an if-then where the test is a constraint to be checked and the then part is any predicate -LRB- including the tell of a constraint -RRB- . This solution could then be used to express constraints such as -LRB- BeforeQ4 = 1 -RRB- -RRB- -LRB- Q1 = 4 -RRB- -LSB- DIA 96 -RSB- . 3.2 The solvers compared We discuss the main differences between the codes for the 50 and 10 variables solutions described in preceding section . The expressiveness is analysed relative to the similarity of the code of each solver to the SRQ clausal formulations shown in Figures 2 and 3 . The conclusions are the following 3This function returns 1 if X = A , O if X < > A and : :1 otherwise . 4This function is triggered as soon as B is instantiated and yields A if B = 1 or else the range : :1 nA . 7 Oz . This has the highest expressiveness because it ffl Uses a reified constraint form . Thus the 50-variables solver shows a close resemblance to the SRQ formulation in Figure 2 . ffl Admits infix5 propagators with concatenation6 . ffl Propagators can operate directly over boolean variables as in -LRB- 2 -RRB- or over constraint expressions as in -LRB- 3 -RRB- . ECLiPSe . This also has a high expressiveness . The propagators can be written in an infix form and concatenated as in Oz . But there are two differences with Oz . First , some propagators are limited to operate on constraint expressions over FD variables and not directly over these . For instance , to express that the negation of a boolean variable X must be true , it is not possible to write simply ~ X -LRB- as Oz does -RRB- , but -LRB- X # = 0 -RRB- or -LRB- Xn # = 1 -RRB- . Secondly , the code required some additional variables to write the boolean domain solution -LRB- these are required for the summation of boolean variables -RRB- . clp -LRB- FD -RRB- . The 50-variables solution shows little resemblance to the clausal formulation of the SRQ shown in Figure 2 . The reasons are the following : ffl The code includes a large number of extra FD variables . For instance , in the writing of -LRB- 5 -RRB- there are six intermediate boolean variables -LRB- five due to the disjunction propagator -LCB- DD12 , DD34 , DD1234 , DD78 , DD910 -LCB- and one due to the negation propagator -LCB- AfterDn -RRB- . The number of additional variables for the clp -LRB- FD -RRB- solver increases with the number of questions in the puzzle causing a similar increase in the size of the solver code . ffl Most of the constraint propagators have a relational prefix form7 close to the writing style of traditional Prolog . For that reason , it is not possible to employ the concatenation shown in ECLiPSe and Oz which clarifies the code and would save the addition of extra variables . ffl Some constraints can not be expressed in a direct way using built-in predicates . This is shown in the writing of the constraint associated to the variable D6 in Figure 2 . When we tried to express D6 = P i2f1 : : :10 g Di = 0 , the same problem mentioned in Subsection 3.1 was found . This constraint is expressed in form of meta-constraints -LRB- P i2f1 : : :10 g Di = 0 -RRB- , -LRB- D6 = 1 -RRB- . To solve this , it was necessary to use the predicate x = a , b0 = 3 -LRB- see Subsection 3.1 -RRB- as follows : SmD = D1 + D2 + D3 + D4 + D5 + D6 + D7 + D8 + D9 + D10 , x = a , b0 -LRB- SmD ; ; D6 -RRB- ; + is the summation propagator for FD variables . Questions 8 and 9 were written analogously . Note that it is not possible use the built-in equivalence propagator equiv/3 -LSB- DIA 94 -RSB- over the variable SmD because its domain is the range 0 . .10 -LRB- and equiv = 3 operates only in the boolean domain -RRB- . 3.3 CHR : a special mention Expressively speaking , CHR deserves a special consideration due to its flexibility for writing solvers . Its particular glass-box approach allows one to express the same solvers in different styles . To demonstrate this flexibility , the clp -LRB- FD -RRB- solution was used as a model for a CHR solver involving 5To the style of argi R argj , where R is a constraint propagator , and argi and argj its arguments . 6In the way as follows : arg0 R1 arg1 R2 : : : Rn ? 1 argn ? 1 Rn argn ; where Ri is propagator -LRB- i 2 f1 : : : ng -RRB- . 7In the way of R -LRB- X , Y , Result -RRB- , where R is a constraint propagator and X , Y and Result are FD boolean variables . 8 50 boolean variables . The different clp -LRB- FD -RRB- boolean propagators were simulated by the CHR constraints . For example , the clp -LRB- FD -RRB- symbolic boolean constraint only one -LRB- + L -RRB- -LSB- DIA 94 -RSB- -LRB- used to implement the formula -LRB- 1 -RRB- -RRB- which is true if exactly one boolean variable of the list L is equal to 1 , was coded in CHR as follows : only one -LRB- L -RRB- , atleast -LRB- 1 ; L ; 1 -RRB- ; atmost -LRB- 1 ; L ; 1 -RRB- : where , defines the simplification over user-defined constraints in CHR . The call atmost -LRB- 1 , L ,1 -RRB- is true if at most one element of the list L is equal to 1 and the atleast/3 predicate was defined in a similar way . To define the FD constraints , we modified the existing Finite Domain and Boolean solvers written in CHR that are part of the CHR ECLiPSe library . It was necessary to add propagators for boolean variable summation and boolean equivalence and define the predicate only one -LRB- + L -RRB- mentioned above . Meta-constraints and reified constraints are no problem in CHR . We also implemented the CHR solver involving 10 FD variables using a style similar to the solution in Oz . Besides modifying CHR Finite Domain solver present in the CHR ECLiPSe library , we extended the existing boolean solver in the same library . We added an equivalence propagator between constraint expressions by means of the definition of a solve/2 predicate which receives in its first argument a logical restriction over variable constraints -LRB- that is a meta-constraint -RRB- or FD variables and returns in its second argument the result of it . To impose a constraint it is enough to impose a true value -LRB- i.e. 1 -RRB- in the last argument and write the constraint as the first argument . For instance , this CHR solver expresses the formula relative to the variable Q6 in Figure 3 as follows : solve -LRB- BeforeQ4 , -LRB- Q1 = 4 -RRB- + -LRB- Q2 = 4 -RRB- + -LRB- Q3 = 4 -RRB- + -LRB- Q4 = 4 -RRB- + -LRB- Q5 = 4 -RRB- ; 1 -RRB- ; solve -LRB- AfterQ4 , -LRB- Q7 = 4 -RRB- + -LRB- Q8 = 4 -RRB- + -LRB- Q9 = 4 -RRB- + -LRB- Q10 = 4 -RRB- ; 1 -RRB- ; solve -LRB- -LRB- Q6 = 1 -RRB- , -LRB- BeforeQ4 ? ~ AfterQ4 -RRB- ; 1 -RRB- ; which is similar to the Oz solver involving 10 FD variables . 4 Experimental results 4.1 Implementations over boolean domain Here we present the performances of the set of solvers for the SRQ implemented under the approach shown in Subsection 2.1 . Solutions to the SRQ puzzle have been implemented in ECLiPSe8 , CHR9 and clp -LRB- FD -RRB- 10 . We have modified the original Oz solution in its labeling strategy11 because we wanted to do the efficiency comparisons under the same conditions of labeling . Two of the most popular labeling strategies have been chosen . Every solver involves 50 boolean variables in the same way that the original solution in Oz , and Table 1 summarises the results . All the results have been calculated using the same 4/50 SPARCstation IPX -LRB- 40 MHz -RRB- . The meaning of the columns is as follows . The first column gives the name of the constraint language used in the implementation . The next column gives the labeling strategy used . The word indomain means that a consistent value to a FD variable has been assigned from the minimum of its domain -LRB- through backtracking , all possibles values can be enumerated -RRB- . The word ff indicates the use of the first fail principle heuristic . The word chr means the built-in labeling feature for constraint handling rules -LRB- CHR -RRB- has been used . The third column gives the running time to find the first -LRB- and unique -RRB- answer , measured in milliseconds . The next column shows the time to explore the whole search space . The last column gives the average speed-up in relation to the 8version ECLiPSe 3.5 . 9Available as library of ECLiPSe . See -LSB- BRI 95 -RSB- , chapter 7 . 10version clp -LRB- FD -RRB- 2.21 . 11When no more propagation was possible , the variable on which more propagators depend was chosen , and then its maximal value was tried first . In this case , the most suitable strategy was used and the general condition could propagate much better . 9 language labeling strategy time first time all speedup clp -LRB- FD -RRB- indomain 90 110 4.62 ff 80 110 5.00 ECLiPSe indomain 850 1000 # 2.04 ff 933 1083 # 2.33 CHR chr 6150 -LRB- in -RRB- # 14.78 -LRB- ff -RRB- # 15.37 Oz indomain 416 434 1.00 ff 400 416 1.00 Table 1 : Performance results of the 50-variables solvers for the SRQ language labeling strategy time first time all speedup speedup prec ECLiPSe indomain 566 900 # 1.36 1.50 ff 583 933 # 1.45 1.60 CHR chr 4400 -LRB- in -RRB- # 10.57 1.39 -LRB- ff -RRB- # 11.00 1.39 Oz indomain 318 418 1.30 1.30 ff 317 400 1.26 1.26 Table 2 : Comparable results of the 10-variables solution for the SRQ original solution in Oz . Note that the actual Oz performance results are given in the last row of the table . The symbol # indicates that the following number is the average slow-down in relation to the Oz solution . -LRB- in -RRB- and -LRB- ff -RRB- in the rows of the CHR language means the comparison is done relative to the indomain and first fail labeling strategy respectively . The results show clp -LRB- FD -RRB- solver is clearly the fastest , while Oz is more than twice as fast as ECLiPSe . The CHR solver presents the weakest results . This is to be expected since the CHR used here is implemented on the top of the ECLiPSe system . Because the slow-down for CHR is so high we only provide the result for the first solution search . 4.2 Solvers under the 10 FD variables approach Using the 10 variables formulation in Subsection 2.2 , we implemented solutions to the SRQ in ECLiPSe , CHR , and Oz12 . Note we have not implemented a clp -LRB- FD -RRB- under this approach for its limitation exposed in Section 3.1 . Table 2 shows the performance results of these solutions . The meanings for the columns are the same as in Table 1 , where again the column speedup shows the speed-up factor relative to the original solution in Oz with 50 boolean variables , and the additional column speedup prec indicates the speed-up factor with respect to the 50-variables solver implemented in the same language -LRB- results in Table 1 -RRB- . This gives an idea about the gain obtained under the 10-variables approach with respect to the 50-variables solver . So , for example , the ECLiPSe solver with 10 variables using indomain labeling improves the 50-variables ECLiPSe solution by a factor of 1.50 , and although this is still ` worse ' than the original Oz solution by a factor of 1.36 , is coming near the efficiency of the original solution in Oz -LRB- in spite of Oz is twice as fast as ECLiPSe -RRB- . At the same time , the 10 FD variables Oz solution improves the original solution with 50 - variables . Also , the new ECLiPSe solver improves by a factor of 1.60 the running time to look for the first -LRB- and single -RRB- solution relative to its 50-variables solver using the first fail heuristic as labeling strategy . Moreover , all solvers implemented under the 10-FD variables approach improve the performances of the solvers implemented in the style of the original Oz solution involving 12Version Oz 2 . 10 language labeling strategy time first time all speedup clp -LRB- FD -RRB- indomain 120 170 4.43 ff 120 180 4.59 ECLiPSe indomain 1050 2483 # 1.97 ff 1100 2533 # 1.99 CHR chr 20750 -LRB- in -RRB- # 39.00 -LRB- ff -RRB- # 37.65 Oz indomain 532 897 1.00 ff 551 902 1.00 Table 3 : Performance results of the 50-variables solvers for the small SRAT language labeling strategy time first time all speedup speedup prec ECLiPSe indomain 850 1166 # 1.59 1.23 ff 883 1183 # 1.60 1.24 CHR chr 18050 # 33.92 1.14 # 32.75 1.14 Oz indomain 366 517 1.45 1.45 ff 366 515 1.50 1.50 Table 4 : Comparable results of the 10-variables solvers for the small SRAT 50-FD boolean variables . Therefore , the efficiency of the solving has been improved . 4.3 Comparing the constraint propagation The hardness of this kind of puzzle seems to be in the number of choice-points it is necessary to do for finding a solution . For that reason , we compared again the two different approaches -LRB- 50 and 10 variables -RRB- in the solving of a small SRQ -LRB- small SRAT for short -RRB- , proposed in -LSB- HEN 96b -RSB- . For the same number of questions than SRQ , this small SRAT has a bigger number of choice-points which increases the hardness of the puzzle . Table 3 shows the results of the different solvers implemented on the boolean domain -LRB- again involving 50 boolean variables -RRB- . The meaning of the columns is the same as in the preceding tables and the results show a tendency -LRB- in the average speedup -RRB- similar to Table 1 . Note the running times have grown significantly relative to SRQ solvers times -LRB- over all the time to explore the whole search space -RRB- due to the new problem hardness . Solvers for the small SRAT under 10 FD variables approach have been implemented and the results are shown in Table 4 . Again , the 50-variables solvers efficiency is improved for every language , but now the most significant is the improvement relative to the time to explore the whole search space . So , ECLiPSe reduces this time by more than the 50 % -LRB- for example , using first fail heuristic this time changes from 2533 mseg . to 1183 mseg. , and thus with a profit speedup factor of 2.14 -RRB- , and the same occurs for the Oz solvers -LRB- with a speed-up of 1.75 -RRB- . This can be translated in a reduction of the SRAT hardness due to a reduction of the number of choice-points . To clarify this , we can compare the different Oz solvers under the two different approaches -LRB- 50 and 10 variables -RRB- giving them to a particular inference machine -LRB- which performs the search -RRB- called Explorer tool -LSB- SCH 95 -RSB- which allows to visualise the search tree and the choice nodes -LRB- circles -RRB- , failure nodes -LRB- squares -RRB- and solution nodes -LRB- diamonds -RRB- . We can show that the 10 FD variables solution improves the running time , but also reduces the choice-points number considerably . In the Figure 5 we compare the search tree of the solutions found for the small SRAT using indomain labeling for all-solution search . The left tree which constrains 55 nodes shows the original Oz solution for the small SRAT found in -LSB- HEN 96b -RSB- and the right tree with only 27 nodes shows the solution with 10 FD variables . In addition to the the improvement of the running time near a factor of 1.75 -LRB- the whole time is reduced from 897 mseg . to 517 mseg . -RRB- the number of choice-points 11 Figure 5 : The Oz Explorer on Small SRAT solving using indomain labeling for All solutions search is decreased to the 50 % . Figure 6 : The Oz Explorer on SRQ solving using first fail labeling for first solution search This is also shown in the solving of the SRQ . The left tree in Figure 6 shows the search tree of the original Oz program for first solution search in the SRQ solving using the first fail labeling strategy . It contains 27 nodes -LRB- 13 choice nodes , 13 failure ones and 1 solution one -RRB- . The right tree shows , in the same conditions , the 10-variables solution which contains 9 nodes with only 5 choice nodes . This is a significant reduction by 66 % in the number of nodes and 62 % in the number of choices nodes . The amount of constraint propagation depends on the number of choices it is necessary to do for finding a solution . Thus , this reduction means the solution involving 10 FD variables leads to have more constraint propagation . 12 5 Conclusions and further work In this paper we have provided some guidelines to make a correct election of the constraint language to use in the solving of constraint satisfaction problems . Four different languages under two different approaches -LRB- black-box , glass-box -RRB- has been compared by implementing solvers for a new puzzle that combines features of the magic square 's puzzle with the n-queens ' problem . From the efficiency point of view , clp -LRB- FD -RRB- is the best language for solving discrete problems involving boolean variables whereas , for the non-boolean finite domain , Oz gives a good performance . From the expressiveness point of view , we have shown the flexibility of CHR language for writing solvers . The limitations of the current version of clp -LRB- FD -RRB- for writing constraints involving implications of finite domain constraints has been highlighted . Thus to summarise , for maximum efficiency use clp -LRB- FD -RRB- , for maximum expressiveness use CHR , while for an equilibrium between expressiveness and efficiency , the Oz language appears best . The SRQ and the formulations shown in Figures 2 and 3 used in this study combine a number of interesting features . Furthermore , the code used for the solutions will be made available over the internet . Thus these puzzles can provide a useful benchmark for evaluating new implementations of existing languages as well as a basis for studying new language extensions . Formal studies such as that made here could also be done to compare various special characteristics of constraint languages used in real life applications such as feature constraints , coroutining , delayed constraints , multiple head atoms , pseudo-boolean constraints , linear constraints and cumulative constraints . It is clear that a language with the expressiveness of CHR but with an efficiency comparable with clp -LRB- FD -RRB- is desirable . Thus future research could consider how these glass-box approaches to constraints could be merged . Another line of research could be to find a way of extending the clp -LRB- FD -RRB- constraints with one or more meta-constraints that deal with problems such as the interaction between the boolean and non-boolean constraints . Alternatively , designing an efficient implementation of a CHR solver would make the CHR approach more competitive . Acknowledgments We gratefully acknowledge Daniel Diaz and Gyuri Lajos for their help . References -LSB- AGG 95 -RSB- AGGOUN A. , CHAN D. , DUFRESNE P. , FALVEY E. , GRANT H. , HEROLD A. , MACARTNEY G. , MEIER M. , MILLER D. , MUDAMBI S. , PEREZ B. , Van ROSSUM E. , SCHIMPF J. , PERIKLIS , TSAHAGEAS A. and de VILLENEUVE D.H. , ECLiPSe 3.5 , User Manual , European Computer-Industry Research Centre -LRB- ECRC -RRB- , Munich , December 1995 . -LSB- BAR 96 -RSB- BARTH P. , and BOCKMAYR A. , Modelling 0-1 Problems in CLP -LRB- PB -RRB- . In Proceedings of the Second International Conference on the Practical Application of Constraint Technology , London , UK , 1996 . -LSB- BRI 95 -RSB- BRISSET P. , FR?UHWIRTH T. , LIM P. , MEIER M. , LE PROVOST T. , SCHIMPF J. and WALLACE M. , ECLiPSe 3.5 Extensions User Manual , ECRC Munich Germany , December 1995 . -LSB- CAR 94 -RSB- CARLSON B. , CARLSSON M. and DIAZ D. , Entailment of Finite Domain Constraints , In Proceedings of the 11th International Conference on Logic Programming , Santa Margherita , Italy , MIT Press , 1994 . -LSB- COD 95 -RSB- CODOGNET P. and DIAZ D. , clp -LRB- B -RRB- : Combining Simplicity and Efficiency in Boolean Constraint Solving , Technical report , INRIA-Rocquencourt , 1995 . -LSB- COD 96 -RSB- CODOGNET P. and DIAZ D. , Compiling Constraints in clp -LRB- FD -RRB- . In The Journal of Logic Programming ,27:1 -199,1996 . 13 -LSB- DIA 94 -RSB- DIAZ D. , clp -LRB- FD -RRB- 2.21 User 's Manual , 1994 . -LSB- DIA 96 -RSB- DIAZ D. Personal communication . 1996 . -LSB- FRU 94 -RSB- FR?UHWIRTH T. , Constraint handling rules . In A. Podelski , editor , Constraint Programming : Basics and Trends , pp :90 -107 , LNCS 910 , May 1994 . -LSB- HEN 96a -RSB- HENZ M. , Do n't Be Puzzled ! . In Workshop on Constraint Programming in conjunction with the Second International Conference on Principles and Practice of Constraint Programming -LRB- CP96 -RRB- , Cambridge , Massachussets -LRB- USA -RRB- . August 1996 . -LSB- HEN 96b -RSB- HENZ M. , http://ps-www.dfki.uni-sb.de/ henz/oz/puzzles / srat / . -LSB- SAR 93 -RSB- SARASWAT V.A. , Concurrent Constraint Programming , The MIT Press , 1993 . -LSB- SCH 95 -RSB- SCHULTE C. , Solver -LCB- a search debugger for Oz . In WOz ' 95 , International Workshop on Oz Programming , Institut Dalle Molle d'Intelligence Artificialle Perceptive , Martigny , Switzerland , 29 November-1 December 1995 . -LSB- SMO 95 -RSB- SMOLKA G. and TREINEN R. , editors . DFKI Oz Documentation Series , German Research Center for Artificial Intelligence -LRB- DFKI -RRB- , Stuhlsatzenhausweg 3 , D-66123 Saarbr?ucken , Germany , 1995 . -LSB- vHE 89 -RSB- Van HENTENRYCK P. , Constraint Satisfaction in Logic Programming , Logic programming Series , The MIT Press , 1989 . -LSB- vHE 94 -RSB- Van HENTENRYCK P. , SARASWAT V.A. and DEVILLE Y. Design , Implementation and Evaluation of the Constraint Language cc -LRB- FD -RRB- , In A. Podelski , editor , Constraint Programming : Basics and Trends , pp :293 -316 , LNCS 910 , May 1994 . -LSB- WAL 96 -RSB- WALLACE M. , editor , Proceedings PACT96 , Practical Application of Constraint Technology , publisher Prolog Management Group , 1996 . 14

O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O

constraint programming
constraint propagator
finite domain
labeling strategy