C311/H311/A596: Programming Languages (Spring 98)

Indiana University, Computer Science Department


General Information

Instructor
Benjamin C. Pierce, email pierce@cs.indiana.edu
Associate Instructor
Michael Levin, email milevin@cs.indiana.edu
Credit Hours
4
Requirements
C335 (Prerequisite) and C343 (Corequisite)
Lecture
Sections 1162 (C311 and H311), and 1135 (A596) meet TR 2:30P-3:45P in BH340
Discussion Sections
Office Hours
Monday
  • 11:00A to 12:00A in LH 201I (Michael Levin)
Tuesday
  • 1:10P to 2:10P in LH 201C (Benjamin Pierce)
Thursday
  • 11:00A to 12:30P in LH 201I (Michael Levin)
  • 1:10P to 2:10P in LH 201C (Benjamin Pierce)
Newsgroup
ac.csci.c311
Web URL (this document, updated throughout the semester)
http://www.cs.indiana.edu/classes/c311/


Textbooks

Required
Essentials of Programming Languages, by Friedman, Wand, and Haynes. (MIT Press, ISBN 0-262-06145-7.)
This text, known hereafter as EOPL, should be available in any of the three big textbook bookstores (T.I.S, Aristotle's, or the I.U. Bookstore), but you may get it cheaper if you can find a grad or undergrad student who's taken C311 or C511 and is willing to part with it.

The Java Programming Language, by Arnold and Gosling, second edition. (Addison-Wesley, ISBN 0201310066.)
The standard, basic reference on the Java language. Copies have just been ordered at the bookstore because a new edition (for Java 1.1) just came out. We won't need it until later in the semester.

Recommended
The Little Schemer, by Friedman and Felleisen. (MIT Press ISBN 0-262-56099-2.)
This should also be available in the bookstores, and a couple copies are on reserve in the Swain Hall library. Some students have difficulty in this course because they have not mastered recursion. This little book is an excellent self-help solution to this problem.

The Scheme Programming Language (2nd edition), by Dybvig. (Prentice Hall, ISBN 0-13-454646-6.)
A standard reference on Scheme programming.


Syllabus

Read the indicated material for each week before the week begins! You are not expected to understand the material on first reading, but having read it once first you will be much better prepared for class and discussion sections. Read the material for the first two weeks in the first week (much of it should be review).

The following syllabus is still tentative and incomplete. Adjustments will be reflected on this page as we go.

Jan 13: Administrivia. (Re)introduction to Scheme: EOPL Foreward, Preface, Chapter 1 (skim for review), Sections 2.1 and 2.2
Jan 15: Scheme: Rest of Chapter 2
Jan 20: Static properties of programs (guest lecture): Chapter 3
Jan 22: Scheme quiz
Jan 27: Simple interpreters: 4.5, 5.1, 5.2
Jan 29: Local variables and procedures: 5.3, 5.4
Feb 3: Assignment and recursion: 5.5, 5.6
Feb 5: Assignment and recursion
Feb 10: Dynamic scope: rest of Chapter 5
Feb 12: Garbage collection (no reading)
Feb 17: Continuation-passing style: 8.1, 8.2
Feb 19: Continuation-passing style
Feb 24: Review
Feb 26: First exam (covering EOPL chapters 2, 3, and 5) (Sample exams: Fall 1995 and Spring 1997)
Mar 3: Data structure representations of continuations: 9.1
Mar 5: The continuation-passing interpreter: 9.2
Mar 10: Imperative form and control stack architecture: 10.1, 10.2
Mar 12: Imperative form and control stack architecture: skim rest of chapter 10
Mar 17: Enjoy spring break!
Mar 19: Spring break
Mar 24: Review
Mar 26: Second exam (covering all EOPL readings) (Sample exam: Spring 1997)
Mar 31: Origins of object-oriented programming
Apr 2: Object-oriented programming Chapter 3 up to 3.8, concentrating on 3.1, 3.4, 3.6, 3.8
Apr 7: Classes and inheritance Sections 3.8, 3.10, 3.11
Apr 9: Java type system Chapter 4, Section 5.8
Apr 14: Access control, interfaces
Apr 16: Inner classes 5.14, 2.12 (if you're interested in the full details of inner classes, check out the official specification)
Apr 21: Anonymous classes; packages; threads Chapter 10; start on Chapter 9
Apr 23: Concurrent programming 9.1-9.6, 9.8
Apr 28: Concurrent programming
Apr 30: Review for final

May 5: Final exam 5-7PM.

Assignments

For the most part, assignments will be handed in by email to an automatic checker with feedback emailed back almost immediately. Assignments may be prepared on the system of your choice, but should run properly using Chez Scheme version 5. Homework will be graded by hand, but the automatic checker will detect some errors.

You are welcome (in fact, encouraged) to collaborate with others in the class, tutors, etc., but in every case, if you have received help on an assignment from anyone other than the instructor or associate instructor of the course, their names should be indicated at the beginning of the assignment. Though you are encouraged to work on assignments in groups, each individual is responsible for submitting their own copy of each assignment.

An assignment will usually be given each week. Late assignments will not be accepted.

# Assignment Due Solution
1 Basic Scheme T 1/20 @ 11:59pm Our solution
2 Static Properties T 1/27 @ 11:59pm Our solution
- Scheme Quiz - Our solution
3 Simple Interpreters T 2/3 @ 11:59pm Our solution
4 Procedures and assignment T 2/10 @ 11:59pm Our solution
4 honors Reduction T 2/10 @ 11:59pm Our solution
5 Recursion and dynamic assignment R 2/19 @ 11:59pm Our solution
6 Continuation passing style T 2/24 @ 11:59pm Our solution
6 honors Garbage collection T 3/3 @ 11:59pm Our solution
7 Data structure representations of continuations T 3/10 @ 11:59pm Our solution
8 CPS with registers and stacks W 3/25 @ 11:59pm Our solution
8 honors First class continuations T 3/24 @ 11:59pm Our solution
9 Scheme interpreter in Java W 4/4 @ 11:59pm Our solution
9 honors Trampolining W 4/4 @ 11:59pm Our solution
10 Inheritance in Java T 4/16 @ 11:59pm Our solution
11 Classes, interfaces, overloading T 4/21 @ 11:59pm Our (partial) solution
12 Java threads F 4/1 @ 11:59pm -


Tools and Advice

Attendance at discussion sections is mandatory. Often a problem or set of problems will be given out at the beginning of discussion section and the class will be broken up into small groups to solve the problems. The AI leading the discussion section will go between groups answering questions and asking questions about the work done so far and about the class material. Your answers to these questions, and your progress on the problems given in discussion section, will count toward your final grade.

Some lectures may also be conducted in this manner, and some other lectures will present material not found in the book. Don't miss class!

Our web has information on use of Scheme at IU, including emacs support.

Points will be deducted on the homework, quiz, and exams if the cardinal rules of indentation are violated, so make it a habit to follow them whenever you write Scheme code. This will greatly aid your Scheme programming.

Though emacs is a big help, it is strongly suggested that you write solutions to all exercises by hand and check them carefully for correctness before approaching a computer. This will give you practice at indentation by hand (which is necessary for exams) and, more importantly, it is in most cases much easier to find mistakes in this course's exercises by thinking about them than by debugging.

The assignments don't count a whole lot toward your grade, but extensive experience has shown that students who do not make a serious effort to do the assignments do poorly on exams. Experience has also shown that if most students spent much more time with paper and pencil before approaching a computer, they would spend much less time debugging, and better understand their programs. An hour with a pencil is often worth several at the keyboard!

If you're having difficulty, don't hesitate to see the instructor or AI during office hours. If these times are not convenient, see us after class or discussion, or contact us by email or phone, to set up another time. We're here to help you!


Grading

The following is a tentative schedule for evaluation, with approximate percentage contributions to the final grade.

The sample exams are provided only to provide a general idea of what to expect. The content of the course this semester differs somewhat, especially after the second exam.


Administrivia

Incompletes
An incomplete (I) final grade will be given only by prior arrangement in exceptional circumstances conforming to departmental policy in which the bulk of course work has been completed in passing fashion.
Academic integrity
For your ethical pleasure, you should read the Computer Science Department statement on academic integrity. It's dry, but important.

Course Evaluation

Before the end of the semester, please complete the electronic Course evaluation forms for Benjamin Pierce and your discussion section AI, Michael Levin.


C311/H311/A596: Programming Languages (Spring 98)
(pierce@cs.indiana.edu)