Static Analysis

Q3 2009, 5 ECTS

The course presents principles and applications of static analysis of programs, and instills in the participants the following competences:

The course covers type analysis, lattice theory, control flow graphs, dataflow analysis, fixed-point algorithms, narrowing and widening, interprocedural analysis, control flow analysis, pointer analysis, and context and path sensitivity.

Lecturer

Michael Schwartzbach <mis@cs.au.dk>

Prerequisites

The participants are assumed to be familiar with advanced programming language concepts and the basics of compiler construction.

Time and Place

Wednesday 9:15-12:00 in Shannon-157.

Material

All course material will be available on-line. The lectures are mainly based on the following:

Lecture Notes on Static Analysis
TIP implementation (JavaDoc).

Assignments

Students must hand in solutions to a couple of assignments every week. Hand-ins from groups of sizes 2 or 3 are allowed.

Exam

The course concludes with a 2-hour written exam (7-scale) based on the material in the lecture note.

Course Plan

DateTopics and assignments

28 January

Introduction, A Tiny Example Language, Type Analysis (slides). Assignment #1.

4 February

Lattice Theory, Control Flow Graphs, Dataflow Analysis (slides). Assignment #2.

11 February

Dataflow Analysis, Widening and Narrowing, Interprocedural Analysis (slides). Assignment #3.

18 February

Lambda Calculus (slides, lambda.jar, matrix.avi) , Control Flow Analysis (slides). Assignment #4.

25 February

Pointer Analysis (slides), Case Study: JWIG (slides). Assignment #5.

4 March

Shape Analysis (slides), Case Studies: String Analysis (slides), XSLT (slides). Assignment #6.

11 March

Path and Context Sensitivity (slides, 32-45, note), Case Study: JavaScript (slides).