Search

Filter

  • Advanced Filters:

  • to
  • Specific Data Sources:

    All Edit

    Select All  |  Select None

Reset filters

The Implementation of Prolog By Patrice Boizumault Translated from the original French by Ara M. Djamboulian and Jamal Fattouh Princeton, New Jersey: Princeton University Press, 1993. 299 pps Reviewed by: Nancy Lynn Tinkham Computer Science Department Rowan College of New Jersey Glassboro, NJ 08028 nlt@rowan.edu As a programming language, Prolog was designed to reflect conceptual problem-solving methods rather than the architecture of any particular computer; it encourages the programmer to solve problems by describing facts and relationships, instead of trying to fit the problem into a set of memory locations and machine operations on a computer. Prolog is thus, by design, a step farther from the machine than most conventional imperative programming languages. Eventually, however, Prolog must be implemented on a computer if it is to be a programming language at all. Further, the compiler must implement the language efficiently, if Prolog is to be a practical programming language; and the Prolog programmer who is aware of implementation details gains the power to exploit implementation-dependent features and write more efficient programs. Part II addresses the issues involved in writing a Prolog compiler. A Prolog implementation must keep track of pending goals and unified terms as goals succeed (requiring a unification to be recorded) or fail (requiring backtracking and the undoing of unifications). Several architectures for working memory are discussed: a basic two-stack implementation is presented first, followed by implementations that use additional stacks to recover memory more efficiently. Two methods for representing terms are described: structure sharing and structure copying. Beyond these necessary elements of a Prolog implementation, some methods for more efficient memory management are presented. Because Prolog must keep track of the history of the computation in order to be able to backtrack, long Prolog programs can be costly in memory. A carefully-written compiler can recover memory by detecting situations in which backtracking will not occur. Boizumault discusses three of these situations: return from the call of a deterministic predicate;optimization (which can be done when control reaches the last literal in a deterministic rule); and clause indexing (which uses the data types appearing on the left-hand side of a clause toout some future unifications as impossible). Part II ends with a discussion of the predicates "dif" and "freeze", both of which require that the execution of aor goal be delayed until a future condition is met. Part III presents the author's implementation of three miniature Prolog dialects: Mini-CProlog, Mini-WAM, and Mini-PrologII. The three implementations illustrate increasingly complex language features. Mini-CProlog, which uses structure sharing and a three-stack working space, updates the local stack after deterministic predicate calls. Mini-WAM, which uses structure copying and a three-stack working space, adds updating of the local stack before the last call of a deterministic predicate.Prolog-II, which uses structure-sharing and a four-stack working space, adds an implementation of the "dif" and "freeze" predicates. LISP code for these implementations is given in the appendices. The chief weakness of this book is that it is difficult totranslators' prose retains some quirks of French syntax which are distracting to the English reader. Additionally, the abbreviations used in algorithms and LISP code are often not clearly mnemonic; I would have found the code and technical discussions easier to follow if longer, more suggestive variable names and abbreviations had been used. The author does, however, organize the material in a systematic way, with a clear outline; each section and chapter clearlywhat the section will contain and summarizes the section's contents at the end. The bibliography is also comprehensive, listing journal papers, conference proceedings, language manuals, and Prolog textbooks, so that the reader who wants more detail about a particular Prolog dialect or implementation method can easily follow the pointers into the relevant literature. The Implementation of Prolog is thus a valuable resource both to designers of Prolog compilers and to Prolog programmers who need to minimize the space and time resources used by their programs. The Implementation of Prolog surveys the methods that have been used to write Prolog compilers and interpreters, bringing together concepts from separate journal and conference papers into a single volume. The book is based on the author's dissertation, extended and rewritten to serve as a textbook for Prolog implementors. It is accompanied by Common LISP implementations of miniature versions of several different Prologthe full LISP code is given in an appendix and is available by anonymous ftp. The author assumes that the reader is already familiar with Prolog and Common LISP; Prolog syntax, data handling, and control are summarized in the first chapters, but the novice Prolog user will want to read a Prolog textbook first and write some sample programs before approaching this volume. The book is divided into three major parts. Part I summarizes the fundamental features of the Prolog language---unification, resolution, and control. Robinson's unification algorithm is given, along with an implementation of this algorithm in LISP; this is followed by a discussion of the "occurs" check--why the check is usually omitted, what the consequences of that omission are, and what alternatives to a full "occurs" check have been tried in various Prolog dialects. Resolution is described, again accompanied by a LISP implementation. The chapter on control includes discussions not only of the most common Prolog control strategy (left-to-right selection of clauses and literals, with backtracking), but also of some of the alternative control mechanisms that have appeared in Prolog dialects, including variable annotations, the "freeze" predicate, and "wait" and "when" declarations. S I G A R T Bulletin, Vol. 6, No. 4

Page 1 of 1

Page 1 of 1

Toggle back to continuous viewing mode

/lp/association-for-computing-machinery/book-review-the-implementation-of-prolog-by-patrice-boizumault-kKsFKBp6g0
Welcome to DeepDyve! Rent Premier Research Articles and Save Up to 90%

Learn more

Free Article

Bookmark

Book review: The Implementation of Prolog By Patrice Boizumault Translated from the original French by Ara M. Djamboulian and Jamal Fattouh (Princeton University Press, 1993)

Reviewer-Tinkham, Nancy Lynn
ACM SIGART Bulletin , Volume 6 (4)
Association for Computing MachineryOct 1, 1995

More Info

More Like This Article

View All dataSource[]=actageo&dataSource[]=aspet&dataSource[]=aaos&dataSource[]=aacc&dataSource[]=aacr&dataSource[]=aea&dataSource[]=aip&dataSource[]=ajnr&dataSource[]=ams&dataSource[]=aps_physical&dataSource[]=appi_book&dataSource[]=appi_journal&dataSource[]=apha&dataSource[]=asip&dataSource[]=asm&dataSource[]=asn&dataSource[]=aspb&dataSource[]=avs&dataSource[]=annual_reviews&dataSource[]=arxiv&dataSource[]=acm&dataSource[]=berghahn&dataSource[]=cabi&dataSource[]=clinical_trials&dataSource[]=dailymed&dataSource[]=degruyter&dataSource[]=du_press&dataSource[]=esa&dataSource[]=eu_press&dataSource[]=elsevier&dataSource[]=emerald&dataSource[]=ejtr&dataSource[]=emea&dataSource[]=epo&dataSource[]=faseb&dataSource[]=gsa&dataSource[]=health_affairs&dataSource[]=hindawi&dataSource[]=imanager&dataSource[]=imedpub&dataSource[]=informa_healthcare&dataSource[]=informs&dataSource[]=iop&dataSource[]=iucr&dataSource[]=iospress&dataSource[]=jbjs&dataSource[]=leftcoast&dataSource[]=lu_press&dataSource[]=mesharpe&dataSource[]=mary_ann_liebert&dataSource[]=medline&dataSource[]=mit_press&dataSource[]=nature&dataSource[]=oxford&dataSource[]=pier_professional&dataSource[]=pnas&dataSource[]=portlandpress&dataSource[]=psyc_articles&dataSource[]=psyc_books&dataSource[]=psyc_critiques&dataSource[]=plos_journal&dataSource[]=pubmed_central&dataSource[]=rsna&dataSource[]=rockefeller&dataSource[]=rcn&dataSource[]=ria&dataSource[]=rsc&dataSource[]=sage&dataSource[]=spie&dataSource[]=springer_journal&dataSource[]=springer&dataSource[]=taylor_francis&dataSource[]=aps&dataSource[]=the_scientist&dataSource[]=uc_press&dataSource[]=uspto_abstract&dataSource[]=wiley&dataSource[]=pct

Browse: Subject Areas | Journals | Publishers

Sign Up for a DeepDyve Account

Bookmark an Article

To bookmark an article, please log in first, or sign up for a DeepDyve account if you don't already have one.

OK

Subscribe to Journal Email Alerts

To subscribe to email alerts, please log in first, or sign up for a DeepDyve account if you don't already have one.

OK

Thank you for renting with DeepDyve

Your PayPal account has been charged $2.99. You now have access to the full text of this article. A rental receipt has also been sent to your email address.

Your credit card has been charged $2.99. You now have access to the full text of this article. A rental receipt has also been sent to your email address.

OK

New! You can now keep track of new articles from ACM SIGART Bulletin on your personalized homepage! Learn more

PDF Download — Not Available

Thanks for your interest in purchasing the PDF. Your request has been noted and we will work with our publisher partner to discuss enabling this feature.

In the meantime, you can get the PDF by visiting the publisher site.

Thank you for purchasing with DeepDyve

Your PayPal account has been charged $.

Your credit card has been charged $.

You can now download this article. A purchase receipt has also been sent to your email address.

Download This Article or I'm done with my download

Print Page — Not Available

Thanks for your interest in printing individual pages. Your request has been noted and we will work with our publisher partner to discuss enabling this feature.

In the meantime, you can get the PDF by visiting the publisher site.

Thank you for printing with DeepDyve

Your PayPal account has been charged $0.

Your credit card has been charged $0.

You can now print this article. A purchase receipt has also been sent to your email address.

Print the Selected Pages or I'm done with my printing

Please refresh to generate a new download link

Your article download link has expired. Please refresh this page to obtain a new download link and try again.

Follow a Journal

To get new article updates from a journal on your personalized homepage, please log in first, or sign up for a DeepDyve account if you don't already have one.

OK