Logic programming | p. 1 |
What is Prolog? | p. 2 |
Procedural and declarative programming | p. 2 |
Logic programming | p. 3 |
Prolog as a specification language | p. 6 |
Extended Prolog specifications | p. 6 |
Prolog as a programming language | p. 7 |
Using Prolog | p. 9 |
Prolog systems | p. 11 |
Books about Prolog | p. 13 |
Logic specifications | p. 15 |
Problem specifications | p. 15 |
Identifying variables | p. 18 |
Grouping related words | p. 19 |
Literals | p. 20 |
Simple specifications--if and and | p. 22 |
Or and not | p. 24 |
Some and all | p. 25 |
Normalization | p. 28 |
Goal clauses and proofs | p. 32 |
Structured data | p. 35 |
Structures | p. 35 |
Lists | p. 42 |
Writing specifications about lists | p. 47 |
Other data types | p. 51 |
Token syntax | p. 52 |
Prolog terms | p. 57 |
Sugared syntax | p. 59 |
Syntax of programs | p. 64 |
Arithmetic and other built-in facilities | p. 66 |
The Prolog specification language | p. 66 |
Negation as failure | p. 67 |
Equality | p. 69 |
Arithmetic | p. 70 |
Predicates that manipulate structures | p. 74 |
Sets of solutions | p. 78 |
Meta-programming | p. 85 |
Type conversion | p. 87 |
More arithmetic | p. 88 |
String manipulation | p. 90 |
Executing Prolog specifications | p. 94 |
Queries and programs | p. 94 |
Programs without variables | p. 97 |
Unification | p. 101 |
Programs with variables | p. 106 |
Generating and testing | p. 112 |
Other parts of the specification language | p. 115 |
Restrictions on built-in predicates | p. 118 |
The problem with not | p. 126 |
Using the prolog search strategy | p. 132 |
Controlling backtracking | p. 132 |
--] | p. 135 |
Cut | p. 137 |
Cut--some murky details | p. 149 |
The var/1 test | p. 151 |
Prolog and logic | p. 156 |
Procedural programming | p. 158 |
Controlling logic programs | p. 159 |
Side effects | p. 160 |
Sequence of control | p. 161 |
Some control built-in predicates | p. 170 |
Input and output | p. 172 |
Reading and writing Prolog terms | p. 172 |
Using operators for prettier input | p. 180 |
Reading and writing tokens | p. 184 |
Character input and output | p. 185 |
Handling streams | p. 195 |
Modifying the database | p. 201 |
Asserting clauses | p. 202 |
Consulting | p. 206 |
Retracting | p. 208 |
Looking at the database | p. 212 |
Clause numbers and variable names | p. 214 |
Deep waters | p. 216 |
Programming with modules | p. 218 |
Prolog and modules | p. 218 |
Overview | p. 219 |
The module rules | p. 219 |
Maintaining modules | p. 221 |
Doing it yourself | p. 221 |
Prolog environments | p. 225 |
Errors | p. 226 |
Undefined predicates | p. 228 |
Query the user | p. 229 |
Interrupts | p. 234 |
Tracing and debugging | p. 234 |
Backtrace | p. 236 |
Style checkers | p. 237 |
Some odds and ends | p. 240 |
System information | p. 240 |
Statistics | p. 244 |
Garbage collection | p. 247 |
Interpreted and compiled code | p. 251 |
First argument indexing | p. 253 |
Grammar rules | p. 256 |
Techniques | p. 266 |
Writing and documenting Prolog predicates | p. 267 |
Logic programs | p. 267 |
Side causes and effects | p. 270 |
Meta-predicates | p. 274 |
Tolerance | p. 276 |
Some extra coding standards | p. 277 |
Techniques for programming--data structures | p. 286 |
Simple objects | p. 286 |
Data structures | p. 293 |
More complicated structures | p. 304 |
Global data | p. 310 |
Representing facts | p. 315 |
Techniques for programming--program structure | p. 327 |
Principles | p. 327 |
Deterministic code--composition of functions | p. 330 |
Deterministic code--recursive definitions | p. 339 |
Non-deterministic code--generators | p. 356 |
Non-deterministic code--clause organistation | p. 366 |
Non-deterministic code--searching | p. 372 |
Meta-interpretation techniques | p. 384 |
Debugging and testing Prolog programs | p. 404 |
The box model | p. 404 |
The box model debugger | p. 409 |
Selective debugging | p. 415 |
Control options | p. 421 |
Dynamic debugging aids | p. 427 |
Static debugging aids | p. 433 |
Testing | p. 436 |
Developing Prolog applications | p. 439 |
Logic programming revisited | p. 439 |
Top-down program development | p. 441 |
Modularity | p. 448 |
The text processor application | p. 451 |
The functional specification | p. 451 |
The prototype--inputting hypertext | p. 458 |
The prototype--printing hypertext | p. 468 |
Assessing the prototype | p. 481 |
Afterword | p. 489 |
References | p. 497 |
Suppliers of Prolog systems | p. 500 |
Answers to Exercises | p. 503 |
Predicate Definitions | p. 550 |
Index | p. 552 |
Table of Contents provided by Syndetics. All Rights Reserved. |