COMP 411
Principles of Programming Languages
Fall 2012

Professor Robert "Corky" Cartwright

Department of Computer Science

Rice University

Houston, Texas, USA

Lecture: Room 1042, Duncan Hall, Monday, Wednesday, Friday, 1:00pm–1:50pm

For more information on the course staff including office hours, see course information.


Course News

Summary

COMP 411 is an introduction to the principles of programming languages. It focuses on:

In the lecture materials, interpreters will be written in concise functional notation using Scala. (Past versions of the course materials used Scheme.) This Scala code is subject to revision as the instructor's understanding of Scala coding idioms improves.

A secondary theme is software engineering. All of the programming assignments in this course are conducted in Scala using test-driven development and pair-programming, two of the major tenets of Extreme Programming. Scala is a putative successor to Java and runs on the Java Virtual Machine. Scala is fully compatible with compiled Java code. The Scala core libraries are an extension of the Java core libraries. In fact, it is possible to develop projects written partly in Scala and partly in Java, although we do not recommend using Java instead of Scala unless there is a strong external reason such as a project that extends an existing Java code base.

COMP 411 consists of three parts:

Students who complete this course will be able to analyze the semantics and pragmatics of the old, new, and future programming languages that they are likely to encounter in the workplace (e.g., Fortran, C, C++, Java, Visual Basic, C#, Perl, Clojure, Groovy). They will also be able to build efficient interpreters for new languages or for "special-purpose" languages embeded in software applications. Finally, they will be much be equipped as software developers because they will understand how to define and implement whatever linguistic extensions are appropriate for simplifying the construction a particular software system.

Notes on the common mathematical notation used in operational semantics, some of which will be used in class.

Course Information

Please take a look at the course information some of which was discussed during the first few class lectures.

Assignments

Please refer to the assignments column in the below.

Lectures

# Date Day Topic Reference Assignment

Language Resources

  1. Scala
    1. Getting started
    2. Quick References
    3. Online books
    4. Free Online course on Functional Programming in Scala by Martin Odersky
  2. Java
    1. SDK Download
    2. API Reference
    3. DrJava Programming Environment
    4. Elements of Object-Oriented Program Design by Prof. Cartwright
  3. Scheme
    1. How to Design Programs
    2. DrScheme Programming Environment
  4. OCaml
    1. OCaml Book
    2. O'Caml Language
    3. MetaOCaml
    4. OCamlLex
    5. Using "Ledit" to make Ocaml recognize arrow keys
  5. Haskell

Additional References

  1. Krishamurthi, Shriram. Programming Languages: Application and Interpretation. Online at http://www.cs.brown.edu/~sk/Publications/Books/ProgLangs/. This book is a descendant of lecture notes created by Shriram for a version of this course when Shriram was a teaching assistant over a decade ago.
  2. Friedman, Wand, and Haynes, Essentials of Programming Languages, 2nd ed. (MIT Press, 2001)
    You can take a look at the following two chapters, which the authors prepared for the second edition, without buying the book:
    1. Parameter Passing ( local file, PDF)
    2. Types and Type Inference ( local file, PDF)
  3. Evaluation rules for functional Scheme ( PDF)
  4. References on evaluating Jam programs
  5. Lecture Notes on Types I
  6. Lecture Notes on Types II
  7. Introduction to System F (Polymorphic Lambda-Calculus)
  8. Scheme code from Class Lectures
  9. The Essence of Compiling with Continuations by Flanagan et al.
  10. Uniprocessor Garbage Collection Techniques by Paul Wilson
  11. Garbage Collection [canonical textbook] by Jones and Lins
  12. Space Efficient Conservative Garbage Collection by Hans Boehm ( local file, PDF)
  13. Hans Boehm's Conservative GC Webpage
  14. The Java Virtual Machine. The most basic expository articles appear at the end of the index. Read it from bottom up.
  15. Java Memory Model
  16. Revised Thread Synchronization Policies in DrJava (doc) ( pdf). Since DrJava is built using the Java Swing library, it must conform to the synchronization policies for Swing. Unfortunately, the official Swing documentation is sparse and misleading in places, so this document includes a discussion of the Swing synchronization policies.
  17. Lesson: Concurrency in Swing. This lesson discusses concurrency as it applies to Swing programming. It assumes that you are already familiar with the content of the Concurrency lesson in the Essential Classes trail.
  18. Concurrency in Swing Text
  19. The Last Word in Swing Threads
  20. Old Course Website

Accomodations for Students with Special Needs

Students with disabilities are encouraged to contact me during the first two weeks of class regarding any special needs. Students with disabilities should also contact Disabled Student Services in the Ley Student Center and the Rice Disability Support Services.