E0 227 Program Analysis and Verification
August-December 2023, 3:30 pm - 5 pm Mon Wed, Room 117, CSA
Instructors:
K. V. Raghavan,
Deepak D'Souza
Teaching assistants: Abhishek Uppar (abhisheku), Devansh Tyagi
(devanshtyagi)
Lectures
- Aug. 2: Introduction
- Aug. 7, 9: Latices
and Knaster-Tarski theorem. Lecture notes.
- Aug. 16, 18: Introduction to abstract interpretation.
Lecture notes.
- Aug. 21, 23, 28: Correctness
of abstract interpretation. Associated lecture
notes.
- Aug. 30, Sep. 4, 6: Kildall's algorithm to
compute least solution of data-flow equations. Associated
lecture
notes.
- Sep. 11, 13, 18: Call
strings approach to inter-procedural analysis.
- Sep. 22, 25, Oct. 9: Functional approach to inter-procedural analysis.
- Oct. 11, 13, 16: Pointer
analysis
- Oct. 18, 23, 25: Floyd-Hoare logic
- Oct. 30, Nov. 3, 6: PDGs and
slicing
- Nov. 8, 13, 15: Simply Typed Lambda Calculus
- Nov. 20, 22: Polymorphic type systems
Motivation
Program analysis is a collection of techniques for computing approximate
information about a program. Program analysis finds several applications:
in compilers, in tools that help programmers understand and modify
programs, and in tools that help programmers verify that programs satisfies
certain properties of interest. As software systems have become larger and
more complex there has been a lot of practical interest in using
program-analysis based tools to assist with software development. In this
course we will learn about techniques to reason about the meaning of and
the properties of a
program, and the
theory behind foundational program-analysis techniques such as abstract
interpretation, type systems, and theorem proving. We will also look at
an important application of program analysis, namely the operation of
program slicing.
We will assume that students have exposure to programming, the fundamental
concepts of programming languages, and the basics of mathematical logic and
discrete structures. However, no prior knowledge of program analysis is
assumed.
Syllabus
Abstract
Interpretation: Lattices, abstract join-over-all-paths analysis of a
program. Correctness of abstract information: Galois connections, abstract
interpretation as an over-approximation of concrete semantics. Dataflow
analysis: Computing an over-approximation of join-over-all-paths
information using Kildall's algorithm, by modeling the statements in the
program as a set of equations. Analysis of multi-procedure programs. Type
Systems: Monomorphic type systems. Pointer analysis of
imperative programs. Program slicing. Assertional reasoning using Hoare
logic.
Reading material