CSCI 312: Programming Language Design

General Information

Professor: Simon D. Levy
Lecture: MWF 2:30 - 3:25 PM
Parmly 405
Office: Parmly 407B
Office Phone: 458-8419
  Office Hours: MTWRF 11:15-12:10 and by appointment

Course Objectives

By the end of the course you will be able to

  1. Write nontrivial programs in Scheme (a dialect of LISP).

  2. Write simple programs in the languages ML and Prolog.

  3. Design your own programming languages and build interpreters for them.
We will start with a two-week "Scheme boot camp", and then move on to using the language to write interpreters in the remainder of the course. In the process of learning these very practical skills, you will gain familiarity with the some of the most beautiful and elegant ideas in computer science, which place the field at the center of a true liberal education.

Attendance and Preparation

It is very important that you attend class and participate in the discussion. Although I do not formally include attendance as part of your grade, we all know that students who attend class and come to office hours with questions do better than those who do not. If you do poorly on a test, for example, I am more likely to reduce the impact of that grade if it is obvious to me from your participation that you understood the material and merely had a bad day.


The grading scale will be 93-100 A; 90-92 A-; 87-89 B+; 83-86 B; 80-82 B-; 77-79 C+; 73-76 C; 70-72 C-; 67-69 D+; 63-66 D; 60-62 D-; below 60 F.

Honor System

The exams and quizzes will be done without books or notes and without assistance from other people. You can discuss your programming assignments with other students in the class, but you should not share code. Talk to me before asking another student for help!


Washington and Lee University makes reasonable academic accommodations for qualified students with disabilities. All undergraduate accommodations must be approved through the Office of the Dean of the College. Students requesting accommodations for this course should present an official accommodation letter within the first two weeks of the (fall or winter) term and schedule a meeting outside of class time to discuss accommodations. It is the student's responsibility to present this paperwork in a timely fashion and to follow up about accommodation arrangements. Accommodations for test-taking should be arranged with the professor at least a week before the date of the test or exam.

Assignments (Problem Sets)

The computers in the CS Department should all have Dr. Scheme (a.k.a. PLT Scheme, a.k.a. Racket) installed, but I encourage you to download it onto your laptop or home computer and work on these assignments anywhere you like. Scheme is a simple, elegant language that encourages working on problems in small pieces, so it's convenient to have Dr. Scheme available any time you get inspired to do a little coding. Assignments are due at midnight of the due date, and should be sent to me as email attachments. Experience has taught me that the students who do best in this course are the ones who take advantage of office hours for help with assignments.

Also, note that shoddy work unacceptable in this class. As in the real world, what matters is whether your code works, not how much effort you put into it. If I load your assignment into Dr. Scheme and immedately get any kind of error (like a syntax error), you will get a zero on the entire assignment. It's better to comment-out broken or untested code than to risk this kind of error. Once you're ready to email me your assignment, quit and relaunch Dr. Scheme and load and test your assignment one final time, and make sure the attachment you send me is the one you want me to grade. To be extra careful, you could even send the assignment to yourself first, then download and test the attachment in a new directory, and then forward the email to me once you're sure your code works.

  1. Problem Set 1 (due Mon 01 Oct):     lunar.scm (download and rename ps1_yourname.scm)
  2. Problem Set 2 (due Wed 10 Oct)
  3. Problem Set 3 (due Wed 24 Oct)
  4. Problem Set 4 (due Wed 07 Nov):    code (download and rename ps4_yourname.scm)
  5. Problem Set 5 (due Fri 16 Nov):    code (download and rename ps5_yourname.scm)
  6. Problem Set 6 (due Fri 07 Dec)

Tentative Schedule of Lectures and Exams





03 Sep
Week 0
    Course Overview;
Introduction to PL'S;
PL's vs. Natural Languages

10 Sep
Week 1
History of PL's;
Intro. to Scheme
Scheme: Lists + Recursion;
Programs as Proofs
Data Structures in Scheme

17 Sep Week 2
Chapter 1: Inductive Sets of Data Quiz, Little Schemer Ch. 1-4

Chapter 1: Scoping and Binding of Variables
Chapter 1:
Scope & Lexical Address

24 Sep
Week 3
Chapter 2, Section 1: Specifying Data via Interfaces Quiz, Little Schemer Ch. 5-8

2.2: Data Abstraction

01 Oct
Week 4
PS 1 due

2.2: Data Abstraction 2.2.2: Abstract Syntax

08 Oct.
Week 5
2.3: Representation Strategies for Data Types PS 2 due

Quiz, Chapter 1

3.1: A Simple Interpreter
Reading Day; No class

15 Oct
Week 6
3.2: Interpreter Front-End 3.3 Interpreter: Conditionals
3.4: Local binding
Quiz, Chapter 2

3.5 Interpreter: Procedures

22 Oct
Week 7
3.6: Interpreter: Recursion
PS 3 due

29 Oct
Week 8
3.7: Interpreter: Variable Assignment;

Review Chapter 3

05 Nov
Week 9
Exam #1: Chapter 3 Chapter 5: Objects and Classes

5.1-5.2: OOP, Inheritance
5.3 The Language
5.4.1 Implementation

PS 4 due

4.1: Typed Languages

12 Nov
Week 10
4.1: Typed Languages Quiz, Chapter 5

4.2: Type Checking
4.4: Type Inference

PS 5 due

26 Nov
Week 11
Intro to ML ML: Type variables;
let; polymorphism
Into to Prolog

03 Dec
Week 12
Prolog: Lists;
Anonymous Variables,
Review Exam #2

PS 6 due

Scheme, LISP, and Hacker Folklore