Tuesday |
Thursday |
KEY:
Req = Required reading for which you are responsible (i.e., fair game for exam and homework questions)
Sup = Optional, supplemental reading to provide another perspective or longer explanation of the
lecture topic and required reading
Exp = Optional, supplemental reading to extend the lecture topic, often a research paper
Hwk = Homework going out on this day
Due = Homework due at the beginning of class on this day
|
Feb. 4 |
(This is actually a Wednesday)
The Halting Problem
|
Feb. 10 | Scheme
- Formal grammars in Backus-Naur form (BNF)
- The Scheme language (
examples.ss )
- The Dr. Scheme IDE
- The Scheme expression grammar
|
Feb. 12 |
Functional Programming I
|
Feb. 17 |
Functional Programming, Part II
|
Feb. 19 |
Implementing a Language
Req: |
|
Hwk: | |
Sup: | |
Exp: | |
Due: | - HW2: Functional Programming
|
2-min presentation by Dave Moore: Map-Reduce at Google
|
Feb. 24 |
Substitution
- Arrow and product types
- A substitution interpreter (
subst.ss )
- Bound and free variables
Req: |
|
Sup: | |
Exp: |
- Tcl - a popular scripting language based on substitution
|
|
Feb. 26 |
Exam Review
- The Halting Problem
- Scheme Expressions
- BNF and Syntax
- First Class Procedures
- Substitution Interpreter
2-min presentation by Dan Fast: LAMBDA in Java
|
Mar. 3 |
Exam 1
- Covers Halting Problem through Substitution
- In class: 75 min
- Closed book, 1/2 page original, hand-written notes
- Similar to homework questions
|
Mar. 5 |
The λ Calculus
- Eager and lazy evaluation
- Lambda Calculus Semantics
- Currying
- Scheme
LAMBDA and App in λC
- Church Lists:
CONS in λC (rewrite.ss )
|
Mar. 10 |
The Y Combinator
|
Mar. 12 |
Environments
- The price of substitution
- Deferring substitution
- Semantics vs. implementation
- Environments and binding
- Mutation
- Variable scope
-
SET! (PLT Scheme Doc) and BEGIN
- Introduction to closures
Req: |
- PLAI Ch. 4
- Eph Interpreter Source (read over the next two weeks) (
eph.zip )
|
Sup: | |
Due: | |
Hwk: | |
|
Mar. 17 |
Closures
- Implementing procedures
- Lexical and dynamic scope
-
APPLY and EVAL revisited
- Implementing
MAP (map.ss )
- Semantics of
LET, LET*, LETREC
- Native/built in procedures
Erdem Sahin will present on a topic of his choice.
|
Mar. 19 |
Continuations
- Apply/eval revisited
- Continuations and control flow
-
RETURN, BREAK, THROW , and backtracking (throw.ss return.ss )
Req: |
|
Sup: | |
Exp: |
- PLAI Ch. 15-20 (they're short)
|
Due: | - HW6: Save the Environment I
|
Hwk: | |
|
SPRING RECESS |
Apr. 7 |
Macros
|
Apr. 9 |
Operational Semantics
- Formal progress rules
- Literal Expressions vs. Values (review)
- Rules with environments
- Introduction to types
- Exam Review:
- Halting Problem
- Grammars
- Interpreters
- Functional Programming
- Stream Programming
- λ Calculus
- Closures
- Macros
- How to learn a language
Req: |
- PLAI Ch. 23
- pl-notes (09-04-09 version), section 5
|
Due: | - HW7: Save the Environment II
|
Hwk: | |
|
Apr. 14 | Exam 2 Covers all material from the course. Emphasis on:
- λ Calculus
- Lazy and Eager Evaluation
- Environments
- Macros
Details:
- Review slides (not comprehensive)
- In class: 75 min
- Closed book, 1/2 page original, hand-written notes
|
Apr. 16 |
Type Judgments
- Validity vs. correctness
- Types are sets of values
- Type judgements are reductions for types
- Type annotations
- Procedure Types
Req: |
|
Exp: |
| Due: | - HW8: Operational Semantics
|
Hwk: | |
Evan Weintraub will give a 2-minute presentation comparing natural language and programming language syntax
|
Apr. 21 |
Type Inference
- Discussion of Judgements
- Curry-Howard correspondance
- Casts
- Type Inference
- T-Lambda revisited
- The Hindley-Milner-Damas unification algorithm
- Patterns and inference in ML
- Syntax Revisited (slides)
Req: |
- PLAI Ch. 30 (you may skip 30.1.0, 30.1.2, 30.5.3)
|
Sup: |
|
Exp: |
|
Sam Blackshear will give a 2-minute presentation on Alan Turing
|
Apr. 23 |
Polymorphism
Brian Citro and Kelsey Levine will each give a 2-minute presentation on topics of their choice
|
Apr. 28 |
Subtypes
- Subtypes
- Covariance and contravariance
- Objects and inheritance
- The curious cases of null and void
Austin presents GOTO and scope; Claire presents reactive languages
|
Apr. 30 |
Memory Management I
- Protecting state with closures:
next procedure in Scheme
- (Exploring semantics)
- Stack and heap revisited
- Constructors and destructors in C++ (
constructor.cpp )
- Manual mangement:
new and delete in C++
- Dangling references and memory leaks (...and buffer overrun exploits)
- Identifying dead objects is undecidable
- Memory management for Trees is easy
- Reference counting for Directed Acyclic Graphs (ala Python)
- Extending C++ with reference counting
(
ReferenceCount.cpp )
Req: |
|
Exp: | |
Due: | HW10: Recursion (Now due 5/5/09 because of server and network outages during in the heat wave)
|
Josh will give a 2 minute presentation on Expect
|
May 5 | Memory Management II
- Cycle detection is difficult
- Free lists and allocation lists (
alloc.py )
- Block allocation
- The Mark-Sweep collection algorithm (
mark-sweep.py )
- Conservative collection
- Fragmentation
- Stop-and-Copy collection algorithm
Exp: | |
Out: |
|
Due: | - HW10: Babel (Extended Deadline)
|
Jeff, Tyler, and Moaj will present on Algol, ???, and AWK
|
May 7 | Concurrency
- Yielding
- Threads and processes
- Barrier synchronization
- Mutexes and semaphores
- Java
synchronized
- Signal and wait
- Lockless structures
Dan Waters, Kefei, and Mike will present on topics of their choice
|
May 12 |
Case Studies
All the world's a...
- Scheme: list
- Python, TCL, and Perl: string
- C: byte
- C++, Java, and Smalltalk: object
- APL, Excel, and Fortress: equation
- Matlab and Fortran: matrix
- GLSL: 3D vector
- Prolog: logical proposition
- CUDA: thread
Plus, CS334 Bingo
|
May 14 | The Future
- Programming for parallelism
- Accessible programming
- Safety and security
- Course evaluations
Handout: |
- PL Notes (5/12/09 version)--may be brought to final exam.
|
Due: |
|
|
Final Exam: Wed May 20, 9:30 am in TCL 206
Reading
The required course textbook is Krishnamurthi, Programming
Languages: Application and Interpretation, ver 2007-04-26. (Download
Free PDF) (Buy
PDF) (Buy
Hardcopy). Not only is it a great text, but because it is
available as PDF you can search it, and can paste the examples
directly into your programming environment (although I agree with the author's
suggestion that you re-type them to force you to read more closely.)
Although it is not required I highly recommend that you buy a copy
of Alan Turing: The Enigma by Hodges. It is an easy and
exciting read. The biography covers many of the high points of the
course in non-technical language as well as introducing you to the
most important computer scientist of all time.
Occasional additional required reading, typically in
the form of research papers, may be distributed throughout the
semester. For many lectures, supplemental reading is
recommended that offers an alternative explanation or explores a topic
further.
The following are completely optional (that is, unless I assign one of
them) recommended reading. Some of these might be good topic sources
for your 2-minute presentation. Note that not all of the recommended
reading is technical!
- A. Hodges, Alan Turing: The Enigma, Random House, London, March 1992.
- J. McCarthy, Recursive
functions of symbolic expressions and their computation by machine, Comm.
ACM 3, 4 (1960) 184-195.
- An Introduction to Operational Semantics
- Benjamin Zorn, Comparing mark-and sweep and stop-and-copy garbage collection,
ACM conference on LISP and functional programming, 1990.
-
Jeffrey Dean and Sanjay Ghemawat,
MapReduce: Simplified Data Processing on Large Clusters,
OSDI'04: Sixth Symposium on Operating System Design and Implementation,
San Francisco, CA, December, 2004.
- Edward Estlin Cummings, Since Feeling Is First, in E. E. Cummings: Complete Poems 1914-1962 p. 291, Ed. George J. Firmage, New York: Liveright, 1991.
-
Rob Pike, Sean Dorward, Robert Griesemer, Sean Quinlan,
Interpreting the Data: Parallel Analysis with Sawzall,
Scientific Programming Journal
Special Issue on Grids and Worldwide Computing Programming Models and Infrastructure 13:4, pp. 227-298.
- The Java HotSpot Virtual Machine, Sun Microsystems.
-
Steve M. Blackburn,
Richard Jones,
K. S. McKinley,
J. Eliot B. Moss,
Beltway: Getting Around Garbage Collection Gridlock,
ACM SIGPLAN Conference on Programming Language Design and Implementation,2002.
-
E. D. Berger,
B. G. Zorn, and
K. S. McKinley,
Composing High-Performance Memory Allocators
,
ACM SIGPLAN Conference on Programming Language Design and Implementation,2001.
- J. Backus, Can programming be
liberated from the von Neuman style?, Comm. ACM 21, 8 (1978)
613-641. (large file)
- R. Harper, Introduction
to Standard ML, Report ECS-LFCS-86-14, Dept. Computer Science,
Univ. Edinburgh, 1989. (Link is to updated web version.)
- B. Kernighan, Why Pascal is Not My
Favorite Programming Language, Bell Labs CSTR 100, July 1981.
- A. Koenig, An
anecdote about ML type inference, USENIX Symposium on Very High Level
Languages,1994.
- Westley Weimer and George C. Necula
Finding and Preventing Run-Time Error Handling Mistakes.
In Proceedings of the Conference on Object-Oriented Programming Systems, Languages and Applications, 2004.
- N. Wirth, Program development by stepwise
refinement, Communications of the ACM, 14, 4 (1971)
221--227.
- D. Parnas, On the criteria to be used in
decomposing systems into modules, Communications of the ACM, 15,
12 (1972) 1053-1058.
- Guy Steele,
Growing a Language, Invited talk at OOPSLA 1998.
- D. Ingalls, Design principles behind Smalltalk,
BYTE Special Issue on Smalltalk, August 1981.
- 15 Years Ago in BYTE: The Smalltalk
Environment by Larry Tessler, BYTE, August 1996.
- W.R. Cook, Interfaces
and specifications for the Smalltalk-80 collection classes,.Proc ACM
Conf. Object-Oriented Programming Systems, Languages, and Applications (OOPSLA
'92). ACM SIGPLAN Notices ,Vol. 27, No. 10 (Oct. 1992), Pages 1-15.
- Henry McGilton and James Gosling,
The Java Language Environment: A White Paper, 1996. (The most relevent sections are Chapters 1-2 and 4-6).
-
Security readings:
This is the course page for CS334: Principles of Programming Languages at Williams College, S09. Previous years: S08,S07, S05, S04, S03, S02