University of Toronto - Winter 2007
Department of Computer Science

CSC 324: Principles of Programming Languages

Lecture Slides

General Information:
Lecture Slides: I will try my best to post the lectures slides in time for you to print them before the start of class, but I may update them after class or at the end of the course module. You will be notified of any updates to the slides on this page, and/or in the log file.
Code: Some of the example code that we use in class will also be posted on this Web page.
Tentative Readings: I have made a tentative list of all of the readings for the course. These may be updated as the course progresses. Any updates will be registered in the log file. When something is listed as optional reading it truly is optional. This is simply reading that may assist with the material covered in class, tutorials, or in the mandatory readings.



Introduction:
Readings: Sebesta Chapter 1 & 2. (Do you really need to know all the material in Chapter 2?).
Slides: 2up.pdf; 4up.pdf; 8up.pdf.

Formal Specifications I & II:
Readings: Sebesta Chapter 3.1-3.3, Chapter 4.
Slides I: 2up.pdf; 4up.pdf; 8up.pdf.
Slides II: 2up.pdf; 4up.pdf; 8up.pdf.

Scheme:
Readings: Sebesta 15.1-15.6; 15.9; 15.10;
Optional Extra Reading: Sethi Chapter 10 (in library). Dybvig (online or in library).
References: MIT Scheme Home Page; MIT Scheme Documentation. Also, check out some of the reference books in the library, such as Dybvig. The Dybvig book is very good and is also available online here. See also links to Scheme from CSC324 Home Page. There are some interesting reads.
Try out this code on CDF: test code. (Save it to foobar.scm and then load it)
Code developed in class the week of February 5: examples.scm
Slides I: 2up.pdf; 4up.pdf; 8up.pdf.
Slides II: 2up.pdf; 4up.pdf; 8up.pdf.
Slides III: 2up.pdf; 4up.pdf; 8up.pdf.
Scanned Slide:my hand-annonated slide on procedures as output.
Slides III (updated **): 2up.pdf; 4up.pdf; 8up.pdf.
**I made minor updates to "Slides III" after posting them. So I have posted the updated slides here. There are two main differences:
1) In the Fibonacci code, I used "display" to add print statements to my code. You will see this repeatedly starting on slide 92 for Simple Fibonacci, and again on slide 96 for Faster Fibonacci. After putting in these display statements, I then ran the code, so that you could see how the programs were running. You will see the runs with the display statements on slide 93 and again on slide 97. Sometimes adding display is easier than reading a trace of the procedure.
2) I removed the last 2 slides because they were not relevant to the assignment I gave you.

Midterm Review:
Slides: 2up.pdf, 4up.pdf .

Typing and ML:
Readings: Sebesta 15.7, 15.8, 5.1-- 5.3, 5.4.1, 5.4.2
References: Ullman is very good (See our course description for the reference. On hold for you in the library.) as are the online materials. You will be using SML/NJ (a version of ML). I also particularly recommend the ML tutorial by Harper though there are also several other tutorials linked from the SML/NJ web page.
Sample code to experiment with: ml_examples1.sml
Slides I: Landscape Mode - 2up.pdf; 4up.pdf; 8up.pdf.
Slides I: Portrait Mode - 2up.pdf; 4up.pdf.
Slides II: 2up.pdf; 4up.pdf; 8up.pdf.
Slides III: 2up.pdf; 4up.pdf; 8up.pdf.
Slides III with 2 additional slides: 2up.pdf; 4up.pdf; 8up.pdf.
Two Additional Slides Alone: 2up.pdf.

Prolog:
Readings: Sebesta Chapter 16.
References: SWI Prolog Home Page (Software and Documentation). See also the Prolog references listed on the main CSC324 Web page. I also recommend the Prolog reference by Clocksin & Mellish or Sterling & Shapiro (available in the library).
Family Tree code (run some queries yourself)
Extended Family code
Logic 101 slides
Proof tree for grandfather quer y (Slides II, pg 23)
Sibling Proof Tree (Slides II, pg 27)
Slides I: 2up.pdf; 4up.pdf; 8up.pdf.
Slides II: 2up.pdf; 4up.pdf; 8up.pdf.
Slides III: 2up.pdf; 4up.pdf; 8up.pdf.
Examples of List Code Developed in Class
Unifying Lists (Slides III, pg.37)
Slides IV: 2up.pdf; 4up.pdf; 8up.pdf.
Unification (MGU - Slide 91) Example from Class: text
Slides V: 2up.pdf; 4up.pdf; 8up.pdf.
Scanned notes from class - Prolog Trees with Cut .
Trace of various versions of the q(x) query (in further explanation of Slides V, pg 15).
Slides VI: 2up.pdf; 4up.pdf; 8up.pdf.

Procedural Language Design:
Readings:Sebesta Chapters 5.8-5.11; 9.1-9.6; 10.1-10.4; 10.6. (Of these 5.8, 9.5 and 10.3 are most critical)
Reference: Sethi Chapter 5 is a very good reference for this material.
** We may not get through all these slides this week. You will only be responsbile for material that we cover in class. **
Slides I: 2up.pdf; 4up.pdf; 8up.pdf.
Scanned Copy of My Old Handwritten Slides on Parameter Passing pdf.
Slides II: 2up.pdf; 4up.pdf; 8up.pdf.
Scanned Copy of My Old Handwritten Slides on Procedural Language Design pdf.

Final Review:
Slides: ; 2up.pdf; 4up.pdf; 8up.pdf.


Back to the main page