Writing Prolog Programs
Writing Prolog Programs
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.