University of Toronto - Fall 2002 Department of Computer Science

CSC 324: Principles of Programming Languages

Old announcements Lecture material Scheme references and downloads
Newsgroup Tutorial notes Scheme Project
Site change log Assignments Prolog references and downloads
Marks online Reading list Prolog Project


January 11: I have finally had the time, as well as all the information I needed, to assess the group's performance and decide on appropriate adjustments. Given the level of difficulty of the exam, I decided to add 5% (4.5/90) to every student's final exam results. The minimum requirement of 40% on the exam applies to your adjusted exam score. Tentative term grades are now available on the online marks system. You will still see your raw exam score, but the adjusted score was used to calculate your term grade. My apologies for the delay in calculating these.

January 8: The P2 marking scheme, including automarking details, are now available on the project page. Since I couldn't post this earlier, the deadline for submitting regrade requests is extended to Friday, January 10, 4pm. I can't push it back any further, however, because of the deadline to submit final course grades to the faculty. Please review the marking scheme carefully before submitting a regrade request!

December 30: If you need to submit a regrade request for P2, please fill the usual form, place it with your project in an envelope, and leave it with the receptionist in SF3302, once the university reopens on January 6. Make sure you ask her to place it in my mailbox. The deadline to do is is Thursday, January 9, 4pm.

December 29: P2 marks are available online, and the papers are available at the same place as the PS4 papers. Final course grades will be calculated after the holidays. You will be able to find them on ROSI when they are available.

December 20: A number of students have asked me for special considerations about their exam grade. I will not reply to any of these messages: all exams will be treated fairly, and each student will receive the grade they earned, in keeping with the academic integrity of this institution.

December 20: The final exam has been marked. You will find your exam mark in the usual place. Question by question statistics are also available. Tentative term grades may not be available before January, however, and official grades will only be available on ROSI.

December 13: I placed the graded PS4 papers, as well as regrade requests I got last week, in a box outside SF4301. PS4 grades are available online.

Old announcements are still available.

General Information

Instructor: Eric Joanis
Use this address for all course related questions.
I will not reply to course-related e-mail sent to my @cs address.
Please do not use HTML or MIME (unless you need to send me an attachment) when sending e-mail. Click here to see why and to find out how to turn off HTML and MIME.
Office Hours: Tuesday 1:30 - 2:30 pm
Thursday 5 - 6 pm
Location: BA3234
Lectures: Day section: TR 12 - 1 pm (Location Changed to BA1190)
Evening section: R 7 - 9 pm (BA1190)
Tutorials: Day section: M 12 - 1 pm
BA1190 - Last names A-D' - TA: Afsaneh Fazly
WI 523 - Last names Da-Le - TA: Alexander Kress
RW 143 - Last names Li-Sa - TA: Hojjat Ghaderi
RW 142 - Last names Se-Z - TA: Cosmin Munteanu
Evening section: R 6 - 7 pm
BA1190 - Last names A-G and Z - TA: Shiva Nejati
BA3012 - Last names H-N - TA: Changed to Hojjat Ghaderi
BA3004 - Last names O-Y - TA: Anya Tafliovich
Course Info: The Course Information sheet contains information you must be aware of.
Synopsis: The course synopsis can be found in the academic calendar.
Notes Online: Most lecture material for this course will be available online.
Tutorials Online: Most tutorial notes for this course will be available online.
Newsgroup: You must read the course newsgroup for announcements.
You can post to the course newsgroup from home.
Online References: Scheme references and downloads and Prolog references and downloads.


Software Testing by Diane Horton. You are expected to test your programs with this document as a standard.

If you want to submit a remark request, first read my guidelines for remark requests and then use this form.

Problem Set 1: Formal Specifications. Solutions. Shiva's marking notes, copied from the newsgroup.

Problem Set 2: Expression Grammar and Scheme. Solutions. Anya's marking notes.

Project 1: Scheme.

Problem Set 3: Procedural Languages. The PS3 Clarification Page will have any important revisions to the handout.
Solutions. The marking scheme.

Problem Set 4: Prolog. The PS4 Clarification Page will have any important revisions to the handout.
Here is a sample .in file with the sibling.P program file that it uses. This example should help you create your own test suite files.
Solutions. Hojjat's marking notes.

Project 2: Prolog.


Here is an old midterm test for practice, with solutions. Note that we didn't cover exactly the same material this term, so you should ignore questions that are about material we haven't seen.

Midterm solutions: Day section Evening section.
Question by question statistics for the midterm.

Question by question statistics for the final exam.

Lecture Notes

Lecture 1: Introduction. Reading: Sebesta, chapters 1 and 2.

Lectures 2 and part of 3: Formal Specifications, part I. Reading: Sebesta, 3.1-3.4 (3.1,2,3,5 in 4th edition).

Weeks 2 and 3: Formal Specifications, part II. See above for readings.

Weeks 3 to 6: Scheme. Reading: Sebesta, chapter 15 (ch. 14 in 4th edition).
Slides: Scheme, part I. Scheme, part II. Scheme, part III. The bubblesort procedure from slides 43 and 44.

Weeks 7 and 8: Procedure Design.
Reading: Sebesta 5th ed.: 5.3, 5.4, 5.8-5.10; 9.1-9.5, 9.11; 10.1-10.5.
Sebesta 4th ed.: 4.3, 4.4, 4.8-4.10; 8.1-8.5, 8.11; 9.1-9.5.
Of the above, the most important sections are 5th ed: 5.8, 9.5, 10.3; 4th ed: 4.8, 8.5, 9.3.
The swap example we'll cover in class.

Weeks 9 to 11, maybe 12: Prolog.
Reading: Sebesta, chapter 16 (5th ed) or chapter 15 (4th ed).

Additional Prolog material:

Tutorial Notes

Tutorial 3: Scheme.

Tutorial 4: Supplementary slide on testing for equality in Scheme.

Tutorial 5: Because of Thanksgiving, there is no tutorial for either section during the week of Oct 14-18. Instead, I have prepared these replacement tutorial notes on material that would have been covered during tutorial.

Reading List

Required Texts:

Sebesta, Concepts of programming languages 4th or 5th ed., Addison-Wesley, 1999 or 2002. (If you use the 4th edition, photocopy the table of contents of the 5th so you can map the assigned readings.)

``A Student's Guide to CDF'', available for a couple of dollars from the UofT Bookstore.

Optional Reference:

Sethi, Programming languages: concepts and constructs, 2nd ed., Addison-Wesley, 1996.

Highly Recommended References:

Dybvig, The Scheme programming language : ANSI Scheme, 2nd ed., Prentice Hall, 1996.

Clocksin and Mellish, Programming in Prolog, 4th ed., Springer-Verlag, 1994.

Bratko, PROLOG Programming for Artificial Intelligence, 3rd ed., Addison-Wesley, 2001.

Additional language textbooks, for more detailed explanations:

Springer and Friedman, Scheme and the Art of Programming, McGraw-Hill, 1989.

Sterling and Shapiro, The Art of Prolog : Advanced Programming Techniques, 2nd ed., MIT Press, 1994.

Computing Facilities

The programming assignments will make use of the CDF Unix facilities. Although you may do your work at your home PC, all assignments should be uploaded and run on CDF machines in order to receive credit for them. Those unfamiliar with CDF should find information in the CDF home page useful.