Syllabus
CS 131: Programming Languages
Spring 2002
- Lectures:
- Section 1: Monday and Wednesday, 11:00-12:15, PA 2358.
- Section 2: Monday and Wednesday, 1:15-2:30, PA 1264.
- Web Page: http://www.cs.hmc.edu/courses/2002/spring/cs131/
- Office Hours/Tutoring: E-mail questions or comments can
be sent at any time. It is strongly suggested you send such messages to cs131help@cs.hmc.edu,
because it will go the entire staff and hence will get the quickest response.
However, if you would like to speak with someone in person, office hours will
be held as follows:
- Tuesdays
- 4--6pm, Chris Stone, Olin 1253
- 7--9pm, Steve Diverdi, Graphics Lab
- Thursdays
- 2--4pm, Chris Stone, Olin 1253
- Sundays
- 3--5pm, Elmer Kim, Terminal Room
- 6--8pm, Mira Stoilova, Terminal Room
You're also free to drop by the professor's office.
- Catalog Description: A thorough examination of issues and features
in language design and implementation including language-provided data structuring
and data-typing, modularity, scoping, inheritance, and concurrency. Compilation
and run-time issues. Introduction to formal semantics. Prerequisites: Computer
Science 70 and 80.
- Real Description: The goal of this course is to provide you with
a framework for thinking about programming languages. The course is not primarily
about programming (although there is a lot of this, and the course may well
affect the way you program); instead, we go "up a level" and view
not just particular programs but the languages themselves topics of study,
with parts one can tease apart and study in isolation.
You already had an introduction to this topic in CS 60, where you used four
languages representing at least four different approaches: Java for object-oriented
programming, rex for functional programming, Prolog for logic programming,
and ISCAL for low-level (assembly) programming. This course, however, has
a slightly different emphasis and uses what is sometimes referred to as the
language principles approach. By organizing lectures around key ideas
that recur in many different languages (and ignoring relatively unimportant
details like syntax), you should be able to better understand many more than
four languages, including ones that haven't even been invented yet. (Obviously,
if you actually want to write programs in, for example, the language Haskell,
details of syntax are absolutely critical!. However if after this course you're
told that Haskell is a statically scoped, polymorphically typed, higher-order,
lazy, purely functional language, you immediately have a huge head-start in
understanding the language.)
The reason why this course should matter (beside being intrinsically fascinating,
of course!) is that programming languages are ubiquitous in computer science.
There are always new languages being devised, of which a very few actually
become widely used; typically, these are specialized languages for particular
applications (e.g., Java or VRML). As a computer scientist, you must be able
to learn new languages as necessary, and the background you get from this
course should make this easier. A lesser number of you may design a programming
language yourself --- not necessarily a full-scale general-purpose language,
but perhaps a language for describing input to or configuration of another
program; this course should give you a better chance of avoiding common pitfalls
when doing so. We will also talk a little bit about implementation of languages
and how language design affects the implementation; if you are interested
in this aspect you should definitely take the Compiler Design course next
Spring which concentrates almost exclusively on implementation issues. Finally,
you will almost certainly have to choose which programming language to use
for a particular project. A final goal of this course is to give you enough
background in the study of programming languages that you can argue persuasively
why a particular language is appropriate (or inappropriate) for a particular
problem.
- Course mailing list: The course mailing list will be used
for announcements relevant to the entire class, some of which may be important.
It is your responsibility to regularly read these messages and to contact
the instructor if you are not on the list.
- Course materials: The primary source of information for
the course will be the lecture slides and periodic handouts. However, because
the programming assignments require the use of Standard ML, and the SML overview
in class will be fairly fast-pased, a few copies of the following book has
been made available at Huntley:
Elements of ML Programming (ML97 Edition), Jeffrey D. Ullman,
Prentice Hall, 1998.
Although there will be no required readings from this book, a reference for
the language (this or another) may well be helpful if you are having difficulties
with SML programming. A copy of this text is on reserve at the desk of Sprague
Library.
- Assignments and Grading: Homework assignments will be given
daily and/or weekly, and will generally be due at the beginning of a class
so that it can be discussed. Late assignments will not be accepted except
in very special cases where prior arrangements have been made with the instructor,
or in case of unforseeable crises like illness.
The course grade will be based on homeworks (60%), and an open-book/open-notes
final examination (20%), and in-class activity (20%). This last category includes
participation as well as in-class quizzes and exercises. There may also be
opportunities in the course for small amounts of extra credit, but this is
not guaranteed. Please note that the grade is highly homework-weighted and
it can be difficult to recover from a series of skipped homeworks. Do not
expect to wait until the end of the semester and hand in homeworks you skipped;
they will not be accepted.
The standard CS Academic Honesty Policy applies to this course, relaxed only
as follows: unless explicitly stated you are free to discuss a problem with
other students, and even hash out the general framework of a solution as
long as you explicitly cite this (limited) collaboration. However, the
actual work handed in must be entirely your own; as the honesty policy states,
you may not share code or other specific answers in any form. For group assignments,
this policy applies only to interactions between members of different groups.
- Main topics to be covered:
- Functional Programming in Standard ML
- Programs as Data (parsers, interpreters, ...)
- Languages as Data (language definitions, formal semantics, ...)
- Programming Language Principles (scope, types, abstraction, ...)
- Programming Paradigms (object-oriented, functional, imperative, ...)