Comp 280 Prolog Page
Here are some references for getting you starting using Prolog.
- The XSB homepage
(this is the Prolog implementation that we are using). You can download
the system to your own computer if you wish.
- Introduction to
Prolog An Introduction to Prolog in XSB by one of designers of XSB.
Chapter 2 (the one called "Introduction to Prolog") is relevant to the
first assignment. Later assignments will touch on material from Chapter 3.
- Another Prolog
Tutorial. Note that this tutorial uses a different implementation of
Prolog, so implementation-specific details may not apply. The defined
operators, syntax, etc, should all carry over however.
- A good summary of
built-in operators and Prolog syntax. Thanks for Justin for pointing
this one out.
Using XSB prolog
The XSB prolog executable is in ~comp280/Tools/XSB/bin/xsb on owlnet.
The XSB manual is in ~comp280/Tools/XSB/docs/userman/manual1.ps.
Do not print out the entire manual. For now, you only
need chapter 2, which explains how to run the system (starting with section
2.3 on page 9).
- Use capital letters to start variable names. I've been getting errors
when I use variable names starting with lowercase letters.
- To get multiple answers to a query, enter a comma after each answer
produced. XSB will say "no" when it has generated all possible answers.
- Typing "halt." (without the "") exists the system.
Post questions about learning to use Prolog on the course newsgroup.
Since you are all learning the system, you can teach each other a lot from
your individual experiences. Don't hesitate to post answers to other
The COMP 280 homepage