- 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 36:
To Alma, Daniel and Ruth and to Dun
- Page 44:
1 Logic programming and pure Prolog
- Page 48:
1.2 Syntax 5 • atoms, denoted by
- Page 52:
1.3 The meaning of a program 7 each
- Page 56:
1.4 Computing with equations 9 p(X)
- Page 60:
1.4 Computing with equations 11 Rea
- Page 64:
1.4 Computing with equations 13 To
- Page 68:
1.5 Prolog: the first steps 15 Acco
- Page 72:
1.5 Prolog: the first steps 17 The
- Page 76:
1.5 Prolog: the first steps 19 For
- Page 80:
1.5 Prolog: the first steps 21 For
- Page 84:
1.6 Two simple pure Prolog programs
- Page 88:
1.6 Two simple pure Prolog programs
- Page 92:
1.8 Exercises 27 Exercise 1.2 Consi
- Page 96:
2 A reconstruction of pure Prolog 2
- Page 100:
2.2 The programming language L 0 31
- Page 104:
2.3 Translating pure Prolog into L
- Page 108:
2.4 Pure Prolog and declarative pro
- Page 112:
2.6 Summary 37 Its declarative inte
- Page 116:
Part II Elements of Prolog
- Page 122:
42 Arithmetic in Prolog 3.2 Arithme
- Page 126:
44 Arithmetic in Prolog [eclipse 2]
- Page 130:
46 Arithmetic in Prolog Then p/1 ca
- Page 134:
48 Arithmetic in Prolog The compari
- Page 138:
50 Arithmetic in Prolog % qs(Xs, Ys
- Page 142:
52 Arithmetic in Prolog 3.5 Operato
- Page 146:
54 Arithmetic in Prolog 3.5.3 Binar
- Page 150:
56 Arithmetic in Prolog • the cus
- Page 154:
58 Arithmetic in Prolog min(X, Y, Z
- Page 158:
60 Control and meta-programming to
- Page 162:
62 Control and meta-programming 4.2
- Page 166:
64 Control and meta-programming Yes
- Page 170:
66 Control and meta-programming Thi
- Page 174:
68 Control and meta-programming X =
- Page 178:
70 Control and meta-programming ass
- Page 182: 72 Control and meta-programming Ys
- Page 186: 74 Control and meta-programming Ys
- Page 190: 5 Manipulating structures 5.1 Struc
- Page 194: 78 Manipulating structures [eclipse
- Page 198: 80 Manipulating structures 5.3 Stru
- Page 202: 82 Manipulating structures and t a
- Page 206: 84 Manipulating structures a non-nu
- Page 210: 86 Manipulating structures Exercise
- Page 216: 6 Constraint programming: a primer
- Page 220: 6.3 Example classes of constraints
- Page 224: • the assumed numeric constants,
- Page 228: 6.4 Constraint satisfaction problem
- 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