CS534: Types and Programming Languages, Spring 2024

Instructor: Stefan Muller,
Lectures: Tue., Thur. 10:00-11:15, Stuart 104
  • Section 01: In-person class
  • Section 02: In-person class, PhD qualifier section
  • Section 03: Online

Course Description     Schedule     Resources     Policies    


Course Description

Many useful features of modern programming languages, such as anonymous functions (lambdas), generics, and ownership, have arisen out of research into the fundamentals of programming languages. This course will introduce students to those fundamentals: students will learn the tools and techniques used by programming languages researchers to model programs, type systems, and the design choices made in the creation of programming languages. There will be a particular focus on type systems, which provide many programming languages with a certain guarantee of runtime safety: usually that type errors will not occur at runtime, but more advanced type systems can guarantee information security, data-race-freedom and many other desirable properties. Students will see how type systems are designed, and how these safety properties of typed programs are proven. The course will also explore some applications of type systems in modern programming language research and practice.

Prerequisites: CS430 with a grade of C or better. If you have credit for CS440 or CS536 but not CS430 and are interested in the class, contact the instructor.

Advanced undergraduate students are welcome to take this class, but need permission to register.

Textbook: The lectures should be self-contained and notes will be provided, but much of the material will be drawn from the following book, which is recommended as a reference (there is an online preprint):

Robert Harper, Practical Foundations for Programming Languages (Second Edition), Cambridge, 2016.

We may also take some topics from the following book, which is a useful reference (but probably not worth buying unless you think you will want to refer back to it later):

Benjamin C. Pierce, Types and Programming Languages, MIT, 2002.

Course Objectives: After completing this class, students should be able to:

  • Understand the models, notations and techniques used by Programming Languages researchers to formalize languages and systems.
  • Formally prove properties about programming languages and programs.
  • Use the above techniques to design new type systems and models to formalize and prove properties about new and existing language features and systems.
  • Read and understand professional literature in the field of Programming Languages.

Schedule

Note: this schedule is tentative and subject to change.

Readings listed roughly correspond to the topic of the lecture, but will not cover exactly what was done in lecture.

  • PFPL = Harper, Practical Foundations for Programming Languages
  • TAPL = Pierce, Types and Programming Lanugages

January 9 Intro and Rule induction Slides HW0 Out
11 Induction review TAPL 1-2
16 Rule induction, syntax and dynamics Notes PFPL 2, 3; TAPL
18 Class cancelled HW0 Due
23 Dynamics and Statics Notes HW1 Out PFPL 4, 5.1, 5.2; TAPL 3.3-3.4, 8.1-8.2
25 Type safety Notes PFPL 6.1, 6.2; TAPL 8.3
30 Modeling imperative languages Notes
February 1 Modeling imperative languages (Cont'd) HW1 Due
6 Application: Garbage Collection Notes HW2 Out
8 Binding and substitution Notes PFPL 6
13 Untyped lambda calculus Notes PFPL 21; TAPL 5
15 Untyped lambda calculus (Cont'd) HW2 Due
20 Simply-typed lambda calculus Notes PFPL 10, 11; TAPL 9.1-9.3, 11.1-11.7
22 Simply-typed lambda calculus (Cont'd)
27 Curry-Howard Correspondence Notes PFPL 12; TAPL 9.4
29 Recursion Notes HW3 Due PFPL 19, 20; TAPL 11.11, 20
March 5 Midterm exam
7 Guest Lecture: Language-Based Security
12 No class: Spring Break
14 No class: Spring Break
19 Polymorphism Notes PFPL 16; TAPL 23.1-23.5
21 System F and Parametricity Notes HW4 Out PFPL 16; TAPL 23.1-23.5
26 Subtyping Notes PFPL 24; TAPL 15
28 Subtyping (Cont'd)
April 2 Big-step semantics Notes PFPL 7
4 Evaluation contexts Notes HW4 Due PFPL 5.3
9 Control stacks Notes PFPL 28
11 Parallelism and concurrency Notes HW5 Out
16 Parallelism and concurrency Notes
18 Dependent Types
23 Resource-aware Type Systems Notes CMU lecture notes
25 Equational Reasoning Notes/Slides HW5 Due PFPL 46, 48
May 1 (Wed.) Final Exam, 2-4pm

Resources

LaTeX resources

The use of LaTeX to typeset homework assignments is strongly encouraged, but not required. If you're not familiar with LaTeX, it has a bit of a learning curve but the time you take to learn it will definitely pay off over an academic career (and if you are/are planning to become a PhD student, it will become basically required at some point). Here are some resources to help you get up to speed.

I will try to provide LaTeX templates for at least the first few homeworks to help get you started too.

  • Overleaf: A convenient online interface so you don't have to install anything.
  • Overleaf also has a pretty good Learn LaTeX in 30 minutes tutorial (I haven't verified their claim about how long it takes)
  • Detexify: Want to know how to typeset a particular math symbol? Draw it here and it'll give you the macro.

Policies

Grading

Final grades will be based on the following:

35%Homeworks (roughly 7 of them, and they may not be weighted equally)
25%Midterm Exam (Early March)
35%Final Exam (Final Exam Period)
5%Participation and Discussion

Final letter grades will be assigned at the instructor's discretion based on the difficulty of the homeworks and exams, which is difficult to predict before the semester starts. This should only help you and shouldn't be a source of stress (e.g., earning 90% based on the formula above will earn you an A, but if grades were lower than expected and I feel that students with lower final grades learned the material well enough to earn As also, I'll adjust accordingly).

That said, my main grading policy is fairness: asking for a higher grade (without pointing to specific things that have been graded incorrectly) won't succeed, because that wouldn't be fair to the rest of the students. I understand that this is a required class for many students and there may be unpleasant consequences for earning less than a certain grade, however that absolutely cannot be a factor in your grade.

Attendance and Participation

Sections 01 and 02 will meet on campus. Live attendance is encouraged; the ability to hear the material and ask questions live is valuable. Furthermore, class participation is an explicit (but small) part of your grade. I currently do not plan to formally take attendance and the occasional absence from lecture does not need to be excused. If you are in Section 01 or 02 and are consistently not able to come to lecture for some reason, discuss this with the instructor. I do not currently plan to livestream lectures, but they will be recorded.

Section 03 is an online section; you will watch the lectures online at your leisure but complete the same assignments and exams as the in-person students. For classroom capacity reasons, Section 03 students should not attend in-person without the permission of the instructor.

There are many ways to get full credit for participation in class. For students in Sections 01 and 02, attending lecture and asking and answering questions is, of course, one. However, being an active participant (asking and answering questions) in discussions on Discord, and attending office hours are also good options for online students and students who are uncomfortable actively participating in the live lecture.

PhD Qualifier section

PhD students who wish to use this course to satisfy the written qualifying requirement must be enrolled in Section 02 (even if you are not able to attend class in person; please let me know if this is the case, but I won't hold it against you). Students in this section will complete the same assignments and exams as the other sections, but may be graded to a different standard.

Late Days/Late Work

Each student has 8 "late days" to use on homeworks over the course of the semester. Using a late day extends the deadline by 24 hours. You do not need to let me know you're using late days; they'll be deducted automatically when you hand in the work.

Important: No more than two late days may be used on any one assignment. Late days may not be used on exams.

After 48 hours, late work will not be accepted without the instructor's permission, which must be obtained before the deadline (and will be granted only for good reasons, e.g., medical emergencies).

If you've used up your late days, work up to 2 days late (without prior permission from the instructor) will be accepted with a penalty of 10% per day.

Collaboration and Using Outside Sources

All work submitted for credit (homework and exams) must be your own individual work. Some examples of violations of this policy are sharing answers with other students (this is a violation for all students involved, even if the answers were the original work of one of the students), and looking up answers to questions on the web. Note that these are just some examples, but not an exhaustive list.

One exception is that you are free to get help from the instructor, TAs, and Illinois Tech's Academic Resource Center. These resources are here for you, and you can (and should!) use them if you need to. If you are working with a tutor outside of Illinois Tech or have a similar situation, please discuss the situation with the instructor as soon as possible and before submitting any work.

Policy on generative AI (e.g., ChatGPT): On most homework assignments (not exams), the use of these tools is allowed, but must be disclosed as follows. For any homework task where you used AI, you must say that you used it and describe how (even if you only used it to check your answer). In particular, mark (e.g., bold, highlight) any text that came directly from AI. If you used text from AI but edited it, say so and describe the edits (and/or include the original AI-generated text, but make it clear that this is not intended to be your answer). When possible, include the AI session logs. I will grade your assignment using exactly the same standards as non-AI-generated assignments (in particular, you are responsible for correcting any mistakes made by the AI). Use of AI that is not disclosed or on tasks where it is not allowed is a violation of the academic honesty policy.

Illinois Tech's Sexual Harassment and Discrimination Information

Illinois Tech prohibits all sexual harassment, sexual misconduct, and gender discrimination by any member of our community. This includes harassment among students, staff, or faculty. Sexual harassment of a student by a faculty member or sexual harassment of an employee by a supervisor is particularly serious. Such conduct may easily create an intimidating, hostile, or offensive environment.

Illinois Tech encourages anyone experiencing sexual harassment or sexual misconduct to speak with the Office of Title IX Compliance for information on support options and the resolution process.

You can report sexual harassment electronically at iit.edu/incidentreport, which may be completed anonymously. You may additionally report by contacting the Title IX Coordinator, Virginia Foster at foster@iit.edu or the Deputy Title IX Coordinator at eespeland@iit.edu.

For confidential support, you may reach Illinois Tech's Confidential Advisor at (773) 907-1062. You can also contact a licensed practitioner in Illinois Tech's Student Health and Wellness Center at student.health@iit.edu or (312)567-7550.

For a comprehensive list of resources regarding counseling services, medical assistance, legal assistance and visa and immigration services, you can visit the Office of Title IX Compliance website at https://www.iit.edu/title-ix/resources.