This is the archived website of SI 413 from the Fall 2013 semester. Feel free to browse around; you may also find more recent offerings at my teaching page.

Created by French researchers in 1972. Prolog represents yet another major programming paradigm, logic programming. In this paradigm, programs are expressed as facts and rules, and a program is essentially a proof of a stated goal, using first-order predicate logic. This is a declarative language that lends itself to simple yet brilliant programs for many tasks, shifting most of the work from the programmer to the compiler or interpreter.

Useful Links

How I will run your code

You should probably use the interactive program gprolog in development. However, for testing your code, I will use the GNU Prolog compiler program gplc, as described below. In order for this to work, you must declare an initial goal, with a line of the form
:- initialization(INITIAL_GOAL_HERE).
For example, in the 99 bottles program linked above, this line would be
:- initialization(drink(beer,99)).
(Of course, the trailing period is crucially important.)

Save your program in a file called

I will test your code in the same environment as the lab machines in MI 316, using the commands

  gplc --no-top-level

Phase 1 Requirements

For this language, you need to implement modifications A, B, D, and G. See the Phase 1 page for details on what this means.

Phase 2

See the Phase 2 Page for the list of suggested problems. Of the ones listed, I recommend the following as being most well-suited for Prolog:

  1. Make
  2. Game Scheduler
  3. Frequency count
  4. Find the missing digits
  5. ??? (you choose!)