CS536: Science of Programming, Fall 2023

Instructor: Stefan Muller,
Office Hours: M 2-3 (SB 218E), Th 10-11 (Zoom)
TAs: Chaoqi Ma,
Office Hours: T/Th 2-3 (T: SB 004, Th: Zoom)
Gagan Beerappa,
Office Hours: W/F 2-3 (Google Meet)
Param Modi,
Office Hours: T/Th 11:30-12:30 (Zoom)

Lectures: Mon., Wed. 10:00-11:15 AM, Perlstein Hall 131
  • Section 01: In-person class
  • Section 02: In-person class, PhD qualifier section
  • Section 03: Online

(see Attendance Policy for details)

Course Description     Schedule     Resources     Policies

Course Outcomes

By the end of the class, you should be able to answer:

  • How does verification differ from testing?
  • How do we understand the semantics of programs?
  • How do semantics affect the way we understand program correctness?
  • What rules of reasoning can we use to discuss program correctness?
  • How is correctness of parallel programs different?
  • What if program execution isn't deterministic?

    Prerequisites: CS330 and CS331


    Note: this schedule is incomplete, tentative and subject to change.

    Topic Notes
    Aug. 21 Intro Slides
    23 Propositional logic Slides Practice HW1 Out
    28 Pred. logic, State update and substitution Notes Practice
    30 Expressions and types Notes Practice
    Sep. 4 No class - Labor Day
    6 Statements and operational semantics Notes Practice HW1 Due
    11 Big-step semantics, divergence, runtime errors Notes Practice HW2 Out
    13 Hoare triples I Notes Practice
    18 Hoare triples II (cont'd) Practice
    20 Hoare triples III Notes HW2 Due
    25 Proofs and Proof Outlines Notes Practice
    27 Weakest preconditions I Notes Practice
    Oct. 2 Weakest preconditions II Notes Practice
    4 Strongest postconditions Notes Practice
    9 No class - Fall break
    11 Loop invariants I Notes Practice
    16 Loop invariants II (Cont'd) Practice
    18 Review session
    23 Midterm Exam
    25 Proof Outlines Notes Practice HW5 Out
    30 Loop bounds Notes Practice
    Nov. 1 Array Assignments Notes Practice
    6 Pointers and local reasoning Notes HW5 Due
    8 Separation logic Notes HW6 Out
    13 Separation logic (cont'd)
    15 Sequential nondeterminism Notes Practice
    20 Parallel program basics Notes Practice HW6 Due, HW7 Out
    22 No class - Thanksgiving break
    27 Class cancelled
    29 Concurrent separation logic/Wrap-up Slides HW7 Due
    Dec. 5 Final Exam - 2-4pm



    There is no required textbook for the course. Class notes will be provided.

    If you really want a book to reference, the following are OK but entirely optional (list and notes courtesy of Jim Sasaki):

    • The Science of Programming, by David Gries, Springer-Verlag, © 1981. Unfortunately the book uses weird notation and has a number of typographical errors and doesn't include everything we'll be covering.
    • Most of the course material comes from Verification of Sequential and Concurrent Programs (3rd edition), by Krzysztof R. Apt, Frank S. de Boer, and Ernst-Rüdiger Olderog, © 2009, Springer-Verlag. But don't get this book: It's expensive and written for a very theoretical audience.

    Also, here are some potentially helpful references for reviewing propositional and predicate logic (these are very important topics for understanding the course material; they will be reviewed briefly the first week of class but it is mostly assumed you already have some logic background; again this list is courtesy of Jim Sasaki):

    1. One reference is online at myIIT Library > Databases > Books 24x7. Search for Fundamentals of Discrete Math for Computer Science: A Problem-Solving Primer by Tom Jenkyns and Ben Stephenson, Springer © 2013.  Study Sections 3.2 (Boolean Expressions and Truth Tables) and 3.3 (Predicates and Quantifiers).
    2. There is a CodeGuage site with an Elementary Logic course. A quick spin through that might be helpful. Unfortunately, it seems they only discuss predicates with outermost quantifiers. (E.g., ∃x.∃y.p, but not predicates like (∃x.p) → (∃y.q).)
    3. There's a handout at Cornell that is a more detailed introduction to predicate calculus. Two notes: We write (e.g.) (∀x.P) ∧ ∃y.Q where they write (∀x)(P ∧ (∃y)Q). We write logical equivalence as "⇔"; they use

    Other Resources:

    Logic proof checker

    Dafny installation instructions

    Dafny documentation



    Sections 01 and 02 will meet on campus. Live attendance is encouraged; the ability to hear the material and ask questions live is valuable, and while participation is not an explicit part of your grade, it may be used to "break ties." That said, attendance is not mandatory, and the occasional absence will not count against you and doesn't need to be excused. If you are in Sections 01 and 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.

    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.


    Final grades will be based on the following:

    40%Homeworks (6-8, may not be evenly weighted)
    25%Midterm Exam (Oct. 23)
    35%Final Exam

    Final letter grades will be calculated as follows:


    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.

    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 us 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 (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.


    Section 01 and 02 students will take the midterm exam in person at the normal class time. Section 03 students should expect an email to make arrangements to take the exam. If they can take the exam in class, this is preferred, but arrangements for remote exams are also possible. The final exam will be during finals week at a time to be determined by the Registrar. More details will be announced later.

    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), looking up answers to questions on the web, and using generative AI tools like ChatGPT* (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.

    All violations of this policy will result in a zero on the relevant assignment or exam, and a report to the university's academic honesty office (which may result in additional penalties with repeated violations). For more information about what constitutes academic dishonesty and the policies we are required to follow if we discover dishonesty, please view the university's Code of Academic Honesty.

    If you're ever in doubt about whether something would violate the policy, don't hesitate to contact the instructor or TA. It's always better to ask and be sure.

    *Why can't I use ChatGPT? I feel the need to explain this particular rule in more detail. Generative AI tools are likely to be with us for the long run and if you use what you learn in CS536 after the semester is over (and I hope you will!) you might well use such tools to assist with some of the more tedious parts, so you might well wonder why you can't use them during the class. The short(-ish) answer is that ChatGPT is a language model. Sophisticated as it may be, it has no model of formal logic, a necessary component of producing formal proofs. Without a background in logic and proof methods, which you'll be learning in this class, you have no way of knowing if a proof from an outside source is correct, mostly correct, or entirely wrong. While this is a graduate-level class, you are learning the basics of a new set of skills, and when learning a new skill, it's important to learn to do it yourself so that you have the skills to understand and sanity-check answers that, when you're more advanced, you might be able to get with the assistance of a tool. Think of it like when you were first learning arithmetic and had to do so without a calculator. The rule was frustrating for us all then, and I expect this rule will cause some frustration now, but it's necessary for learning the basics of a new set of skills.

    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.

    Disability Accommodations

    Reasonable accommodations will be made for students with documented disabilities. To obtain a letter of accommodation, contact the Center for Disability Resources at https://www.iit.edu/cdr.