| Foreword |
|
xiii | |
| Preface |
|
xvii | |
| PART I The Prolog Language |
|
1 | (236) |
|
|
|
3 | (22) |
|
Defining relations by facts |
|
|
3 | (5) |
|
Defining relations by rules |
|
|
8 | (6) |
|
|
|
14 | (4) |
|
How Prolog answers questions |
|
|
18 | (5) |
|
Declarative and procedural meaning of programs |
|
|
23 | (2) |
|
Syntax and Meaning of Prolog Programs |
|
|
25 | (36) |
|
|
|
26 | (7) |
|
|
|
33 | (5) |
|
Declarative meaning of Prolog programs |
|
|
38 | (3) |
|
|
|
41 | (5) |
|
Example: monkey and banana |
|
|
46 | (4) |
|
Order of clauses and goals |
|
|
50 | (7) |
|
The relation between Prolog and logic |
|
|
57 | (4) |
|
Lists, Operators, Arithmetic |
|
|
61 | (27) |
|
|
|
61 | (3) |
|
|
|
64 | (10) |
|
|
|
74 | (6) |
|
|
|
80 | (8) |
|
Using Structures: Example Programs |
|
|
88 | (26) |
|
Retrieving structured information from a database |
|
|
88 | (4) |
|
|
|
92 | (2) |
|
Simulating a non-deterministic automation |
|
|
94 | (4) |
|
|
|
98 | (5) |
|
|
|
103 | (11) |
|
|
|
114 | (18) |
|
|
|
114 | (5) |
|
|
|
119 | (5) |
|
|
|
124 | (3) |
|
Problems with cut and negation |
|
|
127 | (5) |
|
|
|
132 | (15) |
|
|
|
132 | (3) |
|
Processing files of terms |
|
|
135 | (5) |
|
|
|
140 | (1) |
|
Constructing and decomposing atoms |
|
|
141 | (3) |
|
|
|
144 | (3) |
|
|
|
147 | (24) |
|
Testing the type of terms |
|
|
147 | (8) |
|
Constructing and decomposing terms: = .., functor, arg, name |
|
|
155 | (5) |
|
Various kinds of equality and comparison |
|
|
160 | (1) |
|
|
|
161 | (5) |
|
|
|
166 | (1) |
|
bagof, setof, and findall |
|
|
167 | (4) |
|
Programming Style and Technique |
|
|
171 | (26) |
|
General principles of good programming |
|
|
171 | (2) |
|
How to think about Prolog programs |
|
|
173 | (3) |
|
|
|
176 | (3) |
|
|
|
179 | (2) |
|
|
|
181 | (16) |
|
Operations on Data Structures |
|
|
197 | (27) |
|
|
|
197 | (5) |
|
Representing sets by binary trees |
|
|
202 | (6) |
|
Insertion and deletion in binary dictionary |
|
|
208 | (5) |
|
|
|
213 | (2) |
|
|
|
215 | (9) |
|
Advanced Tree Representations |
|
|
224 | (13) |
|
|
|
224 | (7) |
|
AVL-tree: an approximately balanced tree |
|
|
231 | (6) |
| PART II Prolog in Artificial Intelligence |
|
237 | (410) |
|
Basic Problem-Solving Strategies |
|
|
239 | (21) |
|
Introductory concepts and examples |
|
|
239 | (5) |
|
Depth-first search and iterative deepening |
|
|
244 | (6) |
|
|
|
250 | (5) |
|
Analysis of basic search techniques |
|
|
255 | (5) |
|
Best-First Heuristic Search |
|
|
260 | (32) |
|
|
|
260 | (10) |
|
Best-first search applied to the eight puzzle |
|
|
270 | (4) |
|
Best-first search applied to scheduling |
|
|
274 | (6) |
|
Space-saving techniques for best-first search |
|
|
280 | (12) |
|
Problem Decomposition and AND/OR Graphs |
|
|
292 | (27) |
|
AND/OR graph representation of problems |
|
|
292 | (4) |
|
Examples of AND/OR representation |
|
|
296 | (4) |
|
Basic AND/OR search procedures |
|
|
300 | (5) |
|
|
|
305 | (14) |
|
Constraint Logic Programming |
|
|
319 | (28) |
|
Constraint satisfaction and logic programming |
|
|
319 | (5) |
|
CLP over real numbers: CLP(R) |
|
|
324 | (5) |
|
|
|
329 | (7) |
|
A simulation program with constraints |
|
|
336 | (5) |
|
CLP over finite domains: CLP(FD) |
|
|
341 | (6) |
|
Knowledge Representation and Expert Systems |
|
|
347 | (36) |
|
Functions and structure on an expert system |
|
|
347 | (2) |
|
Representing knowledge with it-then rules |
|
|
349 | (3) |
|
Forward and backward chaining in rule-based systems |
|
|
352 | (6) |
|
|
|
358 | (2) |
|
|
|
360 | (3) |
|
|
|
363 | (9) |
|
Semantic networks and frames |
|
|
372 | (11) |
|
|
|
383 | (30) |
|
Knowledge representation format |
|
|
383 | (5) |
|
Designing the inference engine |
|
|
388 | (4) |
|
|
|
392 | (18) |
|
|
|
410 | (3) |
|
|
|
413 | (29) |
|
|
|
413 | (5) |
|
Deriving plans by means-ends analysis |
|
|
418 | (4) |
|
|
|
422 | (2) |
|
Procedural aspects and breadth-first regime |
|
|
424 | (3) |
|
|
|
427 | (3) |
|
Combining means-ends planning with best-first heuristic |
|
|
430 | (4) |
|
Uninstantiated actions and partial-order planning |
|
|
434 | (8) |
|
|
|
442 | (42) |
|
|
|
442 | (1) |
|
The Problem of learning concepts from examples |
|
|
443 | (5) |
|
Learning relational descriptions: a detailed examples |
|
|
448 | (6) |
|
Learning simple if-then rules |
|
|
454 | (8) |
|
Induction of decision trees |
|
|
462 | (7) |
|
Learning from noisy data and tree pruning |
|
|
469 | (7) |
|
|
|
476 | (8) |
|
Inductive Logic Programming |
|
|
484 | (36) |
|
|
|
484 | (3) |
|
Constructing Prolog programs from examples |
|
|
487 | (13) |
|
|
|
500 | (20) |
|
|
|
520 | (35) |
|
Common sense, qualitative reasoning and naive physics |
|
|
520 | (5) |
|
Qualitative reasoning about static systems |
|
|
525 | (4) |
|
Qualitative reasoning about dynamic systems |
|
|
529 | (7) |
|
A qualitative simulation program |
|
|
536 | (11) |
|
Discussion of the qualitative simulation program |
|
|
547 | (8) |
|
Languages Processing with Grammar Rules |
|
|
555 | (26) |
|
|
|
555 | (8) |
|
|
|
563 | (5) |
|
Defining the meaning of natural language |
|
|
568 | (13) |
|
|
|
581 | (31) |
|
Two-person, perfect-information games |
|
|
581 | (2) |
|
|
|
583 | (3) |
|
The alpha-beta algorithm; an efficient implementation of minimax |
|
|
586 | (4) |
|
Minimax-based programs: refinements and limitations |
|
|
590 | (2) |
|
Pattern knowledge and the mechanism of `advice' |
|
|
592 | (4) |
|
A chess endgame program in Advice Language 0 |
|
|
596 | (16) |
|
|
|
612 | (35) |
|
Meta-programs and meta-interpreters |
|
|
612 | (1) |
|
|
|
613 | (5) |
|
Explanation-based generalization |
|
|
618 | (6) |
|
Object-oriented programming |
|
|
624 | (7) |
|
Pattern-directed programming |
|
|
631 | (7) |
|
A simple theorem prove as a pattern-directed program |
|
|
638 | (9) |
| Appendix A: Some Differences Between Prolog Implementations |
|
647 | (2) |
| Appendix B: Some Frequently Used Predicates |
|
649 | (3) |
| Solutions to Selected Exercises |
|
652 | (19) |
| Index |
|
671 | |