Jump to ContentJump to Main Navigation
Thinking as ComputationA First Course$
Users without a subscription are not able to see the full content.

Hector J. Levesque

Print publication date: 2012

Print ISBN-13: 9780262016995

Published to MIT Press Scholarship Online: August 2013

DOI: 10.7551/mitpress/9780262016995.001.0001

Show Summary Details
Page of

PRINTED FROM MIT PRESS SCHOLARSHIP ONLINE (www.mitpress.universitypressscholarship.com). (c) Copyright The MIT Press, 2022. All Rights Reserved. An individual user may print out a PDF of a single chapter of a monograph in MITSO for personal use.date: 28 June 2022

Writing Prolog Programs

Writing Prolog Programs

(p.63) 4 Writing Prolog Programs
Thinking as Computation

J. Levesque Hector

The MIT Press

This chapter discusses how to write the sorts of Prolog programs that will be used in the rest of the book. Section 1 examines what it means for a program to be fully correct. Section 4.2 introduces a new program in a blocks world and studies how it was written. This leads to a discussion of recursion in Section 4.3, and to its companion, mathematical induction, in Section 4.4. Section 4.5 considers the issue of programs that run forever and how to avoid writing them. Section 4.6 looks at a more complex predicate as it appears in the blocks-world program. Finally, Section 4.7 introduces the issue of program efficiency.

Keywords:   computer programming, Prolog programs, blocks world, recursion, mathematical induction, predicate, program efficiency

MIT Press Scholarship Online requires a subscription or purchase to access the full text of books within the service. Public users can however freely search the site and view the abstracts and keywords for each book and chapter.

Please, subscribe or login to access full text content.

If you think you should have access to this title, please contact your librarian.

To troubleshoot, please check our FAQs, and if you can't find the answer there, please contact us.