CSCI 312: Programming Language Design

General Information

Professor: Simon D. Levy
Lecture: MWF 2:30 - 3:25 PM
Parmly 405
Office: Parmly 407B
  Office Hours: MTWRF 2:30-4:30 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.

  4. Deal with failure and frustration as unavoidable waypoints on the path to success.
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.


At this point in your CS career you probably realize that what matters most is the quality of the work (software) you create and the impression you make as a serious student and software professional. Hence:

  1. If your code produces a fatal error in Dr. Racket (or whatever interpreter we're using), you'll get a zero on the entire assignment.

  2. No late work will be accepted, or make-up exams or quizzes given, without a note from the Dean's office.
The best way to avoid the “But the program worked when I ran it!” problem is to submit your code early to sakai , download it from sakai into an empty folder, and run it yourself.


These percentages are flexible. If you have a bad day and don't do well on an exam or assignment, I will try and weight your other work more heavily.

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.

Programming assignments

Programming assignments should be submitted through your dropbox on Sakai. Each assignment is due 11:59 PM on the day posted.

The computers in the CS Department should all have Dr. 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. Racket available any time you get inspired to do a little coding. Experience has taught me that the students who do best in this course are the ones who start the assignments early and take advantage of office hours for help.

  1. Problem Set 1 (due Mon 06 Oct):     lunar.scm (download and modify)
  2. Problem Set 2 (due Wed 15 Oct)
  3. Problem Set 3 (due Fri 31 Oct)
  4. Problem Set 4 (due Wed 12 Nov)     code
  5. Problem Set 5    (due Fri 21 Nov) code
  6. Problem Set 6    (due Fri 12 Dec)

Tentative Schedule of Lectures and Exams





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

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

22 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

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

2.2: Data Abstraction

06 Oct
Week 4
PS 1 due

2.2: Data Abstraction 2.2.2: Abstract Syntax

13 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

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

3.5 Interpreter: Procedures

27 Oct
Week 7
3.6: Interpreter: Recursion
Class canceled

PS 3 due

03 Nov
Week 8
3.7: Interpreter: Variable Assignment;

Review Chapter 3

10 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

17 Nov
Week 10
4.1: Typed Languages 4.2: Type Checking
Quiz, Chapter 5

4.4: Type Inference

PS 5 due

01 Dec
Week 11
Intro to ML

CAML Trading
ML: Type variables;
let; polymorphism
Into to Prolog

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

PS 6 due

Scheme, LISP, and Hacker Folklore