CS2LAP: Labs
Labs sessions take place in room 24D. Please turn up either on Tuesday
or on Thursday. Exercise numbers refer to the Prolog lecture notes.
Sample solutions are Prolog programs that you should download, run,
and compare with your own solutions.
Lab 1
-
Times: Tuesday 03/10/00, 5-6pm and Thursday 05/10/00, 2-3pm
-
Make yourself familiar with Linux and SWI-Prolog.
-
Do as much as you can of exercises 1.2 and 1.3.
-
Sample solutions
Lab 2
-
Times: Tuesday 17/10/00, 5-6pm and Thursday 19/10/00, 2-3pm
-
Work on exercises 2.1 (easy), 2.2 (moderate), 2.6 (moderate),
and 2.8 (difficult). You should definitely manage to do the first
three within an hour and you should at least give 2.8 a try.
-
Sample solutions
Lab 3
-
Times: Tuesday 31/10/00, 5-6pm and Thursday 02/11/00, 2-3pm
-
Work on exercises 4.1, 3.3, 3.4, and 3.6.
-
Sample solutions
Lab 4
-
Times: Tuesday 14/11/00, 5-6pm and Thursday 16/11/00, 3-4pm
-
Spend the first 15 minutes of the lab session debugging some
recursively implemented predicates like, for example,
concat_lists/3 or remove_duplicates/2.
Recall that you can put a spypoint on a predicate using spy/1
and that you can switch debugging on and off with debug/0
and nodebug/0.
-
Work on exercises 5.4 and 5.5.
-
Sample solutions
Lab 5
Lab 6
-
Times: Tuesday 12/12/00, 5-6pm and Thursday 14/12/00, 2-3pm
-
Work on exercises 2.7, 3.1, 4.2, and 5.3 or the programming
questions from coursework 5.
-
Sample solutions
last modified on
Friday, 15-Apr-2005 14:42:21 CEST by
Ulle Endriss