Instructor: Prof. Seth Fogarty Email: sfogarty@trinity.edu
Office: CSI 270M Office Hours: See webpage
Meets: TuTh 2:10-3:25 Room: CSI 388
Join the Github Classroom
This is a programming-intensive course exploring programming languages from a high level, theoretical, view. The course covers parsing, representation, and semantics for imperative, functional, and object-oriented languages. Students will collectively design a growing mongrel language incorporating each style, and over the course of the semester write and extend interpreters for the language. We will use Haskell as the host language, and take advantage of high-level tools to aid the process. Principles of Data Abstraction and Principles of Functional Programming are prerequisite, and Discrete Structures is highly recommended.
This course will compare the major classes of programming languages and describe their techniques, features, and styles. You will learn how to select an appropriate programming language for a particular task, read a formal specification of a language, and implement language interpreters. The course centers around four powerful ideas:
Recursion
Abstraction
Transformation
Unification
Here are some of the topics we will cover during the course.
Models of Computation and Associated Programming Paradigms
von Neumann and imperative languages: C-like languages
Lambda calculus and functional languages: Lisp, Haskell
Message passing and object-oriented languages: Smalltalk, Java
Parsing, with a focus on LR Parsing
Semantics and their Implementations
Parameter Passing Styles
Variable Binding
Function Closures
State
Objects
If time permits, we will also discuss:
Hindley-Milner Type Checking
Basic code generation
Unification as a model of computation
Logical languages like Prolog
As the course concerns the collective creation and implementation of a new programming language, we will also co-create the course itself. Students will not only develop an interpreter, but will explore chosen topics, create activities, and take ownership over parts of the course. This will be manifest in the following ways:
The syntax and (to the extent practical) semantics of the programming language will be decided on by the consortium of language developers (the students).
Throughout the course, the class will create a shared database of notes. Lecture notes will be divided amongst the class to be taken and transcribed throughout the semester.
At least once during the semester, each person is expected to delve into some topic and expand the notes. This may be by doing a small amount of research and writing a summary, by developing and writing up an example to explain a concept, or by bringing in appropriate knowledge from other courses.
This course will focus on qualitative, not quantitative, assessment. Materials will not be graded, but reflected upon. The final grade relies on completion of course activities and self-evaluation. Because of the structure of the course, different concepts will be evaluated in several ways:
The details of parsing and evaluating the language will be well-emphasized in writing the interpreter. These will be self-evaluated through brief written reflections on the process of implementing the language and the resulting interpreter itself.
Some theoretical concepts will be adequately covered through the interpreter project, and will be evaluated by separate questions on the written self-evaluations.
Other concepts, which are not touched upon by the semester-long project, will have in-class activities followed by individual assessments. These assessments will then have their own self-evaluations. In some cases additional assessments can be made available to help reinforce a topic. These individual assessments take the place of, and have similar questions to, traditional quizzes or exams.
Half of the final grade is based on the interpreter project, while the other half is based on your participation and the individual assessments. Your grade for each component is primarily derived from the self-evaluations, although I reserve the right to modify the grade if I feel it is necessary. The following are my expectations for the different grade marks:
A - Complete all versions of the interpreter with minimal bugs. Contributed well-written class notes and added a detailed and understandable "delve" into a topic. Could solve the individual assessments with only a few mistakes, rarely relying on notes.
B - Complete v3 version of the interpreter, but some features are buggy or missing. Contributed good-faith class notes, and added an readable "delve" into a topic. Could solve most of the individual assessments, but require a few revisions or extensive reference to the notes. Reviewed and reflected on mistakes.
C - Completed most versions of the interpreter, with some buggy features. Contributed an outline of class notes and a minimal "delve." Would still struggle to complete the individual assessments.
D - Engaged with the course for the entire semester.
F - Failed to engage with the course.
The intention of this grading format is to reduce anxiety, not increase it. If that turns out not to be the case, please talk to the professor.
Students are expected by abide the Trinity University Honor code, which forbids unauthorized collaboration or assistance. Collaboration is explicitly authorized. You are allowed to use LLMs in this course, but should cite them thoroughly.
Students are expected to attend class regularly. Students who will miss class should contact me before their absence, and complete all assignments ahead of time.
In line with the Trinity University policy on equal access and equal opportunity, this course will be made accessible to all students. Any student who feels they may need accommodations based on the impact of a disability or long illness should contact me and the office of Disability Student Services to discuss your specific needs. Any student who feels they may need accommodations due to remote learning, technology, environment, or other issues should contact me.
The outline and topics of this course are inspired by CS 440 at IIT, as taught by Mattox Beckman.