Date: Wed, 20 Nov 1996 22:32:32 GMT Server: Apache/1.0.3 Content-type: text/html Content-length: 15646 Last-modified: Tue, 19 Nov 1996 05:01:05 GMT C311 Fall 1996

Indiana University Computer Science Department

C311 -- Programming Languages -- Fall 1996


General Information

Instructor
Christopher T. (Chris) Haynes, email chaynes@indiana.edu
Associate Instructor
Gustavo Gomez, email ggomezes@cs.indiana.edu
Credit Hours
4
Requirements
C335 (Prerequisite) and C343 (Pre- or Corequisite)
Lecture
Section 1139 meets Tuesday and Thursday, 2:30P to 3:45P in LH102
Discussion Sections
Office Hours
Tuesday
  • 1:30A to 2:30P in LH 230F (Chris Haynes)
  • 2:30A to 3:45P in LH 230F (Chris Haynes)
Thursday
  • 9:00A to 12:00A in LH230 (Gustavo Gomez)
  • 1:30A to 2:30P in LH 230F (Chris Haynes)
  • 2:30A to 3:45P in LH 230F (Chris Haynes)
Local newsgroup
ac.c.311
Web URL
http://www.cs.indiana.edu/classes/c311/


Catalog Description

Systematic approach to programming languages. Relationships among languages, properties and features of languages, and the computer environment necessary to use languages.

Overview

This course provides an introduction to the foundations of programming languages, allowing a thorough understanding of programming language semantics and critical implementation characteristics. This provides the basis for the best choice and use of existing languages, as well as language design.

Interpreters and other language-processing programs are used throughout to present the essential elements of programming languages in a precise, analytic, manner. The extensive use of interpreters in this course also develops skill in meta-linguistic abstraction -- a powerful programming paradigm.

To thoroughly understand programming languages (or most any topic), it is necessary to have a variety of models, or views, at varying levels of abstraction. In this course we will employ a range of models from very high-level (almost mathematical semantics) to very low-level (almost assembly language), and emphasize the connections between levels.

Scheme is used as a meta-programming language throughout the course, but this course is about fundamentals that are the basis for most programming languages, not just Scheme. Special attention will be given to modeling the semantics of the Java language via a series of type checkers and interpreters.

(A slide presentation, available in condensed form summarizes these points and others.)

Topics include


Materials

Required
Essentials of Programming Languages, by Friedman, Wand and Haynes. 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.
Recommended
The Little Schemer, by Friedman and Felleisen. This should also be available in the bookstores, and a couple copies are on reserve in the Swain Hall library. The Little Lisper is older, but similar.
Other
Other materials may be required through the semester. These materials will be announced in class and will be made available through the White Rabbit on Indiana (near Kirkwood) and will cost a few dollars to cover copying costs.


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). More material on Java will be made available later.

Links in the list below are to the lecture scripts.

Week of September 2
(Re)introduction to Scheme: EOPL preface and chapter 1, chapter 2 through section 2, and chapter 3 through section 3.
Week of September 9
Static Properties of Programs: EOPL, remainder of chapters 2 and 3.
Week of September 16
Quiz. Imperative programming: Chapter 4 sections 5 and 6. Simple interpreters: EOPL chapter 5 through section 2.
Week of September 23
Local binding, procedures, and assignment: EOPL, sections 5.3 through 5.5.
Week of September 30
Recursion and dynamic scope: EOPL, rest of chapter 5.
Weeks of October 7
Continuation-passing style: EOPL chapter 8 sections 1, 2, 3, and 5.
Week of October 14
CPS rules: EOPL chapter 8 sections 4, 7, and 8. First exam.
Week of October 21
Representation-independent interpreter, continuations as records, and reified continuations: EOPL sections 9.1 through 9.3. First-class continuations and exception handling.
Week of October 28
Imperative form and control stack architecture: EOPL sections 10:1 and 10:2, thoroughly.
Week of November 4
Environment stack architecture: EOPL, rest of chapter 10 for general information: not responsible for code details. Paramater passing: EOPL chapter 6; not responsible for material involving arrays.
Week of November 11
Second exam. Introduction to object-oriented programming and Java: EOPL section 7.1.
Week of November 18
Java programming tutorial. Static-methods-only Java type checker and interpreter.
Week of November 25
Thanksgiving break.
Week of December 2
More object-oriented programming, Java style: EOPL section 7.2 for general information. Also emphasis on the importance of virtual member functions in C++, as illustrated by virtual.C.
Week of December 9
Advanced Java topics.


Classes

Attendance at discussion sections is mandatory. Usually, 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!


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.

An assignment will usually be given each week. Assignments will be added to the list below by 5:00P on Friday and due before 5:00P the next Friday. Late assignments will not be accepted.

# Assignment Due Solution
1 Basic Scheme F 09/13 @ 5pm a1.ss
2 Static Properties F 09/20 @ 5pm a2.ss
3 Simple Interpreter F 09/27 @ 5pm a3.ss
4 Procedures and Assignment F 10/04 @ 5pm a4.ss
5 Recursion and Dynamic Scope F 10/11 @ 5pm a5.ss
- Exam in class on R 10/17, no assignment - solution
6 CPS Transformation F 10/25 @ 5pm a6.ss
7 CPS with Abstract Continuations F 11/1 @ 5pm a7.ss
8 CPS with Registers and Stacks F 11/8 @ 5pm solution
- Exam in class on R 11/14, no assignment - solution
9 Call by value/Call by reference T 11/26 @ 5pm -


Tools and Advise

Our web has information on use of Scheme at IU, including emacs support. We will be using a few Scheme extensions not mentioned in EOPL.

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 independently 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!


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