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)
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.)
- Jan 3: Introduction to 341 and SML
slides
code
- Jan 5: Functions, pairs, and lists
slides
code
- Jan 7: Let bindings, options, and benefits of no mutation
slides
code
- Jan 10: "One-of" types and user-defined types
slides
code
- Jan 12: More pattern-matching, accumulators, tail recursion
slides
code
- Jan. 14: Deep patterns, pattern-bindings, course motivation
slides
code
- Jan. 19: Course motivation, BNF, functions taking functions
slides
code
(updated 1/19)
- Jan. 21: Function closures
slides
(no .sml file)
- Jan 24: Closures for ADTs, callbacks, and currying
slides
code
- Jan 26: Mutual Recursion, Equivalence and Syntactic Sugar
slides
code
- Jan 28: Type inference and parametric polymorphism
slides
(no .sml file)
- Jan 31: Modules and abstract types
slides
code
- Feb 2: Scheme intro and binding forms
slides
code
- Feb 9: Thunks, Streams, and Memoization
slides
code
- Feb 9: Macros
slides
code
- Feb 11: define-struct, exceptions via let/cc
slides
code
- Feb 16: varargs/apply, implementing higher-order functions and exceptions
slides (no code)
- Feb 18: Continuation-passing idiom, static vs. dynamic typing
slides
code
- Feb 18: MzScheme Modularity, abstraction with dynamic types
slides
code
- Feb 23: Introduction to Smalltalk
slides
Workspace contents
- Feb 25: Smalltalk objects, classes, and inheritance
file out
- Feb 28: Late-binding: the essence of OO and as a Scheme pattern
slides
Scheme code
- Mar 2: Advanced OO topics
slides
Workspace contents
- Mar 4: Multimethods, static typing for objects
slides
- Mar 7: OO subtyping, named types, class vs. types slides
- Mar 7: Polymorphism: overloading, subtyping, parametric, and
bounded quantification
slides
Java
ML
- Mar 9: Garbage collection slides
- Mar 11: Some Java idioms and "everything we didn't do"
slides
Section Materials
- Sep 30: Intro ML examples, non-recursive functions ex1.sml
ex2.sml ex3.sml funcs.sml
- Oct 7: Practice with patterns ex1.sml
- Oct 14: Exceptions, returning functions exceptions.sml funcs.sml
- Oct 21: HW3 practice/examples ex1.sml
- Oct 28: Modules, Signatures, Abstract Types ex1.sml
- Nov 4: Begin, mutation, improper lists in Scheme ex1.scm
- 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