E0 227 Program Analysis and Verification

August-December 2011, 3:30pm-5:00pm Tue, 2pm-3:30pm Fri, CSA Lecture Hall (Room 117)

Instructors: K. V. Raghavan, Deepak D'Souza

Teaching assistants: Amogh Margoor and Aravind Acharya (both II Year MSc Engg.)

Assignments

Lecture slides

Programming project

Here is the project's description.

This tar ball contains the Soot JAR file, a presentation about Soot (including a link to a detailed tutorial), and skeleton source for you to use (with JavaDoc generated from it).

The project will have an initial demo on November 22/23, by which time you ought to have completed your implementation, and be able to run it on all the test cases we have provided. We will then have a final demo on November 28th when you will demonstrate the changes you made based on the feedback we gave you during your initial demo. These dates are strict, with no delays permitted.

Here are a set of test cases for you to use (we will have an additional set of test cases for evaluation).

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 a program, properties that programmers wish to prove about programs, and the theory behind foundational program-analysis techniques such as abstract interpretation, type inference, and theorem proving.

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

Denotational and operational semantics of programs. 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 and polymorphic type systems, Hindley-Milner's type inference algorithm for functional programs. Pointer analysis of imperative programs. Assertional reasoning using Hoare logic.

Reading material