- Page 2: This page intentionally left blank
- Page 6: Advance praise for Constraint Logic
- Page 10: CAMBRIDGE UNIVERSITY PRESS Cambridg
- Page 14: vi Contents 3.5 Operators 52 3.6 Su
- Page 18: viii Contents 12.3 The coins proble
- Page 22: x Introduction ming language for na
- Page 26: xii Introduction In 1991 the three
- Page 30: xiv Introduction This is achieved t
- Page 40: Part I Logic programming paradigm
- Page 46: 4 Logic programming and pure Prolog
- Page 50: 6 Logic programming and pure Prolog
- Page 54: 8 Logic programming and pure Prolog
- Page 58: 10 Logic programming and pure Prolo
- Page 62: 12 Logic programming and pure Prolo
- Page 66: 14 Logic programming and pure Prolo
- Page 70: 16 Logic programming and pure Prolo
- Page 74: 18 Logic programming and pure Prolo
- Page 78: 20 Logic programming and pure Prolo
- Page 82: 22 Logic programming and pure Prolo
- Page 86:
24 Logic programming and pure Prolo
- Page 90:
26 Logic programming and pure Prolo
- Page 94:
28 Logic programming and pure Prolo
- Page 98:
30 A reconstruction of pure Prolog
- Page 102:
32 A reconstruction of pure Prolog
- Page 106:
34 A reconstruction of pure Prolog
- Page 110:
36 A reconstruction of pure Prolog
- Page 114:
38 A reconstruction of pure Prolog
- Page 120:
3 Arithmetic in Prolog 3.1 Introduc
- Page 124:
3.2 Arithmetic expressions and thei
- Page 128:
3.2 Arithmetic expressions and thei
- Page 132:
3.3 Arithmetic comparison predicate
- Page 136:
[eclipse 19]: ordered([1,X,3]). ins
- Page 140:
instantiation fault in 3 > X Abort
- Page 144:
3.5.2 Binary operators: binding ord
- Page 148:
3.6 Summary 55 ECL i PS e will succ
- Page 152:
3.7 Exercises 57 3.7 Exercises Exer
- Page 156:
4 Control and meta-programming 4.1
- Page 160:
4.1 More on Prolog syntax 61 of the
- Page 164:
4.2 Control 63 % ordered(Xs) :- Xs
- Page 168:
4.2 Control 65 Once Next, Prolog pr
- Page 172:
4.2 Control 67 Now the execution of
- Page 176:
4.3 Meta-programming 69 On the othe
- Page 180:
4.3 Meta-programming 71 % solve(X)
- Page 184:
4.3 Meta-programming 73 Xs = [mon]
- Page 188:
4.5 Exercises 75 be viewed as an at
- Page 192:
5.1 Structure inspection facilities
- Page 196:
5.2 Structure comparison facilities
- Page 200:
5.3 Structure decomposition and con
- Page 204:
5.3 Structure decomposition and con
- Page 208:
[eclipse 33]: map(increment, [1,2,3
- Page 212:
Part III Programming with passive c
- Page 218:
90 Constraint programming: a primer
- Page 222:
92 Constraint programming: a primer
- Page 226:
94 Constraint programming: a primer
- Page 230:
96 Constraint programming: a primer
- Page 234:
98 Constraint programming: a primer
- Page 238:
100 Constraint programming: a prime
- Page 242:
102 Constraint programming: a prime
- Page 246:
104 Constraint programming: a prime
- Page 250:
106 Constraint programming: a prime
- Page 254:
108 Constraint programming: a prime
- Page 258:
7 Intermezzo: Iteration in ECL i PS
- Page 262:
112 Intermezzo: Iteration in ECL i
- Page 266:
114 Intermezzo: Iteration in ECL i
- Page 270:
116 Intermezzo: Iteration in ECL i
- Page 274:
118 Intermezzo: Iteration in ECL i
- Page 278:
120 Intermezzo: Iteration in ECL i
- Page 282:
122 Intermezzo: Iteration in ECL i
- Page 286:
124 Intermezzo: Iteration in ECL i
- Page 290:
126 Intermezzo: Iteration in ECL i
- Page 294:
128 Intermezzo: Iteration in ECL i
- Page 298:
130 Intermezzo: Iteration in ECL i
- Page 302:
132 Intermezzo: Iteration in ECL i
- Page 306:
134 Top-down search with passive co
- Page 310:
136 Top-down search with passive co
- Page 314:
138 Top-down search with passive co
- Page 318:
140 Top-down search with passive co
- Page 322:
142 Top-down search with passive co
- Page 326:
144 Top-down search with passive co
- Page 330:
146 Top-down search with passive co
- Page 334:
148 Top-down search with passive co
- Page 338:
150 Top-down search with passive co
- Page 342:
152 Top-down search with passive co
- Page 346:
154 Top-down search with passive co
- Page 350:
156 The suspend library solve them
- Page 354:
158 The suspend library We start by
- Page 358:
160 The suspend library 9.4 Core co
- Page 362:
162 The suspend library [eclipse 10
- Page 366:
164 The suspend library Z = 5.5 Yes
- Page 370:
166 The suspend library Y = 4 Yes (
- Page 374:
168 The suspend library The second
- Page 378:
170 The suspend library Y = 1 Yes (
- Page 382:
172 The suspend library % ordered(X
- Page 386:
174 The suspend library As a final
- Page 390:
176 The suspend library If the neig
- Page 394:
178 The suspend library % send(List
- Page 398:
180 The suspend library The structu
- Page 402:
182 The suspend library Using the s
- Page 408:
10 Constraint propagation in ECL i
- Page 412:
10.2 The sd library 187 We see here
- Page 416:
10.3 The ic library 189 Yes (0.00s
- Page 420:
10.3 The ic library 191 The last ru
- Page 424:
10.3 The ic library 193 Delayed goa
- Page 428:
10.3 The ic library 195 V = V{10.0.
- Page 432:
10.3 The ic library 197 process is
- Page 436:
10.3.6 Direct variable domain modif
- Page 440:
10.4 Disjunctive constraints and re
- Page 444:
10.5 Summary 203 arguments of or/2
- Page 448:
11 Top-down search with active cons
- Page 452:
queens(QueenStruct, Number) :- dim(
- Page 456:
11.3 Shallow backtracking search 20
- Page 460:
11.4 Backtracking search 211 11.4 B
- Page 464:
11.4 Backtracking search 213 [eclip
- Page 468:
11.5 Variable ordering heuristics 2
- Page 472:
11.5 Variable ordering heuristics 2
- Page 476:
11.6 Value ordering heuristics 219
- Page 480:
11.7 Constructing specific search b
- Page 484:
11.8 The search/6 generic search pr
- Page 488:
11.8 The search/6 generic search pr
- Page 492:
11.9 Summary 227 credit to our earl
- Page 496:
11.10 Exercises 229 • delete/5,
- Page 500:
12.1 The minimize/2 built-in 231 de
- Page 504:
12.2 The knapsack problem 233 inclu
- Page 508:
12.4 The currency design problem 23
- Page 512:
12.4 The currency design problem 23
- Page 516:
12.4 The currency design problem 23
- Page 520:
12.5 Generating Sudoku puzzles 241
- Page 524:
12.5 Generating Sudoku puzzles 243
- Page 528:
12.5 Generating Sudoku puzzles 245
- Page 532:
12.6 The bb min/3 built-in 247 remo
- Page 536:
12.6 The bb min/3 built-in 249 bb_o
- Page 540:
12.6 The bb min/3 built-in 251 On t
- Page 544:
12.7 When the number of variables i
- Page 548:
12.9 Exercises 255 the search for a
- Page 552:
13.2 Three classes of problems 257
- Page 556:
13.2 Three classes of problems 259
- Page 560:
13.3 Constraint propagation 261 13.
- Page 564:
13.4 Splitting one domain 263 13.4
- Page 568:
13.6 The built-in search predicate
- Page 572:
13.7 Shaving 267 query is satisfied
- Page 576:
13.7 Shaving 269 an interval width
- Page 580:
13.7 Shaving 271 No (0.02s cpu) Thi
- Page 584:
13.8 Optimisation on continuous var
- Page 588:
13.9 Summary 275 Found a solution w
- Page 592:
13.10 Exercises 277 ) MinT = (1/2
- Page 596:
14.2 The eplex library 279 Operatio
- Page 600:
W+X+Y+Z $>= 10, W+X+Y $= 5, Z $=< 6
- Page 604:
14.2 The eplex library 283 eplex_so
- Page 608:
14.4 Repeated solver waking 285 X =
- Page 612:
SqrtMax is sqrt(Max), SqrtX $>= Sqr
- Page 616:
Cost = 2.23606797749979 Yes (0.03s
- Page 620:
14.5 The transportation problem 291
- Page 624:
14.5 The transportation problem 293
- Page 628:
14.6 The linear facility location p
- Page 632:
14.7 The non-linear facility locati
- Page 636:
14.7 The non-linear facility locati
- Page 640:
14.7 The non-linear facility locati
- Page 644:
14.9 Exercises 303 14.9 Exercises E
- Page 648:
Solutions to selected exercises Exe
- Page 652:
[eclipse 2]: X is 7, X is X+1. No (
- Page 656:
vars(Term, []) :- atomic(Term), !.
- Page 660:
nl_indent(N) :- nl, ( for(_I,1,N) d
- Page 664:
Solutions to selected exercises 313
- Page 668:
correct(List) :- ( foreach(El,List)
- Page 672:
Solutions to selected exercises 317
- Page 676:
Solutions to selected exercises 319
- Page 680:
Bibliographic remarks 321 the July
- Page 684:
Bibliography K. R. Apt [2003] Princ
- Page 688:
Bibliography 325 A. Mackworth [1977
- Page 692:
Index ./2, 81 //, 42 1e-n, 261 ::/2
- Page 696:
Index 329 interpretation, 90 declar