- 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 232:
6.4 Constraint satisfaction problem
- Page 236:
6.5 Constrained optimisation proble
- Page 240:
6.5 Constrained optimisation proble
- Page 244:
6.6 Solving CSPs and COPs 103 devel
- Page 248:
6.6 Solving CSPs and COPs 105 Fig.
- Page 252:
6.7 From CSPs and COPs to constrain
- Page 256:
6.9 Exercises 109 indicates the tot
- Page 260:
7.2 Iterating over lists and intege
- Page 264:
7.3 Iteration specifications in gen
- Page 268:
7.3 Iteration specifications in gen
- Page 272:
7.3 Iteration specifications in gen
- Page 276:
7.3 Iteration specifications in gen
- Page 280:
7.4 Arrays and iterations 121 7.4 A
- Page 284:
do true ), X is Array[3]. Array = [
- Page 288:
7.5 fromto/4: the most general iter
- Page 292:
7.5 fromto/4: the most general iter
- Page 296: In = In Rest = Rest OutList = [3, 5
- Page 300: 7.7 Summary 131 8 7 6 5 4 3 2 1 a b
- Page 304: 8 Top-down search with passive cons
- Page 308: 8.3 Backtracking search in Prolog 1
- Page 312: 8.3 Backtracking search in Prolog 1
- Page 316: 8.4 Incomplete search 139 % choose_
- Page 320: 8.4 Incomplete search 141 % search(
- Page 324: % share_credit(Domain, N, DomCredLi
- Page 328: % share_credit(Domain, N, DomCredLi
- Page 332: 8.5 Non-logical variables 147 logic
- Page 336: 8.6 Counting the number of backtrac
- Page 340: 8.6 Counting the number of backtrac
- Page 344: 8.7 Summary 153 8.7 Summary In this
- 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