CSC C24 - Principles of Programming Languages

Winter 2012

UofT logo


Announcements!

Final grades have been submitted. Marks are on Blackboard.

I am on campus, and will be in my office most of the day today (Tuesday April 17). Feel free to e-mail me if you want to make sure I 'm not gone for lunch.

I am currently stuck at an airport in Chicago. I may or may not make it back in time for office hours on Monday. Please check before you come in, if I am not in, I will answer questions by e-mail and on the messageboard.

Sample solutions are up for A2, A3, A4. You may recognize your work if you did well.

A3 marks are up. I'm still waiting for A4 marks. Let me know if there's any mismatches between partners or missing grades. I have comments to post as well.

Office hours this week - Thursday 10-12 and 1:30-3. Next week Monday 10-12 and 1:30-3, Tuesday afternoon. E-mail if these hours do not work and you want to make an appointment. Wednesday cancelled, will be un-cancelled if I get a request or two by 9am.

No tutorials this week (April 2nd).

Assignment 4 has been visible since March 27th, and is due April 9th, at 11pm. This is the latest possible due date I can set - no grace days may be used.

Assignment 2 marks are visible! If yours is missing, please contact me. Please also check that both partners received the same mark if you submitted as partners. If there is a remark request beyond this, please submit it to me in writing sometime this week.

Tutorial March 29th is also cancelled. Feel free to contact me via e-mail or the messageboard, however.

Class on March 28 is cancelled due to instructor illness. Please let me know what topics you would like on an exam review next week.

A2 marks will be up this weekend. Note: No Scheme assignment or exam question will allow the use of the imperative operations (such as set!, any "!" operations). Such solutions will generally be marked as incorrect. Similarly, for ML, do not research how to set and access variables. (for A4, reference types are OK, but should be used sparingly, most likely only for large data structure you change. If you're using them for integers, ask yourself why).

Solutions to the midterm are posted here. Solutions to A2 will be up shortly.

Bulletin board will be through blackboard - let me know if it doesn't work out



General Information

Course Instructor Carolyn MacLeod
Email cmacleod@cs.utoronto.ca
Lectures Monday 9:10 - 10:00 a.m. in IC 212
Wednesday 9:10 - 10:00 am in IC 230
Tutorials Monday 10:10 - 11:00 in IC 212
Thursday 13:10 - 14:00 in IC 204
Office hours Monday 2-4 pm and Wednesday 10 am - 12 noon
or by appointment.

Office hours take place in IC 463
Note - Monday may take place in IC 483
Back to the index

Online Resources

Back to the index

Recommended textbooks:


Back to the index

Software and documentation


Back to the index

Tentative syllabus:

2 weeks Introduction to Principles of Programming Languages
Formal language theory
3 weeks Functional Programming and Scheme
3 weeks Logic Programming and Prolog
3 weeks Types and Programming Languages
Standard ML
2 weeks Design Principles for Programming Languages

Object Orientation


Back to the index

Prerequisites and Exclusions

Exclusion: CSC324H
Prerequisites: CSCB07H and CSCB36H; CGPA 3.0 or higher or enrolment in a CSC subject POSt. It is your responsibility to ensure you have all prerequisites for the course.

Back to the index

Evaluation

There will be four homework assignments worth 12% each, a midterm (16%), and a final examination (36%). In addition, you must receive 50% or higher on the weighted average of the midterm and the final exam to pass the course; otherwise your final course grade will be no higher than 47.

Back to the index

Lateness, illness, emergencies

We will be using a system of grace days for late assignments. In the beginning of the term you have 3 grace days. An assignment submitted within 24 hours after its deadline uses up one grace day. No assignments will be accepted after all grace days are used. In addition, according to the UofT policy, no assignments can be accepted after the last day of classes.

In case of illness or other exceptional circumstances, proper documentation (e.~g. a medical certificate in case of illness) must be provided. In this case a missed homework or a missed test may be canceled at the discretion of the instructor; marks for a missed homework/test will be distributed evenly over the other marked homeworks/tests.

If you find yourself in an emergency situation, contact your instructor as soon as possible.

Back to the index

Policy on collaboration

You are encouraged to discuss ideas and approaches to solving problems posed on the homework assignments with other students. However, you are not permitted to take any notes during these discussions, nor are you permitted to consult other students' solutions. Searching for a solution on the Internet is a violation of this policy. Sharing work with other students is a violation of this policy. If challenged by either a tutor or the instructor, you must be able to reproduce and explain any solution you submit in an oral exam. Failure to observe this policy is an academic offense, carrying a penalty ranging from a zero on a homework or a test to suspension from the university.

You are encouraged to read this document on Plagiarism and how to avoid it. If you are uncertain about what constitutes plagiarism, talk to your instructor. There are serious consequences to plagiarism. See this document for an explanation of the process for dealing with an offense.

Back to the index

Silent policy

A silent policy takes effect 24 hours before an assignment is due. This means that no question about the assignment will be answered whether it is asked on the bulletin board, by email, or in person.

Tentative course calendar

Monday, January 9 First lecture
Friday, February 3 Assignment 1 due
February 20 - 24 Reading Week - no classes
Monday, February 27 Assignment 2 due
Monday, March 5 Midterm
Sunday, March 20 Assignment 3 due
Wednesday, April 4 Last lecture
Monday, April 9 (no grace days!) Assignment 4 due
TBD in exam period Final examination

The University of Toronto policy on Accommodations for Religious Observances states that no University member should be seriously disadvantaged because of her or his religious observances. If you find that a test or an assignment deadline happens on a religious occasion which you observe, contact me as soon as possible and I will do my best to accommodate you.
Students with diverse learning styles and needs are welcome in this course. In particular, if you have a disability/health consideration that may require accommodations, please feel free to approach me and/or contact AccessAbility Services as soon as possible.
Back to the index

Readings

Week 1-2

Mitchell: Chapters 1, 2, 4.1.
Review notes or textbook chapters on regular and context free languages.

Weeks 3,4

Mitchell: Chapter 3. Look through Chapter 7.

Week 5,6

Mitchell: Chapter 15 (prolog), 4, 7

Reading week, Week 7, 8

Mitchell: catch up on previous chapters. Start reading Part 3 - although this material will come last Chapter 5,6 (ML)

Week 9, 10

Chapter 5,6 (ML)

Rest of Course

Chapter 9, 10,1-10.2.

Back to the index

Lectures

Slides from Introduction Lecture
Formal Language Theory Slides (updated Jan 15)
History of Programming Languages Poster
If you are interested in programming languages in general, you may find this interesting: An interesting paper on programming languages from 25 years ago.
The Java language reference
Scheme slides, part 1
Scheme slides, part 2
Scheme slides, part 3
Scheme code from Jan25 lecture
Prolog slides, week 1
By request, the interpreter session from Feb 8th.
To be updated when we finish in class - sorted and sorting in Prolog Scheme quicksort.
What is your favourite sorting algorithm?Sorting algorithms explained in dance.
Prolog slides, part 2
Code from Feb 13
ML slides - past where we've done may be updated
Review questions for exam
Abstraction and Object Orientation
Example Prolog from review

Tutorials


Week 1 - No tutorial
Week 2 - Formal Language review. Examples can be worked on in the tutorial.
Questions from this week's tutorial
Solutions for this week's tutorial questions
Week 3 - Recursion Review (python file) and Scheme intro (scheme file) Begin Scheme lists, if we have time. Assignment 1 Questions.
Questions from this week's tutorial - keep working on these problems on your own.
Week 4 - Assignment 1 questions, Scheme.More Questions Work on these on your own and be prepared to present answers or ask questions during Tutorial
Week 5 - Assignment 1 solutions and Scheme review "Flatten" tail recursive implementation, from Thurs tutorial. This tutorial will continue to cover Scheme.
Week 6 - Prolog basics
Here's some problems to get started - try a few before tutorial
Code from Feb 13 Tutorial
Code from March 1st Tutorial Please note it's not the best implementation possible, simply an illustration of how one can write this problem in Prolog. I've used a cut for an if-then-else, you can replace this with the if-then-else construct, or not.

Back to the index
Code from March 15 Tutorial

Midterm

Most of the midterm will be familiar to you, if you look at the questions from tutorial, as well as any questions on the lecture slides. The material will not come from the textbook, but reading the relevant chapters will help if you do not fully understand some of the concepts. Bring any questions that concern you to Wednesday's (29th) class.

There will be coding questions, making up ~2/3 of the material, and short answer questions. Syntax will be marked leniently as long as it does not affect clarity or show a lack of understanding (ie, if you'd figure it out in a couple minutes with an interpreter, it's probably OK).

Review questions

Previous midterm and final. Be aware that though we're covering mostly the same material, we're not covering it in the same order. As such, you can skip any questions on material we've not covered for now.
Back to the index


Final Exam

April 17, 7pm
3 hours
One double-sided reference sheet is allowed. It should be hand-written and readable without magnification.

Back to the index

Assignments

Assignment 1
Scheme solutions Formal language solutions
The TA's marking notes
Assignment 2
Prolog Sample solution<
Scheme Sample solution<
Assignment 3
ML Sample Solution<
ML Sample Solution<
Assignment 4
Remarking request form

Back to the index

Carolyn MacLeod