CSCI 312: Programming Language Design

CSCI 312: Programming Language Design

General Information

Professor: Simon D. Levy
Lecture: TR 2:30-4:05
Leyburn 223
Office Hours: MWF 2:00-4:00 and by appointment

Zoom meetings are the preferred way to meet for office hours, but I am happy to meet in person given enough notice.


Friedman, Wand, and Haynes, Essentials of Programming Languages, 2nd edition.  Although  the 3rd edition is the only one currently in print, I have found the 2nd edition much more readable.  You should be able to find it online.

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 OCAML and Prolog.
    3. Design your own programming languages and build interpreters for them.
    4. Deal with intermittent 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, with brief detours into some interesting real-world programming languages. 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 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 given, without a note from the Dean’s office. You will get no credit for an assignment emailed to me, or submitted through anything other than github.

The best way to avoid the “But the program worked when I ran it!” problem is to submit your code early to github, download it from github into an empty folder, and run it yourself.


    • Problem sets (written exercises and coding): Though there is no official lab for this course, you will spend much of your time programming (50%).
    • Two ninety-minute exams (30%).
    • Comprehensive final exam (20%).

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 Title IX Coordinator and Director of Disability Resources, Elrod Commons 212, (540) 458-4055. Students requesting accommodations for this course should present an official accommodation letter within the first two weeks of the 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 must be arranged with the professor at least a week before the date of the test or exam, including finals.

Programming assignments

    • All assignments will be due via github at 11:59pm on the date posted.
    • No late work will be accepted, or make-up exams given, without a note from the Dean’s office. You will get no credit for an assignment emailed to me, or submitted through anything other than github.

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.

Final Exam

The final exam for this course will be given during the final exam week. You can take this exam during any of the regularly scheduled exam periods that week. You must supply an exam envelope to the instructor or the department administrative assistant no later than noon on the last day of class. You must specify a provisional day and time on the envelope, which you are free to change on the clipboard provided outside the door of Parmly 407 any time that week. Email or phone requests to reschedule will not be accepted.

The exam will be given in Parmly 405, and you should arrive promptly before the appointed time. If you are more than 15 minutes late, you will have to reschedule your exam. If you are more than 15 minutes late to the last exam period on Friday morning, you will receive a grade of 0 on your exam.

Students who have approved academic accommodations must make arrangements to use those accommodations directly with the instructor no later than the last day of class. Students approved for extra time will receive that time at the tail end of the morning exam period or before the beginning of the afternoon exam period (for example, ending at 1:30 PM for a morning exam or beginning at 12:30 PM for an afternoon exam). Students approved for a low-distraction testing location should reserve that space during the last week of classes (following instructions distributed by Director of Disability Resources Lauren Kozak.






19 Jan Week 1

Course Overview;
Introduction to PL’S;
PL’s vs. Natural Languages

if __name__ == ‘__main__’:
main() # why make this a function?
Course Overview;
Introduction to PL’S;
PL’s vs. Natural Languages

26 Jan
Week 2

History of PL’s;
Intro. to Scheme
Scheme: Lists + Recursion;
Programs as Proofs
Data Structures in Scheme

02 Feb Week 3

Chapter 1: Inductive Sets of Data

Chapter 1: Scoping and Binding of Variables

Chapter 1:
Scope & Lexical Address
Due: PS1


09 Feb Week 4

Chapter 2, Section 1: Specifying Data via Interfaces  

2.2: Data Abstraction


16 Feb
Week 5

2.2: Data Abstraction

2.2.2: Abstract Syntax

2.3: Representation Strategies for Data Types

Review for Exam #1

Due: PS2

23 Feb
Week 6

Exam #1  

3.1: A Simple Interpreter


02 Mar
Week 7

Winter Break day; no class 3.2:  Front-End

3.3 Conditionals




Due: PS3


09 Mar
Week 8

3.4: Local binding 3.5 Procedures

3.6: Recursion


16 Mar
Week 9


3.7: Variable Assignment

Analyzing the State Behavior of Programs

Review Chapter 3

23 Mar
Week 10

Exam #2


Due: PS4


Chapter 5: Objects and Classes

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



30 Mar
Week 11

4.1: Typed Languages 4.2: Type Checking






06 Apr
Week 12


4.4: Type Inference

Due: PS5


Intro to Haskell

More Haskell

CAML Trading

Don’t Fear the Monad

A Gentle Introduction

Learn You a Haskell


Review for final exam

13 Apr Finals Week


Due: PS6


Haskell Lectures:


Types and Functions



Strings and Tuples

Higher-Order Functions


Algebraic Data Types

Records and Types Classes

IO and Side Effects

Text File and Random Numbers