Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Logic and Prolog
Spencer-Smith R., Harvester Wheatsheaf, Hertfordshire, UK, 1991. Type: Book (9780135247945)
Date Reviewed: Mar 1 1993

To fully understand the programming language Prolog, students need to know logic. Introductory logic courses, however, are either too informal or too formal, so students do not see the connection to programming without guidance. This textbook presents logic at an intermediate level of formality and relates it directly to Prolog, which the author also introduces at a level suitable for students who have never programmed before. After reading the book, they will be able to write proofs in a natural deduction system and to write elementary AI programs in Prolog. Written with a pragmatic flavor, this book covers both logic and Prolog clearly and illustrates them with interesting examples.

This text is literally two texts interleaved into one, a logic text in chapters 2 and 4 and a Prolog text in chapters 3 and 5. Chapter 1 briefly justifies the presentation of logic and Prolog together. Chapter 2 presents the syntax of predicate logic and discusses some of the mistakes frequently made when English sentences are represented by logic formulas. Chapter 3 begins the treatment of Prolog. The syntax is Edinburgh syntax, which, since it allows the body of a Prolog rule to contain conjunctions, disjunctions, and negations, is easily related to the traditional syntax of predicate logic. True, negation is negation by failure, but this is explained well. The author also covers backtracking, list structures, numerical computation, and recursion.

The remaining two chapters cover advanced topics. Chapter 4 presents the notion of proof and rules of inference. The proof system presented is a natural deduction system in traditional style, in which lines of a proof are numbered and each line consists of a formula and a justification. An unusual feature of this system is that a list of line numbers is used to keep track of active assumptions. This technique is much simpler than the devices other systems employ to avoid invalid inferences from discharged assumptions. The topics of identity, definite descriptions, modality, truth, and meaning are touched upon briefly, but the semantics of predicate logic is not covered, nor are soundness and completeness (other than definitions of the terms).

Chapter 5 covers the extra-logical features of Prolog that allow it to function effectively as a programming language. The features covered include procedures that allow the computation of sets, second-order predicates that allow terms to be interpreted as formulas and that provide for universal quantification of variables that appear only in the body of a Prolog rule, and the cut operator. These extra-logical features are then used in several examples of advanced  Prolog  programming. The examples give the book an artificial intelligence flavor, as they include a connectionist network, a theorem prover for propositional logic, an expert system, a production system, search routines for hill-climbing and bidirectional search, and a natural language parser that translates English into logic formulas.

A Prolog course based on this textbook should be more interesting to students than courses based on older textbooks. The examples are more up to date, and the exercises are often thought-provoking. Unfortunately, my copy of the book has many typographical errors. Particularly annoying are repeated lines of text. The appendix that summarizes the inference rules for the natural deduction system could have been very useful, but it appears to have been botched by the presence of tab characters in the source. I hope these errors will be corrected in future printings.

Reviewer:  D. L. Chester Review #: CR115855
Bookmark and Share
 
Logic And Constraint Programming (F.4.1 ... )
 
 
Prolog (F.4.1 ... )
 
Would you recommend this review?
yes
no
Other reviews under "Logic And Constraint Programming": Date
Negation by default and unstratifiable logic programs
Bidoit N., Froidevaux C. Theoretical Computer Science 78(1): 85-112, 1991. Type: Article
Feb 1 1992
Programming in three-valued logic
Delahaye J. (ed), Thibau V. Theoretical Computer Science 78(1): 189-216, 1991. Type: Article
Jan 1 1992
Essentials of logic programming
Hogger C., Oxford University Press, Inc., New York, NY, 1990. Type: Book (9780198538325)
Sep 1 1992
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy