CMSC 245: Principles of Programming Languages
Instructor:
David Wonnacott
Semester & Year:
Fall 2007
Schedule:
Lecture TTh 1:00-2:30,
Lab initially scheduled Friday 2:30-4:00, but will probably be moved
(e.g. to 2:00-3:00, if enrollment permits a single hour session)
to avoid the conflict with CMSC 325.
Lecture and lab will both be held in KINSC Hilles 110 (the CS teaching lab)
Required Texts:
"Programming Language Pragmatics",
by Michael Scott
(no, not that Michael Scott)
"The Haverford Educational RISC Architecture"
by
David Wonnacott
(this booklet is available with a nice cover at the Haverford book store
(the lulu.com version,
but without the shipping cost)
or you can print your own (without the cool cover) from the
HERA web
site).
Also Recommended:
"Programming Languages: Principles and Practice",
by Kenneth C. Louden
has good, but different, coverage of most topics in this course.
I'll try to have a copy in the lab and one on reserve in the library.
We will refer to Stroustrup's
"The C++ Programming Language"
as a reference to C++.
The online version of
Chapter 2
of this book covers much of what we will discuss.
The
Revised(5) Report on the Algorithmic Language Scheme
will be used as a reference for the Scheme language
(we will start with the section on
"Expressions").
Chapters 1 and 2 of Abelson & Sussman & Sussman's classic
"Structure and Interpretation of Computer Programs"
might also be helpful for learning Scheme.
This is really a full introduction to computer science with Scheme.
It has a lot of examples that presume a background in math
(such as taking derivatives), and is rather scheme-centric,
but other than that, is an excellent book.
It was one of the main inspirations for many of the things we do in
CMSC105.
Noah also recommends (in addition to Abelson & Sussman & Sussman),
What Made Lisp Different
as a comparison of Lisp (and Scheme) to the traditional approach to
language implementation.
Requirements:
Midterm and Final exam, weekly programming projects and homeworks.
Collaboration:
You are encouraged to discuss the lecture material and the weekly labs
and problems with other students, subject to the following
restriction: the only "product" of your discussion should be your
memory of it - you may not write up solutions together, or exchange
written work or computer files.
Collaboration is not allowed on exams.
Prerequisites:
CMSC 206
Description:
This course will introduce many of the principles of programming language
design and implementation.
We will discuss numerous features of several programming languages
and the algorithms and data structures that are needed to provide these features.
Labs will emphasize the use of various features, and written homework
will focus on high-level understanding the algorithms and data
structures involved.
CMSC 350, Compiler Design, provides more
in-depth information about some of these algorithms and data
structures by studying their application to a single simple language.
Lectures (and labs) will include examples (and exercises) in C++, the Scheme
dialect of Lisp, and HERA assembly
language. No prior knowledge of C++, Scheme, HERA is needed for this
course, but students should be familiar with the programming techniques from
CMSC 205/ 206
(e.g. creation of classes and functions/methods).
CMSC245 should include as many of the following topics as we can cover:
- languages, interpreters, compilers, and libraries
- lexical and syntactic analysis
- support for language features:
- evaluation of arithmetic expressions
- type systems and type checking
- control flow (conditional statements and loops)
- function calls and exception handling
- allocation of, and access to, storage for variables
- data encapsulation
- overloading of function names and operator symbols
- inheritance and dynamic binding
- functions as arguments and return values from other functions
- memory management and garbage collection
- coroutines
- concurrent programming
- logic programming
- formal semantics (operational, denotational, and axiomatic semantics)
Lab assignments include occasional brief in-class group programming
exercises and weekly projects:
- Lab 0: Programming in C++, Scheme, and
HERA.
- Lab 1: Data Structures in C++ and Scheme.
- Lab 2: Translating (some) Scheme Expressions.
- Lab 3: Translating Let expressions
- Lab 4: Lexical Scoping
- Lab 5: An Object-Oriented AST
- Lab 6: Reference Counting (Optional in 2007)
- Lab 7: Advanced Functional Programming
The current draft of the
course syllabus is available.