(For the current offering of 5535 click here).

Fundamentals of Programming Languages
CSCI 5535, Fall 2001


Administrivia

Instructor:          Amer Diwan
Office:                  ECOT 743
Office hours:         MWF 2:00 to 3:30 and by appointment
Class times:           MWF 1:00 to 1:50 p.m.
Class location:       CATECS studio ECCS 1B28
Class web page:    www.cs.colorado.edu/~diwan/5535-01
Grader:                  Glenn Blauvelt
 

Exams

Course strategy and goals

This course will cover semantic foundations of advanced features found in modern programming languages such as Java, C#, and S ML. 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 

The course will present the material at three levels:

  1. The first level will introduce important fundamental concepts that are common across several programming languages.  These concepts include types, polymorphism, dynamic memory management, and control flow constructs.
  2. The second level will discuss how languages such as Java, Modula-3, SML, Smalltalk, and C++ implement these concepts.
  3. The third level will discuss the implications of how languages implement these concepts for compiler and run-time system.

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 50%
Class participation 10%
Midterm exams 20%
Final exam 20%

The class participation component applies only to in-class students.   It involves the following:

I would like this to be a very interactive class--they are much more fun that way!  

Submitting assignments

All assignments and exams must be done on time except in the case of emergency.  

On-campus students must submit all assignments on paper in class on the due date.  

Off-campus students have exactly seven extra days to submit their assignment.  For example, if an assignment is due for on-campus students on September 5th in class, then it is due for off-campus students on September 12th by 1:50 p.m. (the end of class time).  Off-campus students can email their assignment as an attachment to the grader in either text, Microsoft Word, or PDF format.  Please don't use any other formats.  In the subject of your email you must give your name and identify the assignment for which you are submitting a solution.  Please avoid using any exotic fonts which may make it harder for us to print your assignment.  At 6:00 p.m. on the day before an assignment is due our grader will look at all the assignments submitted so far and make sure they are in a format that he can view and print.  If the grader cannot print them, he will contact you via email and you have the option of resubmitting the assignment in an appropriate format.  If you submit your assignment on the due date itself then you will not have the option of resubmitting the assignment if your assignment does not print.  We recommend that at least for the first assignment you should plan to submit it one day early to make sure that we can extract and print your assignment.

Text

For the most part we will not be using any text for this course.  However, occasionally I will want you to read up background material in an introductory programming languages text Programming Language Concepts 3rd Edition by Carlo Ghezzi (Ghezzi).  This book provides a good introduction to the background for this course and is also used as a text in CSCI 3155.  In addition to this book, I have placed two other books on reserve in the library: Programming Language Pragmatics by Michael Scott (Scott) and  Concepts of Programming Languages 4th Edition (Sebesta) by Robert W. Sebesta.  

As mentioned above, most readings will be from papers and language specifications.  These readings are always compulsory.  When the reading is available on-line, I have a link to its on-line location.  However, some of these readings are not available on-line: I will distribute hard copies of these readings.

Plagiarism policy

You may discuss topics covered in this class with your fellow students, but all assignments that you hand in must be your own work (unless the assignment explicitly allows you to work in groups).  If you include any text or figures from any source in your submitted work you must clearly indicate it in your submission and include a citation to the original source.

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. You should do the reading for a class before attending the class.  The reading for the next class is always highlighted in red.
 
Lectures Topics Readings
2 Course organization and overview.
TYPES
2 What are types? Typed and untyped languages, type safety, type equality, static and dynamic typing, strong and weak typing.   Ghezzi 3.4  for lecture 1
Ghezzi 3.5 for lecture 2 
4 Types and their implications in languages: Modula 3.    Modula-3 type system (POPL 90)
1 Interaction of inheritance with encapsulation. Snyder (OOPSLA 86)
2 Types and their implications in languages: Java Java type system chapters 4 and 5
1 Types discussion    How the language got its spots, from Systems Programming in Modula-3, editor Greg Nelson
POLYMORPHISM
2 Polymorphism in O-O languages and its implications(Modula-3, C++, Java).  Stroustrup, "Multiple inheritance in C++"  for first lecture.
Optional but worthwhile: Chapter 12 of "The design and evolution of C++", Bjarne Stroustrup (on reserve)
5 Polymorphism and data abstraction Cardelli and Wegner
Sections 1 and 2 for first lecture 
Sections 3, 4, and 5 for second lecture
Sections 6, 7, 8, and 9 for third lecture
1 Polymorphism in functional languages and its implications  SML tutorial, Harper upto and including page 40
Type inference: what, why, and how? Mitchell's text (handout)
1 Richer type systems: finding bugs in programs Callahan and Jackson
2 Using types to improve program performance.  Diwan, McKinley, and Moss
(Upto Section 4 for lecture 1, upto Section 8 for lecture 2)
1 Polymorphism in dynamically-typed languages and its implications The Smalltalk-80 system (Byte)  
CONTROL STRUCTURES
1 Closures. Scott: 3.3 or
Ghezzi: 2.7.1 to 2.7.4 inclusive or
Sebesta: 9.3
2 Exceptions handling and implications for implementation Exceptions in Java chapters 11 (Exceptions), 14.19 (try statement)
4 Continuations including case studies and implementation. First lecture:  Notes from Hodas ,  Notes from Harper's tutorial

Fourth lecture: Hieb, Dybvig, Bruggeman PLDI 90

1 Language design discussion  Guy Steele's OOPSLA talk
MEMORY MANAGEMENT
2 Automatic versus manual allocation and deallocation.  Algorithms for memory management: accurate or conservative, copying, mark-and-sweep, and reference counting Wilson survey
2 Implications of language features for memory management implementation.  Detlefs and Agesen 1997
NEW TRENDS
1 Discussion: Persistent programming languages.    Atkinson and Morrison, 1995 Upto and including section 3
1 Multimethods Chambers
2 Review.  

Homework

Resources

You can access slides and other materials from this course in 1999 and 2000.  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