CSE 341: Programming Languages

Winter 2005

Course Information

Syllabus
Academic-Integrity Policy
Extra-Credit Policy

Exams

Midterm exam   Sample solution

Final exam review questions (Solutions)   Final exam   Sample solution

Homework

Homework 1 - Due 10:00 PM, Tuesday, January 18th. (Online turnin form) (Sample solution)
Homework 2 - Due 10:00 PM, Wednesday, January 26th Thursday, January 27th. (Online turnin form) (Sample solution)
Homework 3 - Due 10:00 PM, Thursday, February 3rd. (Provided code) (online turnin form) (Sample solution)
Homework 4 - Due 10:00 PM, Monday, February 14th (Online turnin form)
Homework 5 - Due 10:00 PM, Wednesday, February 23. (hw5provided.scm) (NEW! An interpreter than can evaluate files!) (hw5test - minischeme test cases) (hw5test_output - correct hw5test output) (NEW! An interpreter than can evaluate files!) (Online turnin form)
Homework 6 - Due 9:00 PM, Sunday, March 6th. (online turnin form) (Sample solution)

Course Dictionary

Class Materials (Items with current dates have been updated for winter quarter. Items with earlier dates are from last quarter and will be the basis for this quarter's classes. Materials for future meetings subject to change.)

  1. Jan 3: Introduction to 341 and SML   slides   code
  2. Jan 5: Functions, pairs, and lists   slides   code
  3. Jan 7: Let bindings, options, and benefits of no mutation   slides   code
  4. Jan 10: "One-of" types and user-defined types   slides   code
  5. Jan 12: More pattern-matching, accumulators, tail recursion   slides   code
  6. Jan. 14: Deep patterns, pattern-bindings, course motivation   slides   code
  7. Jan. 19: Course motivation, BNF, functions taking functions   slides   code (updated 1/19)
  8. Jan. 21: Function closures   slides    (no .sml file)
  9. Jan 24: Closures for ADTs, callbacks, and currying   slides   code
  10. Jan 26: Mutual Recursion, Equivalence and Syntactic Sugar   slides   code
  11. Jan 28: Type inference and parametric polymorphism   slides    (no .sml file)
  12. Jan 31: Modules and abstract types   slides   code
  13. Feb 2: Scheme intro and binding forms   slides   code
  14. Feb 9: Thunks, Streams, and Memoization   slides   code
  15. Feb 9: Macros   slides   code
  16. Feb 11: define-struct, exceptions via let/cc   slides   code
  17. Feb 16: varargs/apply, implementing higher-order functions and exceptions   slides (no code)
  18. Feb 18: Continuation-passing idiom, static vs. dynamic typing   slides   code
  19. Feb 18: MzScheme Modularity, abstraction with dynamic types   slides   code
  20. Feb 23: Introduction to Smalltalk   slides   Workspace contents
  21. Feb 25: Smalltalk objects, classes, and inheritance   file out
  22. Feb 28: Late-binding: the essence of OO and as a Scheme pattern   slides   Scheme code
  23. Mar 2: Advanced OO topics   slides   Workspace contents
  24. Mar 4: Multimethods, static typing for objects   slides
  25. Mar 7: OO subtyping, named types, class vs. types  slides
  26. Mar 7: Polymorphism: overloading, subtyping, parametric, and bounded quantification   slides   Java   ML
  27. Mar 9: Garbage collection   slides
  28. Mar 11: Some Java idioms and "everything we didn't do"   slides

Section Materials

  1. Sep 30: Intro ML examples, non-recursive functions  ex1.sml   ex2.sml  ex3.sml  funcs.sml
  2. Oct 7: Practice with patterns  ex1.sml
  3. Oct 14: Exceptions, returning functions  exceptions.sml  funcs.sml
  4. Oct 21: HW3 practice/examples  ex1.sml
  5. Oct 28: Modules, Signatures, Abstract Types  ex1.sml
  6. Nov 4: Begin, mutation, improper lists in Scheme  ex1.scm
  7. Mar 3: Objects as a pattern in Scheme  sec-obj.scm

Staff

Instructor: Hal Perkins, perkins@cs.washington.edu, Allen Center 548
TA: David Richardson, daverich@cs.washington.edu
TA: Brian Koropoff, brianhk at cs.washington.edu

Office Hours

Perkins: WF 2-3pm, and by appointment (CSE548)
Richardson: Tue 1:30-2:30, Th 10:30-11:30, and by appointment
Koropoff: Mon 2:30-3:30, and by appointment (CSE002)

Textbooks and Online Resources

"Required": Jeffrey D. Ullman. Elements of ML Programming, ML'97 Edition. 1998.
Assuming you do not want to suffer from bugs in the textbook, check the errata page.
Approximately: Chapters 2, 3.1-3.4, 5.1-5.5 (skip 5.2.5, 5.3.4, 5.4.4), 6.1-6.2, 7.1, 8.2, 8.5.5 overlap with the course material.

"Recommended": Mark Guzdial. Squeak: Object-Oriented Design with Multimedia Applications. 2001.
As with the above, check the errata page.
Approximately: Chapters 2, 3.1, and 3.2 overlap with the course material.

SML resources:
www.smlnj.org
tutorials, books, and documentation
user's guide

Scheme resources:
R5RS (the standard)
Programming Languages: Application and Interpretation
How to Design Programs (with links to the DrScheme web page)
Structure and Interpretation of Computer Programs

Smalltalk resources:
www.squeak.org
www.smalltalk.org
Keyboard shortcuts reference
Keunwoo Lee's Getting started in Squeak slides
Common 341 Squeak Overview
Jim Sawyer's "Reading Smalltalk"
The IBM Smalltalk Tutorial

Software

The CSE undergraduate labs have all the software you need for the course. If you would like to install software on your own computers these links may help you. They contain more knowledge than the course staff has, so our ability to help further is minimal.

emacs for Windows
SML NJ (use version 110.07, but other versions should be ok)
DrScheme
Squeak

Meetings

Lecture: MWF 9:30-10:20, Smith 304
Section AA: Th 8:30-9:20, MGH 234
Section AB: Th 9:30-10:20, MGH 234
Final Exam: Wed March 16, 2005, 8:30-10:20am, Smith 304

Preliminaries

Join the course mailing list
Homework 0, due January 7, 9:00AM (0 points)
Getting started with UNIX and emacs
Guidelines for using ML in emacs