Welcome to the Autumn 2009 Logic Programming course!


This page contains material for the logic programming course autumn 2009.

Course Plan.

Click here for general information on logic programming courses

  • Free Prologs for Windows (and Linux, ...)
  • SICStus reference manual
  • Requirements on the assignments
  • Old exams
  • Links

Assignments


News 

  • 091215 Not entirely unexpected, the course evaluation function in the Student Portal is not yet ready for testing.
    So the course evaluation is now opened in http://evaluering.ibg.uu.se/it. Please let us know your opinion on this course.
  • 091127 About course evaluation: a new evaluation system is being built in Studentportalen. This course will be among the first to test the system (apologies for any inconvenience this may cause). I will get information about the system on Dec.15 - hopefully enough to inform you further on Dec.17.
  • 091124 Assignment 4 is now available.
  • 091117 The order of lectures in week 49-50 has been changed to suit the guest lecturers.
  • 091112 Have a look at this old exam question.(Ran out of time in lesson 3).
  •  This link leads to a complete book on Logic Programming. It is much better than Bratko on the theoretical issues (Herband model, etc.). The resultant tree is called SLD-tree and lacks the goal to the left of the arrow. Remember that you have limited printing quota.
  • To make Emacs go into Prolog mode, write Meta-x prolog (the meta-key in the lab is the one with the diamond on it),
    or write
    %-*-Prolog-*-
    as the first line in the file.  

Contact

Lecturer: Roland Bol, room 1356, phone 471 7606, Roland.Bol@it.uu.se.

Assistent: Sven-Olof Nyström, room 1317, phone 471 7691, mailbox 58, Sven-Olof.Nystrom@it.uu.se

Literature

  • Prolog, Programming for Artifical Intelligence by Ivan Bratko. 3rd edition, Addison Wesley, 2001.
  • Compendium, sold at UTH-gård. (SEK 50 (last year)).

Schedule

Date Time Room Topic Comp. Bratko
week 44
Tu
27/10
13
1245
Prolog intro: facts, queries, answers, rules 1, 2 1
Th
29/10
13
1245
Recursive data structures and programs
3
2.1.3, 3.1, 3.2.1
Fr
30/10
10
1245
Lesson 1: Recursion, Prolog vs other languages
Accumulators (tasks)
4.1-4.2 8.2 (8.5.4)
week 45
Mo
2/11
8
1145
Sicstus, practical issues, built-ins 15, 16 2.1.1, 2.1.2, 3.4, 7.3, 8.1, 8.3
Tu
3/11
10
1549
Lab 1: Running Sicstus, list programs
We
4/11
13
1145
Unification and Derivation
5, 6.2
2.2, 2.7, 1.4, 2.4
Fr
6/11
13 1145
Lesson 2: Unification (exercise) (solutions)
Derivation:
- take the royal-family program (page 12) and draw the resultant tree for ?- child_of_king(X).
- take the program to_zero (lesson 1) and draw the derivation for ?- to_zero(s(0), [H|T]).
week 46
Mo
9/11
10
1245
Logic and Logic Programming 
6
1.5, 2.3
We
11/11
15
1145
Clause and goal order, termination.
List programming
, data representation
4.3, 7
2.6, 3.2, 4.1, 4.2
Th
12/11
8
1145
Lesson 3: Assignment 1. List programming. Resultant tree.


Fr
13/11
8
1111
Search
8 2.5, 4.5, 8.5.1, 8.5.2
week 47
Mo
16/11
13
1245
Debugging and measurement; Types and conversions; I/O
16.4, 16.7,
17.1, 17.2 
19
, 20
6, 7.1, 7.2, 7.6, 8.4
Tu
17/11
8
1245
All solutions; Cut
11.1-11.5
5.1, 5.2, 7.5
Th
19/11
10
1549
Lab 2: assignment 3, debugging and measuring
Th
19/11 
13 1245
Lesson 4: Assignment 2. All solutions (try this in Prolog before the lesson).
Cut and resultant tree (exam 030311 question 6)
week 48
Tu
24/11
10
1245
Mid-course evaluation, D-lists, DCG intro
9, 10.1 
8.5.3, 21.1
We
25/11
15
1245
DCG applications (natural language)
10
21.2, 21.3
Th
26/11
8 9
1245
Lesson 5: Assignment 3, DCGs.


Fr 27/11
10 1145
Negation, Searching in graphs
11.6-11.8, 12
5.3, 5.4, 11
week 49
Mo
30/11
10
1145
Playing games (powerpoint presentation)
Othello (practical information about the final assignment)
13
22
Tu
1/12
10
1145
Interpreters - sign up for the exam!
14
4.3, 23
Fr
4/12
10-12
13-14
1245
Implementation of LP (Kostis Sagonas) Slides: (pdf) (ps)
Link to "the Wonder Years"
11.10, 18
(8.5.4)
Fr
4/12
14-15 1245
Lesson 5½: Assignment 4, Othello


week 50 
Mo
7/12
10
1245
Constraint programming (Pierre Flener)
(115 slides, not for printing)

14
Mo
7/12
13
1549
Lab3: working on Othello


week 51
It's difficult to schedule one more lab here, because of other exams, but feel free to drop in with questions on Othello.
Th
17/12
10
1245
Lesson 6: Questions, old exams, info on course evaluation


Exams
Sat
19/12
8-13
5
Exam Polacksbacken, exam hall

Apr


Exam  around Easter

Aug


Exam 

Assignments

Name Begin Deadline Feedback
Comments
1. Basic Logic Programming 29/10 9/11 at 10
11/11
This assignment is not obligatory. It is recommended that you do it individually.
2. Theory
10/11
16/11 at 13
19/11
Note: there is no lab related to this assignment!
This assignment is not obligatory, but can give bonus points if you do it individually.
3. Efficient problem solving -
search and measurement
16/11
23/11 at 10 26/11
Note: work on a solution before the lab!
This assignment is not obligatory, but can give bonus points if you do it in a pair (or individually).
4. DCGs 25/11
1/12 at 10 4/12
Note: there is no lab related to this assignment!
This assignment is not obligatory, but can give bonus points if you do it in a pair (or individually).
5. Game playing (Othello) 30/11
23/12 at 13 5/1
This assignment is obligatory. You must do it in a pair (recommended) or individually.
Note: the interface works on machines with a SPARC architecture.
possible rework of 5.
5/1
15/1 at 17
22/1

You may write in English or Swedish. Note the requirements on assignments.
Assignments can be handed in to Sven-Olof Nyström, or put in his mailbox, or handed in before class.
If you must send it by email, please send only files in text format (.pl or .txt) not in .doc or .pdf format.

Bonus points are only awarded for assignments that are handed in before the deadline.
Corrected assignments will be placed in a binder on the shelves next to room 1346.

Grading

Grading will be based mainly on the exam (90 points).
Assignments 2, 3 and 4 together will give at most 10 bonus points.

You can obtain the grades U (fail), 3, 4 and 5.
(European exchange students also receive an ECTS grade from A to F).

points
<45
45-49
50-59
60-69
70-84
85-100
UU grade
U
3 4
5
ECTS grade
F
E
D
C
B
A