Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Introduction to logic programming
Genesereth M., Chaudhri V., Morgan & Claypool, San Rafael, CA, 2020. 199 pp. Type: Book (978-0-374279-75-2)
Date Reviewed: Dec 15 2020

Some time ago, our (then) teenage daughter used to exclaim, “Get with the ’80s!” whenever my wife and I imposed an eminently reasonable restriction. The very loose, perhaps reverse analogy here is that a computing professional has not yet “gotten with the [20]20s” in the absence of nontrivial exposure to, if not practice of, logic programming (LP). This excellent book and browser-based interactive development environment (IDE) will accommodate LP neophytes, as well as (I’m sure) broaden and deepen experts’ knowledge and skills.

One traditional, high-level partition of programing languages (and their superstructures or environments) is imperative (Fortran, C[++], Java, and so on) versus functional (ML, Haskell, OCaml, and so on). Some, like Python and F#, have features of both paradigms. The language and online development environment of this book are Epilog (a superset of Prolog) and the Sierra IDE. Somewhat similar to the imperative versus functional distinction is the authors’ characterization of Epilog as declarative/descriptive rather than imperative/prescriptive. (Please forgive my laziness in ignoring levels of abstraction with my citation of “imperative” at both levels; I’ve not yet determined how close the purported synonym “procedural” is to “imperative” at the higher level. The taxonomy tangent aside, you know what I mean!)

This long-winded build-up, for which I apologize, is to substantiate that LP is a category of its own and, furthermore, rewards the effort of maintaining an open, but definitely active, mind whilst encountering such familiar computer science (CS) terms as “safety,” “constructor,” and even “literal,” as these are used for Epilog if not for the whole of LP. This is by no means a criticism, but rather an alert that, for example, “safety” is a syntactic restriction in Epilog--as opposed to denoting (in the best case) a provable property spanning every possible execution path of a running program wherein “nothing bad happens.” Similarly, for those who have developed robust conditioned reflexes for Boolean algebra’s material implication (⇒), Epilog’s query rule, for example, as in goal(X,Y) :- p(X,Y) & ~q(Y) has :- as something like Boolean reverse implication (⇐). However, there is, if not the devil, at least a troll in the details for those of us who’ve grown conceited about being able to do Boolean logic in our sleep. These LP tools determine a thinking that is different from, but complementary to, that of conventional symbolic logic. (The LP formalization of Boolean Logic is treated in chapter 12--so we can have it both ways.)

A given dataset in Epilog lists fact(oid)s about the world under discussion, such as a configuration of blocks A, B, C, D, E (which appear in various parts of the book to illustrate features of Epilog and LP). A relation “on(b, c)” asserts that B rests on C. Along with such relations as “supported(X, Y) :- on(X, Y)” and “table(X) :- block(X) & ~supported(X),” these comprise a non-unique “conceptualization” of the blocks world. The authors make the very salient point that “there need not be any correspondence between the objects, functions, and relations in one conceptualization and [those of] another.”

Thus, let me state here that this book, for LP beginners and up, is nothing if not hands-on. But importantly, it also invokes philosophy at very high levels via a substantive--and consummately humorous--assertion of this work’s “ontological promiscuity” with respect to realism versus nominalism: “Any conceptualization of the world is accommodated, and we seek those that are useful for our purposes.” This instantiation of recondite philosophical concepts is a substantial, salutary, and unexpected side effect of the book. Section 2.8, “Reformulation” (of conceptualizations), imparts useful insight regarding, for example, such nominal objects as the “impossible staircases” of Reutersvärd/Penrose/Escher and the “ceilings and floors” construct of the Alloy bounded model checker [1]. (These are my examples, not those of the book.) I hasten to add that the book presents any ontology that is consistent with Epilog as descriptive of Epilog’s nature, and not in the service of a clever paradox.

Instructive applications throughout the book include (in addition to the blocks world and Boolean logic): kinship, map coloring, modular and Peano arithmetic, directed graphs, trees, sets, and the beginnings of natural language processing. Part 5, “Conclusions,” enumerates and describes today’s LP variants: production systems, constraint, disjunctive, existential, answer set, and inductive.

This book is very well written; typographical errors are, for the most part, easily corrected by eye. There are some places where set-theoretical intersection (the “cap”) should be union (the “cup”), but the online complement of the book can help here. Similarly, for correct but inherently complex narratives: Sierra stands available, as for the exercises.

I intend to learn much more via second and third passes through this book, and recommend it as an excellent, substantive introduction to the spirit and letter of LP.

Reviewer:  George Hacken Review #: CR147137 (2105-0097)
1) Jackson, D. Software abstractions: logic, language, and analysis. MIT Press, Cambridge, MA, 2012.
Bookmark and Share
  Featured Reviewer  
 
Logic Programming (D.1.6 )
 
Would you recommend this review?
yes
no
Other reviews under "Logic Programming": Date
Parallel logic programming
Tick E. (ed), MIT Press, Cambridge, MA, 1991. Type: Book (9780262200875)
Aug 1 1992
The standard C library
Plauger P., Prentice-Hall, Inc., Upper Saddle River, NJ, 1992. Type: Book (9780131315082)
Aug 1 1992
Logic and objects
McCabe F., Prentice-Hall, Inc., Upper Saddle River, NJ, 1992. Type: Book (9780135360798)
Nov 1 1993
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