CSE 341: Programming Languages

Winter 2006

Course Information

Academic-Integrity Policy
Extra-Credit Policy


CSE 341 discussion board


Homework 1 due Thursday 1/12 at 11 pm.  (online turnin form.)[solution]
Homework 2 due Thursday 1/19 at 11 pm Friday 1/20 at 10 pm. (Starter files: basra_full.sml, basra_work.sml) (online turnin form.)[solution]
Homework 3 due Thursday 1/26 at 11 pm (updated 1/24) (online turnin form) [solution]
Homework 4 due Thursday 2/2 at 11 pm (updated 1/31) (online turnin form)[solution]
Homework 5 due Thursday 2/9 at 11 pm (electronic) and Friday 2/10 at the beginning of class (written). Files: worksheet  hw5_provided.sml   graph.sml   (online turnin form)
Homework 6 due Thursday 2/23 at 11 pm. (example scheme code to create a minmax tree and a diagram of the resulting tree) (online turnin form) [Solution]
Homework 7 due Thursday 3/2 at 11 pm. Friday 3/3 at 9 pm. Starter file: hw7provided.scm; a second version of the minischeme function that can read files; some sample input and output (but be sure to use more extensive tests for your code) (online turnin form)
Homework 8 due Thursday 3/9 at 11 pm. (online turnin form)[sample solution]


Midterm: in class, Mon. 2/13: topics   exam   sample solution
Final: Monday 3/13, 8:30 am: topics


Jan 26: section 4 slides
Feb 02: section 5 slides

Feb 09: Please refer to Fall 04 midterm
Feb 16: Section 6 code
Feb 23: Section 7 code

Course Dictionary

Class Materials (Items marked with * are from Winter 2005 and will be the basis for this quarter, but are subject to change.)

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


Instructor: Hal Perkins, perkins at cs.washington.edu, Allen Center 548, MW 3:40-4:30
TA: Elizabeth Tseng, lachesis at cs.washington.edu, TTh 1-2pm, CSE 220
TA: Shen-Hui Lee, shen at cs.washington.edu, W 12:50-1:50pm, CSE 220

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:
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:
Keyboard shortcuts reference
Keunwoo Lee's Getting started in Squeak slides
Common 341 Squeak Overview
Jim Sawyer's "Reading Smalltalk"
The IBM Smalltalk Tutorial


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
SMLNJ (Please get the latest version of sml from the site, the self-installing .exe is apparently not compatible with the code used in the homework)


Lecture: MWF 10:30-11:20, Wikenwerder 201
Section AA: Th 8:30-9:20, MEB 245 (subject to change)
Section AB: Th 9:30-10:20, MEB 234 (subject to change)
Final Exam: Monday, March 13, 2006, 8:30-10:20am, Wikenwerder 201


Getting started with UNIX and emacs
Guidelines for using ML in emacs