Prolog Information

 

The Tutorial

This is to be done in class and out of class. Your assignment will partially come from the exercises in this tutorial.

 

Create a diretory called demo-prolog in your class directory. Copy files into this directory from:

 

~compsci/cis346/demos/prolog

 

 

---

Part I. Prolog Introduction

http://www.csupomona.edu/~jrfisher/www/prolog_tutorial/intro.html

 

Part II. Starting Prolog

 

Part III. Working with Unit Clauses/Facts (uses the color-map.pro file)

http://www.csupomona.edu/~jrfisher/www/prolog_tutorial/2_1.html

 

Part IV. Prolog Derviation Trees and Choices (uses the file deriv.pro)

In this section, you will be asked to trace a goal statement using the trace/1 facility in prolog. Suppose the goal statement is:

 

?- adjacent(5,4).

 

Then the trace/1 utility would be invoked by:

 

?- trace(adjacent(5,4)).

 

http://www.csupomona.edu/~jrfisher/www/prolog_tutorial/3_1.html

 

Part V. Factorial (uses the file factorial.pro)

http://www.csupomona.edu/~jrfisher/www/prolog_tutorial/2_2.html

 

Part VI. Towers of Hanoi (uses the file towers.pro)

http://www.csupomona.edu/~jrfisher/www/prolog_tutorial/2_3.html

 

Part VII. An introduction to Cuts

http://www.csupomona.edu/~jrfisher/www/prolog_tutorial/3_2.html

 

Part VIII. Negation as Failure

http://www.csupomona.edu/~jrfisher/www/prolog_tutorial/2_5.html

 

 

---

A useful list of built-in goals for prolog

http://www.csupomona.edu/~jrfisher/www/prolog_tutorial/4.html

 

BinProlog Online Documentation

http://www.binnetcorp.com/BinProlog/

 

 

---

Assignment (DUE Wed. 11/19/2003 at 8AM)