[CS Dept logo]

[back] Com Sci 221 Programming Languages: course information


Goals of the Course

This course studies the issues that control the design of programming languages, the techniques that help to implement them, and the consequences of various design and implementation decisions for the programmer. Although much of the course material is presented in the form of case studies of various programming languages, the purpose of these case studies is not to learn to write code in a number of different languages. Rather, each language is used to illustrate some principles of design and implementation that are key to that language.

The design and implementation of a programming language each involves an immense number of separate but inter-related decisions. In order to think about a programming language, we must make many simplifying assumptions to limit the range of possibilities considered. Of course, the most important advances in programming languages result from changing the basic assumptions on which previous designs were based. One of the key intellectual challenges in this course is to assimilate a number of substantially different ideas of what a programming language is for, and to see the consequences of these different ideas for the designer, the implementer, and the user of the language.

At the end of the course, you should be able to assimilate rapidly information about any new programming language that you encounter (especially one that hasn't been invented yet), and make reasonable judgments about its tractability for implementation and its suitability for various tasks. You will not necessarily be ready to design your own programming languages, nor to implement interpreters and compilers, but you should be very well prepared for advanced courses on those tasks.

Prerequisites

You must have learned the essential skills of computer programming in Com Sci 106 or 116. The language in which you learned to program (106 uses Pascal, and 116 uses Scheme) is not important. What is crucially important is that you have acquired the skills of inventing algorithms to solve modest computational problems, and working rapidly from a manual for a new programming language to express algorithms in that language. 7 different programming languages are discussed in the text, with programming assignments in several of them. No lecture time can be allotted to coaching on the details of writing code, so you must be able to pick that up independently.

Course Work and Grading

Part I of the text is a motivational survey, and I skim it. I usually focus attention on Part II, chapters 3, 4, 7 and 8 in that order, with material from Part III drawn in from time to time. Lectures are complementary to, rather than a review of, the text. You are responsible for understanding the presentation in the text, as well as my different discussion of the same topics in class.

Homework is assigned approximately weekly, and the homeworks are essential coursework, constituting approximately 40% of the grade calculation. Homework involves independent problem solving, as well as assimilation of material. Homework is due at the beginning of class on the due date. I am very unfriendly to the practice of working on homeworks instead of coming to class. I am also very unfriendly to repeated lateness in handing in homework, other than for serious reasons such as illness. In particular, problems with the computer systems are not excuses for lateness on homeworks. There are always unanticipated problems with computer systems; part of your job is to schedule your work so as to allow for those problems. As long as lateness is very infrequent (less than one instance per person), I have no particular policy. If I sense that lateness is annoyingly frequent, I will declare a very draconian policy, or perhaps a draconic one.

There is a midterm exam sometime after the middle of February, and a two-hour final exam at the end of the course. Exam questions are shorter than homework questions, but they also require independent problem solving, as well as explanation of facts learned in the course. All exams allow open book and open notes.

In all of your work, strive for clarity and good signal-to-noise ratio, rather than writing a mass of material only some of which is relevant. Work is graded on its total value as a communication of technical ideas, not just on whether or not it contains correct information. In particular, programming assignments are judged for the insight that they yield to a human reader. Correct execution on examples is necessary, but far from sufficient, for a good grade. Intelligent selection of test cases is part of your responsibility in performing a programming assignment. I do not require that your format your homework discussions on the computer, but I recommend it strongly. If the clarity of your ideas is obscured by a sloppy layout, that will be reflected in your grade.

Electronic Communications

We make crucial use of two forms of electronic communication in CS221: the World Wide Web (WWW), and electronic mail.

You must check for new information in the WWW materials at least three times a week: on Tuesday, Thursday, and the weekend. I recommend that you check it daily, particularly the class discussion.

Outline of Topics

The following outline gives the approximate structure of the course material. The cited sections in the text from Chapters 1-8 are required independent reading, which you must do on your own initiative as these topics come up. The related material from Chapters 10-12 is more advanced optional reading which you may find useful and/or interesting. I will provide some other reading materials at appropriate times in class. The items below are not equal in weight --- the material of Chapters 1-2 goes by quite fast, then we take somewhat more time with the remainder.

  1. The idea of structure. The structure of an object is in its relations to other objects, rather than inherent. For programs, important relations come from modifications to the program as much as execution. (1.1-1.4 in the text)
  2. Syntactic structure, and its derivation from source text. (1.5, related material in Chapter 10)
  3. Expression evaluation as term rewriting. (2.1-2.6, 2.8, related material in Chapter 11)
  4. Basic set-theoretic constructions of types; their value and shortcomings. (2.7-2.8)
  5. Programming with assignments. Data types, control flow. (Chapter 3)
  6. Procedure declaration, call, and activation. (Chapter 4)
  7. Functional programming. Higher-order programming. Lazy evaluation. (7.1-7.4, 7.6)
  8. Type checking and type inference with polymorphic types. (7.5, related material in Chapter 12)
  9. Logic programming. (Chapter 8)

Maintained by Michael J. O'Donnell, email: [] odonnell@cs.uchicago.edu