Module 15 Study Guide
Learning Objectives (Prolog, CPL Ch.16)
We are learning elementary Prolog to get a taste of declarative and logical programming. As with functional programming, declarative programming is an entirely different way of thinking about programming from what you are used to. It is also quite different from functional programming. Specifically, by the end of the module you should be able to
- Run and exit the
- Create and load a Prolog program into the
- Run queries in the
swiplinterpreter and understand the results
- Write Prolog facts using predicates and atoms
- Write Prolog rules using variables and recursion
- Understand how the Prolog interpreter’s inference engine works
- Write rules using the cut (
!), the not predicate (
\+), and the anonymous variable (
- Write test cases that can be run after a program is loaded
Please complete the lab. You may begin it any time. You should try to finish it by Wednesday so you can start working on the programming assignment.
Please complete the project and submit your code on Canvas by the due date.