17-355/17-665/17-819 Program Analysis

Course Description

This course covers both foundations and practical aspects of the automated analysis of programs, which is becoming increasingly critical to find software errors and assure program correctness. The theory of abstract interpretation captures the essence of a broad range of program analyses and supports reasoning about their correctness. Building on this foundation, the course will describe program representations, data flow analysis, alias analysis, interprocedural analysis, dynamic analysis, and symbolic execution. Through assignments and projects, students will design and implement practical analysis tools that find bugs and verify properties of software.

This course fulfills the Logic and Languages constrained elective category for the Computer Science major as well as the Theoretical Foundations requirement of the Computer Science master's degree.

Why take this course?

Logistics and People

Class: Tue/Thu 11:00 a.m. — 12:20 p.m. in GHC 4101
Recitation: Fri 10:00 a.m. — 10:50 a.m. in WEH 5320
Fall 2024
12 units

Professor Fraser Brown
CIC 2218
Office hours:
Friday 1:00 — 2:00 p.m.
Email: fraserb@andrew.cmu.edu
Headshot of Professor Fraser Brown
TA: Ian Dardik
Office hours:
Tues 10:00-10:45 a.m., TCS 316
Wed 2:45-3:30pm, TCS 316
Email: idardik@andrew.cmu.edu
Headshot of teaching assistant Ian Dardik

Course Syllabus and Policies

The syllabus covers course learning objectives, supplemental textbooks, assessments, late work policy, and policies. Consult Canvas and especially Piazza for up-to-date announcements and discussion (links in header).

Schedule

As of August 2024, we have endeavored to make this schedule, including assignment due dates, as accurate as possible. However, it is subject to change as the semester advances.

Date Topic Reading/Material HW Due Optional Reading
Aug 27 Introduction, Program Representation, and Syntactic Analysis Text ch. 1 & 2 PPA ch. 1
Aug 29 Program Semantics Text ch. 3
Aug 30 recitation CodeQL
Sep 3 Program Semantics (cont.)
Sep 5 Program Semantics (cont.) hw1 PPA ch. 2 & 6
Sep 6 recitation Semantics ex1, ex2
Sep 10 Dataflow Analysis & Abstract Interpretation Framework Text ch. 4 PPA ch. 2.1
Sep 12 Dataflow Analysis examples Text ch. 5 hw2 pdf mathpartir PPA ch. 2
Sep 13 recitation Specifying/Implementing Dataflow Analysis
Sep 17 Dataflow Analysis examples (cont.) PPA ch. 2.2—2.3
Sep 19 Dataflow Analysis examples (cont.), Termination and Complexity Text ch. 6 hw3 pdf PPA ch. 2.3—2.4
Sep 20 recitation Data-Flow Analysis Correctness notes, sol2, sol2det, sol3
Sep 24 Dataflow Analysis: Termination and Complexity PPA ch. 2.5
Sep 26 Widening and Collecting Text ch. 7 hw4 pdf (due 9/30) PPA ch. 2.5
Sep 27 recitation repo
Oct 1 Interprocedural analysis Text ch. 8
Oct 3 Context-Sensitive Analysis Text ch. 8 & ch. 10.2
Oct 7 (not Oct 4!) recitation Midterm review. Class will be in TCS460 @ 1pm Midterm Study Guide
Oct 8 Pointer Analysis + Call Graphs for Object-Oriented Languages Text ch. 10 hw5 checkpoint pdf PPA ch. 3
Oct 10 Midterm exam 1 midterm
Oct 11 no recitation
Oct 14—18 Fall Break; no classes
Oct 22 Intro to Hoare Logic Text ch. 11
Oct 24 Verification using Hoare Logic Text ch. 11 hw5
Oct 25 recitation Hoare Logic Proofs using Axiomatic Semantics
Oct 29 Symbolic Execution Text ch. 13
Oct 31 Concolic Testing Text ch. 14 hw6
Nov 1 recitation
Nov 5 Democracy Day; no class
Nov 7 Satisfiability Modulo Theories Text ch. 12 hw7
Nov 8 recitation Intro to Z3
Nov 12 Satisfiability Modulo Theories (cont.)
Nov 14 Program Synthesis Text ch. 15
Nov 15 recitation Simple synthesis using Z3
Nov 19 Program Synthesis (2/2), Program Repair
Nov 21 Model Checking hw8
Nov 22 recitation Midterm review
Nov 26 Midterm exam 2 midterm
Nov 28 Thanksgiving Break; no class
Nov 29 No recitation
Dec 3 Dynamic Analysis (Fuzz Testing, Invariant Generation) Text ch. 16
Dec 5 Review
Dec 6 recitation Project Discussions
TBD Project Presentations
TBD project final report