Course materials

CSC 242

Theory of Programming Languages

Fall 2025

01 · Syllabus

Course information and policies

InstructorQixin Deng

Email[email protected]

OfficeGoodrich Hall 108

Office hoursMonday/Wednesday, 10:00 AM–5:00 PM; appointment required after 5:00 PM

Meeting timeT/Th, 2:40–3:55 PM

LocationGoodrich Hall 101

Course Description

This course examines the design, implementation, analysis, and classification of programming languages. Using Racket and Haskell, students study functional programming and approach language design from a creator’s perspective, connecting formal principles to modern language features.

Reference Notes & Platforms

Course programming uses Racket and Haskell. The official Racket and Haskell documentation serve as the primary references, with DrRacket and the Haskell toolchain used for guided practice.

Course Goals

  • Compare programming paradigms and use syntax, grammar, parse trees, abstract syntax trees, and lambda calculus to analyze programs.
  • Develop recursive, higher-order, and type-safe functional solutions while studying streams, backtracking, and macros.
  • Understand strong and weak typing, static and dynamic typing, algebraic data types, polymorphism, and type classes.

Assignments

Ten assignments contain programming questions across the semester. All work must be submitted on time; late submissions are not accepted.

Grading

Assignments constitute 50% and exams constitute 50% of the final grade. Standard letter-grade thresholds begin with A at 93, A− at 90, and B+ at 87.

Class Rules

The classroom must remain respectful and free of discrimination, bullying, and other harmful conduct. Violations are addressed through course and college procedures.

4th Hour

Seven guided virtual labs in Racket provide seven fourth-hour sessions, and seven guided virtual labs in Haskell provide seven sessions. Together they account for fourteen structured hours outside regular class meetings.

About AI

AI can be a useful assistant when used reasonably, but it must not replace a student’s thinking. Assignments must be completed independently. Students should understand and be able to reproduce and explain all submitted work; significant inconsistencies may require an in-person demonstration and may be reported under academic-integrity procedures.

02 · Contents

Course content

01

Racket Fundamentals

DrRacket, programs and expressions, definitions, style, conditional expressions, compound data, modules, and testing.

02

Haskell Fundamentals

Core data types, lists, tuples, operators, conditionals, functions, type classes, custom types, and type variables.

03

Languages, Syntax & Semantics

Imperative and functional paradigms, side effects, purity, grammars, parse trees, abstract syntax trees, denotational semantics, and operational semantics.

04

Lambda Calculus

Syntax, free and bound variables, beta-redexes, substitution, beta-reduction, and the relationship between lambda expressions and computation.

05

Recursion & Pattern Matching

Recursive datatypes, structural recursion over lists, tail calls, tail-call optimization, pattern matching, and recursive problem solving.

06

Higher-Order Functions

Map, filter, folds, composition, currying, partial evaluation, apply, closures, and functions that return functions.

07

Scope & Evaluation

Global and local bindings, lexical and dynamic scope, strict and non-strict evaluation, delayed evaluation, and evaluation order in Racket and Haskell.

08

Objects & Macros

Classes as higher-order functions, methods, self-reference, symbols, pattern-based macros, macro rules and ellipses, and AST-based transformations.

09

Streams, Continuations & Backtracking

Lazy and infinite streams, generators, ambiguous and nondeterministic expressions, continuations, local mutation, choices, predicates, and backtracking.

10

Type Systems

Strong and weak typing, static and dynamic typing, algebraic data types, parametric polymorphism, type classes, and ad-hoc polymorphism.

11

Functors & Monads

Functorial mapping, Option, Either, and List as monads, failure representation, lifting, state, mutation in pure functional programs, and the IO monad.

12

Functional Program Design

Constructing type-safe Racket and Haskell solutions while reasoning about correctness, abstraction, composition, and programming-language design.

03 · Exam preparation

Exam requirements

Gentleman’s Rule

The student is expected to conduct himself, at all times, both on and off the campus, as a gentleman and a responsible citizen.

Exam Rules

  1. This is a closed-book exam with only a pen (no pencil) and exam paper on your desk. No calculators allowed. No outside aids or resources are allowed.
  2. Final exam will be 2 hours, other exams will be using regular class time. Please arrive on time. Late students will not be compensated for their time.
  3. You are responsible for the clarity of your own handwriting. If I cannot recognize your handwriting, you will lose points.
  4. All cell phones and other electronic devices must be turned off.
  5. If you need to use the bathroom during the exam, you need to put your cell phone on the front desk.
  6. You are not allowed to communicate with any other people (other than the professor) while taking this exam.
  7. You may not share, disseminate, or discuss these questions with any other student in another section of this course who has not taken the exam yet; doing so is considered academic dishonesty and will lead to nullification of exam grades.
  8. There will be no tolerance towards academic dishonesty, and cheating can and will lead to automatic failure from the class as well as a report to the Academic Integrity Committee.

Exam Commitments

I will complete this exam in a fair, honest, respectful, responsible, and trustworthy manner. This means that I will complete the exam as if the professor was watching my every action. I will act according to the professor’s instructions, and I will neither give nor receive any aid or assistance other than what is authorized. I know that the integrity of this exam and this class is up to me, and I pledge not to take any action that would break the trust of my classmates or professor, or undermine the fairness of this class.

Midterm PreparationDate: October 14, 2025Location: In class+
Final Exam PreparationDate: December 16, 2025 · 1:30–3:30 PMLocation:+

04 · Assignments

Practice questions

Open each assignment to work directly from the original Racket, Haskell, formal-language, and type-system questions.

Assignment 01+

Loading questions…

Assignment 02+

Loading questions…

Assignment 03+

Loading questions…

Assignment 04+

Loading questions…

Assignment 05+

Loading questions…

Assignment 06+

Loading questions…

Assignment 07+

Loading questions…

Assignment 08+

Loading questions…

Assignment 09+

Loading questions…

Assignment 10+

Loading questions…

05 · Projects

Project materials