Assignment 4: Prologue to Prolog |
CSE 341: Programming Languages The University of Washington, Seattle, Winter 2012 |
Purpose: The purpose of this assignment is to introduce you to the syntax and semantics of Prolog. |
Due: Wednesday, February 8 (changed from Feb. 6), at 5:00 PM via Catalyst CollectIt. |
Individual Work. Do this assignment individually. DO NOT COLLABORATE on this assignment. This is not a partnership or teamwork assignment. |
What to Turn In:
You should turn in the following files:
warmup.pl warmup.pdfThe Prolog file should begin with comment lines that give the name of the file, a program name (that is more descriptive and English-like than the filename), the author's (your) name, followed by a brief description (2-5 lines) of what the program does. The file warmup.pl should contain the definitions of the prolog predicates ("procedures") that you define for this assignment. |
Read
A Prolog Compendium
by Marc Bezem.
Do the following exercises in this tutorial:
1.1, 1.2, 2.4, 3.1, 3.2, 3.3, 4.5, 4.6.
Put the answers to the programming questions in the file warmup.pl and the answers
to the other questions in warmup.pdf. In the file warmup.pl, use a comment with
a left-justified heading for each code exercise
such as this:
% Exercise 1.2: son(S, P) :-In the file warmup.pdf, use a similar left-justified heading before each exercise. This assignment is worth a total of 100 points.
|
Last updated: 5 February (corrected the "purpose"); previously updated 4 Feb. 9:30 AM (deadline changed); 27 Jan. 10:20 PM. |