Fundamentals of Programming Languages
CSCI 5535, Fall 2002

Administrivia

Instructor:          Amer Diwan
Office:                  ECOT 743
Office hours:         MF 2:00 to 3:30, W 3:30 to 5:00, and by appointment
Class times:           MWF 1:00 to 1:50 p.m.
Class location:       ECCR 150
Class web page:    www.cs.colorado.edu/~diwan/5535-02
Grader:                  TBA
 

Course strategy and goals

This course will cover semantic foundations of advanced features found in modern programming languages such as Java, C#, and SML. This course will give students a detailed and in-depth understanding of modern programming languages: motivation behind language designs, strengths and weaknesses of different language designs, and implementation issues.    Studying these issues will give you a greater understanding of 

We will use case studies from a wide variety of languages, including both languages in common use and languages that are research prototypes.  This course will assume that you have already taken CSCI-3155 or equivalent.

Course requirements

Bi-weekly homework assignments 30%
Midterm exams 40%
Final exam 30%

Submitting assignments

All assignments and exams must be done on time except in the case of emergency.  All assignments should be submitted electronically as follows:

Text

We will be using Kim Bruce's text Foundations of Object-Oriented Languages, recent research papers, and language specifications in this course.  The bookstore has copies of the text.  The research papers will be available for download on this web page in pdf format (a few papers are not available online - I'll distribute hard copies of those papers). 

The readings for a class (see Schedule below) are compulsory and I will expect you to read them before you come to class.  

Plagiarism policy

I strongly encourage you to work together in learning the material.  For example, when starting on an assignment, it is perfectly reasonable and encouraged to sit down with other students and discuss the assignment and help each other understand the material needed for the assignment.  You should, however, write up (or code up) the assignment separately.  In your submission you should clearly indicate which students helped you in the assignment and on what questions.  Similarly, if you include any text, code, or figure from any source in your submitted work you should cite the original source at the point of the quotation..

Mailing list

To join the class discussion list, please fill out this form. Feel free to post any relevant question/opinions to this mailing list by sending mail to: 5535disc@cs.colorado.edu.  I often post important announcements and clarifications to this list so please make sure you get on it as soon as possible.  You can get to the archives of this mailing list by clicking on the "archives" link on http://www.cs.colorado.edu/mailman/listinfo/5535disc

List of topics

The following table gives the topics we will cover in the class and the approximate number of lectures to be spent on each topic.  The "Reading" column lists the reading material for the class.  Readings, such as "Chapter 1" always refer to the Bruce text.  You should do the reading for a class before attending the class

 

Dates Topics Readings
8/26 Course overview and extended example
TYPES
8/28 - 8/30 Finish extended example.

What are types? Typed and untyped languages, type safety, type equality, static and dynamic typing, strong and weak typing.   

Chapter 1 
9/04 Objects, classes, subclasses, and subtypes 2.1, 2.2, 2.3
9/06 Overloading versus overriding 2.4, 2.5
9/09 Type problems in O-O languages Chapter 3
9/11 Interaction of inheritance with encapsulation.  Snyder (OOPSLA 86)
9/13 Adding expressiveness to O-O languages Chapter 4
9/13 Assignment 1: Extending our toy language.  Due 1:00 p.m.  
9/16 Adding expressiveness to O-O languages (cont) Chambers
9/18 Adding expressiveness to O-O languages (Discussion) Growing a language, Guy Steele
9/20 Subtyping of non-object types Chapter 5
9/23 Type restrictions on subclasses, Variations in O-O languages Chapter 6, 7.1, 7.2.2
9/25 Dynamically-typed O-O languages The Smalltalk-80 system (Byte)  
9/27 Assignment 2  
9/27

9/30

10/04

Implementing object-oriented languages Stroustrup, "Multiple inheritance in C++" 
Optional but worthwhile: Chapter 12 of "The design and evolution of C++", Bjarne Stroustrup (on reserve)
10/02 Midterm 1  
10/07 Lambda calculus. Key concepts: lambda, application, currying, typing rules, free variables 8.1 until "substitution" on page 128
10/09 Evaluating lambda calculus expressions.  Key concepts:   substitution, reduction Remainder of 8.1
10/14 Type checking lambda calculus.  Key concepts: typing for record, union, etc. types 8.2
10/16 Parametric polymorphism 9.1
10/18 Recursive expressions 9.2
10/18 Assignment 3 due at 1:00 p.m.  
10/21 Parametric polymorphism and information hiding 9.3
10/23 Bounded quantification 9.4 upto page 161, paragraph starting: "Recall that ..."
10/25 Parametric polymorphism in SML: type inference SML tutorial, Harper upto and including page 40
10/28 Parametric polymorphism in SML (continued) handout
10/30 Guest lecture on .NET/MSIL by Damien Watkins  
11/01 Richer type systems: finding bugs in programs  Callahan and Jackson
11/01 Assignment 4 due at 1:00 p.m.  
11/04 Lackwit continued  
11/06 Midterm 2  
11/08 Exceptions handling and implications for implementation  Exceptions in Java chapters 11 (Exceptions), 14.19 (try statement)
11/11 Exception handling (cont)  
11/13 Continuations Notes from Hodas

 

11/15 Continuation examples Notes from Harper's tutorial
11/18 Continuation implementation  
11/20 Automatic versus manual allocation and deallocation.  Algorithms for memory management: accurate or conservative, copying, mark-and-sweep, and reference counting Wilson survey
11/22 Implications of language features for memory management implementation   Detlefs and Agesen 1997
11/22 Assignment 5, due at 1:00 p.m.  
11/25 Implications of language features for memory management (cont)  
11/27 Formal semantics Gries, "The Science of Programming" (Available in library on reserve  QA76.6 .G747 1983). 
Chapter 7 (The predicate transformer wp)
Chapter 8 (The commands skip, abort, and Composition)
Chapter 9 (The assignment command)
12/02 Formal semantics (cont) Gries
Chapter 10 (The Alternative Command)
Chapter 11 (The Iterative Command)
12/04 Formal semantics (cont) Gries
Chapter 14 (Programming as a Goal-Oriented Activity)
Section 15.1 (in Chapter "Developing Loops from Invariants and Bounds")
12/06 Persistent programming languages Atkinson and Morrison, 1995 Upto and including section 3
12/06 Assignment 6, due at 1:00 p.m.  
12/09 Persistent programming languages (cont)  
  Sample questions for last two weeks  
12/11 Review  
12/16 Final exam, 10:30 a.m. - 1:00 p.m.  

Resources

You can access slides and other materials from this course in 1999, 2000, and 2001.  I recommend using the exams and assignments in the previous years to prepare for your exams.

Java object serialization (link courtesy Brandon Taylor) 
C++ language definition

 Modula-3 language definition
 Using opaque types for Modula-3 I/O library
 Java language definition
 Full SML tutorial
 Ada reference manual
Eiffel